HACKER Q&A
📣 P6Rs4r

How to get into quantitative trading?


I used to be a dev at a quantitative trading shop a few years ago but I lost touch with the trading and programming world for a few years. I'm trying to get back into this and would like to create a system to automate my trading for my personal account. I'd also like to have a backtesting platform. Are there are any resources for this?


  👤 lockdown22 Accepted Answer ✓
Not sure if Options trading for Income / Theta harvesting counts as Quantitative trading, but I found success here.

Long story short: I created an option backtester (MesoSim) and started analyzing public domain trades.

I have a couple of listed in this blog: https://blog.deltaray.io/tags/strategies/

If you are interested I'd suggest taking a look at the Weekend Effect, it's relatively easy to understand.

Best luck to you getting back to trading!


👤 worik
You should know this is a really bad idea, unless loosing money is your goal

"Automated" trading, even if there is an edge (and unless you are a crook, there is not) will sink you with transaction costs

You should know this.


👤 dvas
Lots of other great answers, another one I came across recently is FinGPT[0]. For backtesting there is zipline [1], but doesn't look like it's maintained anymore.

[0] FinGPT: Open-Source Financial Large Language Models https://github.com/AI4Finance-Foundation/FinGPT

[1] Zipline is a Pythonic algorithmic trading library https://github.com/quantopian/zipline


👤 renewiltord
Fastest way is probably to just write the code. You can get crypto market data for free. https://www.binance.com/en-AU/landing/data and others.

