r/algotrading • • 5d ago

Infrastructure Which GPU to get?

Want to upgrade an rtx 3060 12g. How useful is a gpu for backtesting and strategy development and simulation? A lot of things are sequential so wondering how to leverage and make use of parallel computation.

Is nvidia / cuda necessary or can amd or Intel get it done? How much vram is needed?

5 Upvotes

27 comments sorted by

4

u/slypleasure33139 5d ago

if you are willing to let it run at night, you are in a strong position. I have the same card as you and I am using it for personal LLM work. a lot of beginner stuff. it get's the rough stuff and mistakes out of the way so that I can refine it in the morning. My next upgrade will be an entirely new rig, and running the rtx 50 series, not sure which one because I can always spend more, but, like I said to my neighbor, it's nice to have a Lambo, but where will you break 150mph? I have a track car from the 70's and I am rather happy trailering it to homestead and moving loud and fast at 156-158 when they let historicals' on track. no trophy just gas and noise. apply the same concept, I could go faster by spending more money, or I can go faster with a spacer plate on the intake. think the same way, use what you got, make it work, once you got money made from it, upgrade and make your output time worth more.

1

u/SFsports87 5d ago

How are you using the card for algo sims, pytorch?

1

u/slypleasure33139 5d ago

nail on the head. and learning how to use market data and have trades executed

2

u/drguid 5d ago

My ML models build using my CPU. My bottleneck is the speed at which I can store data in my SQL database.

3000 stocks, 1.2 million entry signals and it takes around 10 minutes to train a model max.

1

u/SFsports87 5d ago

Interesting. Was there a lot of code optimization?

2

u/ciaranwalsh96 5d ago

Before buying hardware, I would profile one representative research run and separate the workload into data loading, feature calculation, strategy logic, model fitting and parameter search. Most event-driven backtests are CPU- and memory-bound because portfolio state changes sequentially. A GPU helps when the expensive part can be expressed as large batches of the same operation: neural-network training, large matrix calculations, or thousands of independent simulations. Moving small batches between system RAM and VRAM can erase the gain.

Your 3060 12 GB is enough to test whether the code actually scales. First vectorize the numerical work, keep data in a columnar format, and distribute independent symbols, windows or parameter sets across CPU processes. Then implement one GPU path and measure wall time, utilization and transfer time with the same inputs. If the GPU spends most of the run waiting, a faster card will not fix the architecture.

For PyTorch or JAX, Nvidia/CUDA is usually the lowest-friction choice because library and tooling support is broader. AMD can work well where ROCm supports the exact OS and card, while Intel's oneAPI stack is viable for code written around it but is less drop-in for common research repositories. VRAM is a property of the largest model, batch and resident dataset, not of backtesting in general; if the current workload does not run out of 12 GB, more VRAM alone will not make it faster. I would benchmark the exact job on a rented GPU before buying one.

1

u/SFsports87 5d ago

All good ponits. Was planning on getting new gpu anyway to upgrade local llm setup, so it's not just for this. But want to avoid in a month or two "i really should got the other one" scenario with nvida, amd, intel and vram. I have a good idea what I need for local inference, but not for financial use cases. Experience with python and matlab but not much beyond that.

1

u/Creative_Sushi 4d ago edited 4d ago

For MATLAB, NVIDIA is the clear choice here, primarily because MATLAB’s GPU computing engine strictly requires NVIDIA CUDA and will not accelerate code on AMD or Intel cards. If you get MATLAB Agentic Toolkit from GitHub, you can connect your AI agent to MATLAB and let you take advantage of supported GPU easily with local LLMs.

7

u/Kevin_Cortese 5d ago

None of my strategy development uses GPU. Only use my rtx5070 for lightgbm and pytorch. Polars etc needs ram and cpu so design around that.

1

u/ExpressTwo7022 5d ago

i want to know how GPU can be used in backtesting can you give ideas? my dumb claude keeps telling me u need CPU only i have 3070ti that i could use some how? to compute?
idk why claude keeps saying that lol

1

u/SFsports87 5d ago

That's partially what I am trying to figure out. Gpu should be useful for large parallel matrix calculations. Not as useful for sequential backtesting unless you can somehow parallelize them.

2

u/Aggressive_Listen849 5d ago

gpu is irrelevant for mt5 backtesting, the tester runs one agent per cpu core, so parallelism comes from core count not cuda. the card only helps the lightgbm/pytorch side of things

2

u/Fresh-Explorer-5108 5d ago

I'd profile one representative backtest before upgrading. If the bottleneck is a CPU loop or data loading then try parallelizing independent parameter runs on your current hardware before spending on more VRAM.

1

u/Odd-Repair-9330 Robo Gambler 5d ago

My laptop is 5 years old and has no NVDIA GPU, I am still doing alrite for machine learning training, just a little bit slower

1

u/satishtreks 3d ago

Why would a backtest need GPU? I'd buy a better CPU with a number of cores as high as possible

-2

u/bogey3putt69420 5d ago

Why? Just use a vps. Power or internet outage at home and it’s gg

3

u/SFsports87 5d ago

Offline strategy development.