What is quant trading?
“Quant” is short for quantitative — it means using numbers. A quant trader uses data, math and computer code to decide when to buy and sell, instead of guessing.
The gut-feeling trader
- “I have a good feeling about this one.”
- Decisions change with mood, news, and fear.
- Hard to know if they were skilled or just lucky.
The quant trader
- “Here is my rule, and here is how it did over 10 years of data.”
- Rules are written as code — a computer follows them exactly.
- Every idea is tested before real money touches it.
A quant strategy is just a rule: “IF this happens in the data, THEN buy/sell.” The job is finding rules that actually work — and proving they aren't luck.
Prices are noisy
A stock price wiggles every day because millions of people are buying and selling for different reasons. Most of that wiggling is noise — random movement with no pattern. Can you beat it?
Nobody can predict a single day reliably. Quants instead look for a small edge — being right 52–55% of the time — and repeat it over thousands of trades. That's exactly how a casino wins: not every game, but on average.
Moving averages
To see the trend through the noise, quants use a moving average (MA): the average price over the last N days, recalculated every day. It's like your grade average — one bad test barely moves it.
Worked example: 5-day moving average
Prices over the last 5 days:
Tomorrow, the oldest day ($10) drops out and the newest price comes in — the window “moves”.
Short window = fast but jumpy. Long window = smooth but slow (it “lags” behind). Every indicator has this trade-off.
Momentum: ride the trend
Momentum traders believe things that are going up tend to keep going up (for a while). The classic rule uses two moving averages:
When the fast MA crosses above the slow MA — recent prices are beating the long-run average. A “golden cross”.
When the fast MA crosses below the slow MA — the trend is fading. Go back to cash. A “death cross”.
Mean reversion: what goes too far snaps back
Imagine a rubber band. Stretch it and it pulls back to the middle. Mean-reversion traders bet that when price runs unusually far from its average, it'll return to it.
How do we measure “unusually far”? Bollinger Bands
Draw the moving average, then draw a band above and below it using the standard deviation (a measure of how much prices normally wiggle). Rule: buy when price falls below the lower band, sell when it climbs back to the average.
Momentum and mean reversion are opposites. One loves trends, the other loves ranges. Real quant firms run many strategies at once so that when one struggles, another may be doing well — that's called diversification.
Scoring a strategy
Testing a rule on past data is called a backtest. But “how much money did it make?” is only part of the story. Quants check a whole report card:
Total return
How much $100 grew. The headline number — but it hides how scary the ride was.
Max drawdown
The biggest drop from a high point. −50% means at some point you'd lost half. Could you stomach that?
Sharpe ratio
Return per unit of bumpiness. Above 1 is good, above 2 is excellent. It rewards smooth profits.
| Metric | Strategy A | Strategy B |
|---|
Edge & risk: don't bet the farm
Say you found a coin that lands heads 55% of the time. You win when it's heads, lose when it's tails. Free money, right? Only if you size your bets wisely. Simulate 40 players, each flipping 250 times:
Even with a real edge, betting too big can wipe you out. The Kelly formula says the best bet is about 2 × win% − 1 of your money (10% for a 55% coin). Pros often bet even less — “half Kelly” — to be safe.
The overfitting trap
If you try enough settings, something will look amazing on past data — just by luck. That's overfitting: memorizing the past instead of learning a real pattern. Like memorizing last year's test answers and being shocked this year's test is different.
The first 400 days are the “past” (where we search). The last 200 days are the “future” (hidden during the search). Let's find the best crossover settings…
Press the button to start searching.
Always keep some data hidden (“out-of-sample”) and test on it only once at the end. If a strategy only works on the data you tuned it on, it was luck. Simple rules with few settings are less likely to overfit.
The quant workflow
Here's the step-by-step process real quants follow — and what you'd use if you tried it yourself (with paper money!).
Your first backtest in ~10 lines of Python
Python is the most popular language for quants. Click any line to see what it does.
Open-source projects on GitHub to explore
Real tools that quants (and students) use. Great for when you're ready to code.
Final quiz
8 questions. Answer them all to complete the course.
Word bank
Quant slang, decoded.