If you want equities, I think you can get that from Databento for low cost (won't need the CME cert for their stuff to get historical from here).

Then just write the code. The basic structure is not that much in a modern language (use Java, Rust). To trade, you can use Sequencer architecture as basic https://sissoftwarefactory.com/blog/an-introduction-to-the-s... (article describes so maybe jog your memory, but has only old code link so useless if not new to you, just sequence your messages) ChatGPT will help build this quick.

IMHO if you want to do this, crypto markets are ideal. Fees are high, but low upfront costs. Can eke out small wins with low capacity strategy.

Should be advised, though. Everyone who wants to get into this does this stuff and then finds that if you want to do big, you need to apply large force on long lever. So everyone and their uncle had "a few profitable strategies as a side bet". Means nothing at small scale. Only for fun.


👤 KRAKRISMOTT
Your biggest problems will be brokers, data, and capital. The coding part of quant finance is surprisingly boring (unless you are doing HFT but most aren't). For infrastructure just use AWS and co-locate next to the exchange (especially if you are doing crypto where everything's in the cloud). For data try https://databento.com/, there are also other sources.

Affordable data, especially tick level L3 data at scale is difficult to get. Having enough capital to make trading worth well (pricing in losses etc.) is also difficult. Direct market access etc. all cost money. Use interactive brokers if you need a compromise between fully professional and amateur. Spend more time on your financial models, and less time building beautiful frameworks. The engineering of quant finance is the least interesting part. Focus on the market microstructure and financial models. If your model is bad, you lose money regardless of how great your infra is.

It's difficult to find a good off the shelf backtester. This ties into your model too. At its core, a backtester is just a for loop. Computation of variables like slippage and integration of monte Carlo Sims is where the secret sauce lies. Those are all proprietary.

Best of luck in seeking alpha


👤 tim333
I've recently been studying up on it with a view to unleash the bots soon. I can recommend a couple of Udemy courses, details below.

There's a guy here explaining how to make trading bots in Python https://youtu.be/sUQmuL95_oY He has free code available on github to try out. He also explains how to backtest. There are a couple of popular packages like backtesting.py out there.

ccxt is a handy python package if you want to trade crypto. There are various free tutorials for it.

I also recommend playing around with Tradingview. It draws graphs and you can make your own indicators with their language Pinescript and even trade off that although Python probably gives you more flexibility.

Udemy courses https://www.udemy.com/course/algorithmic-trading-strategies-... and https://www.udemy.com/course/complete-algorthmic-forex-tradi... I paid about £14 each - they keep chopping and changing with the discounts

The details vary a bit depending what you want to trade - crypto, stocks fx or whatever.

One tip - chatgpt4 is surprisingly helpful and can almost code a whole bot for you if you know what you want. One slight pain for me has been finding brokers with the what I want. I'm the wrong nationality or they don't have futures or there isn't enough liquidity or they are sketchy or such like.


👤 financltravsty
HN is the wrong crowd to ask, because they’re behind the curve on a lot of things.

Hop on FinTwit or CryptoTwit.

Derivatives (options/futures) are your best bang:buck. But crypto is where the real speculation is.

Read up on a practical trading book (hypothesis building, backtesting without bias, and risk management via Kelly etc.) and then start testing strategies.

Backtesting you can build yourself with any broker that has an API, but not all are made equal. It’s dead simple.

Look into [redacted]


👤 atanasb
I was wondering the same thing last year.

I ended up in twitter/reddit rabbit holes until I found a somewhat dodgy guy on twitter (@TerribleQuant - account is now deleted).

The person compiled a guide with study resources, courses, YT videos, podcasts, textbooks and everything else you can think of in 21 pages.

If you look for: BBM PUBLISHING INC “Roadmap” Resource Guide 3rd Edition you might be able to find a copy.


👤 prakhar897
Noobie Question: Does this actually work? I thought alpha was very little and always fleeting so only big hedge funds generate profit from it.

👤 aleksiy123
I played around with https://www.quantconnect.com/

Its a platform where you just focus on implementing strategy. Was fun but I realised it would be more work than just getting a better job.

I'm sure there are others as well.


👤 GoldenMonkey
for trading strategies: wilmott.com elitetrader.com researchgate.net

for quant: https://community.quantopian.com/home https://pyquantnews.com https://www.quantscience.io

for backtesting - zipline reloaded - is event based. It is very slow for optimization.

vectorbt - vector optimization - optimize the parameters. optimize - entry and exit parameters, number of ticks. useful for single-asset or spread strategies (i.e. refiner crack spread).


👤 mrefish
This might be a good resource to get started: https://github.com/paperswithbacktest/awesome-systematic-tra...

👤 exz
There are many resources for MetaTrader: https://www.mql5.com/en/market/mt4/free and you can test the Expert Advisors (trading bots) on historical data: https://strategyquant.com/doc/quantdatamanager/test-strategy...

👤 Imanari
Hit me up if you want to chat. I‘ve been a hobbyist algotrader for some years (with mixed results).

I’d say this: It is very hard to beat the market consistently. It is even harder to statistically prove and convince yourself that our new strategy actually now beats the market. There are a lot of gotchas and caveats to watch out for when backtesting.

I spent most of my time with time series techniques as this was most fun to me. My current stack is ccxt, binance, polygon.io and self made backtesting in python.


👤 lend000
I wish I had started with QuantConnect before I wrote everything from scratch; all the other free/open source tools didn't seem to meet quality standards for me.

👤 karmakurtisaani
Check out numer.ai if you're feeling adventurous.

👤 kwant_kiddo
this makes me believe you never were in a quant shop, sorry. At least if your goal is making money.

I think it can be a fun project to make an engine, and try to make models, together with some form of ingestion pipeline and finally solve and calibrate the models. Try some simple products, and see how close you can get to real world prices.

Making pricing/risk engines are in my opinion somewhat close to game engines even through that the domain is so different.


👤 markus_zhang
Just curious, is there still non-quantitative professional (not-retail) trading in the forex or future or fixed income market?

👤 stcredzero
Check out TradersHelpingTraders channel on YouTube. They talk about their trading bots on their Discord.

👤 phibz
The SEC rules if you're in the US are quite strict. You likely wouldn't be able to do quantitative trading own your own while working at a quant. Though, it might help you get hired as a modeler.