It's 9:40 p.m. and you have 14 browser tabs open.
One is a video about how Jane Street trains its models on a cluster of GPUs. Another is a job post that asks for a PhD in physics.
Your Python notebook sits in the last tab. It has one cell and that cell imports pandas (a far cry from Jane Street's GPU-powered neural networks).
You close the laptop and tell yourself you'll start once you know more. (Or, you'll never start at all.)
You read about funds with large research teams and private data centers, and you assume you need the same to begin.
The research tells a different story.
The signal can be the market's own past return. The coding has gotten easier too.
- A 2012 study in the Journal of Financial Economics found that recent returns tended to persist for up to a year. The authors saw it in each of the 58 liquid futures markets they tested.
- In a 2023 controlled experiment, developers with an AI pair programmer built a server 55.8% faster than developers without one.
The roadmap to algorithmic trading: From gut feel to systematic execution
1. Turn an idea into a test
Start with one idea. "SPY returns more after it closes above its 200-day average" works. "Tech looks strong" doesn't.
Then pull 15 years of daily prices into a pandas DataFrame.
Compute the average with rolling(200).mean() and tag each day as above or below it. Compare the next 21 days of returns for each group.
Here's what it looks like in Python:
This is where Claude or ChatGPT is helpful. Ask it to write the code, then ask it to explain each line back to you.
(Treat it like a senior developer who never gets annoyed with your questions.)
If the two groups look the same, drop the idea and write the next one. You just spent an hour to learn something.
2. Build a simple backtest
A view that survives the first test becomes a rule with entries and exits. Buy at the next open when the close crosses above the 200-day average. Sell at the next open when it crosses below.
VectorBT and Zipline Reloaded are my favorite backtesting engines.
VectorBT is super fast and can generate backtests like the below in seconds.
Or you can keep it simple and use Pandas.
Shift the signal with .shift(1) so the backtest only trades on information it had.
Charge every trade 5 basis points for costs and slippage.
Then split the data so you build the rule on 2010 to 2019 and judge it only on 2020 onward.
Compare drawdown and Sharpe ratio against buy and hold for those out-of-sample years. Before you trust the numbers, paste the code back into the AI and ask it to hunt for look-ahead bias.
It finds mistakes you can't see because you wrote them.