Testing & Technology · 10 min
Quantitative Trading
Key Points
- Quantitative trading means making decisions from measured data and statistics, not from gut feeling or a single chart pattern.
- Its core questions are simple: what is the expectancy, how big is the drawdown, and does the edge survive on data the rule never saw?
- Quant work is mostly data cleaning, testing and risk maths — the trading itself is the smallest part.
- The most common failure is overfitting: a rule that fits the past perfectly and fails the future.
- You do not need a mathematics degree to think quantitatively — you need honest numbers, a journal in R, and patience.
Quantitative trading has an intimidating name and a simple idea. A quantitative trader does not ask, 'does this chart look good?' He asks, 'what do the numbers say?' How often has this setup worked, by how much, how badly did it fail when it failed, and would those numbers survive on data the rule has never seen? That shift — from impression to measurement — is the whole subject of this article. It is also a subject wrapped in mythology: films show mathematicians printing money, and sellers show equity curves that never fall. The reality is slower, drier and more useful than either picture: mostly spreadsheets, careful testing, and risk arithmetic.
What 'quantitative' actually means
Quantitative trading means building a trading idea from data. A discretionary trader looks at a chart and decides; a quantitative trader writes the decision down as a rule, applies it to years of price history, and measures the result. The measurement has a small vocabulary, and you already know most of it from this library: expectancy (the average result per trade, in R), win rate, average win and average loss, and maximum drawdown — the worst fall from a peak the rule ever suffered. A rule with a positive expectancy and a survivable drawdown has earned a forward test; a rule with a beautiful story and no numbers has earned nothing. The data can come from your platform's history, from a spreadsheet of your own journal, or from public sources — but wherever it comes from, it must be clean, complete and honestly handled. Missing data, survivorship bias and look-ahead errors are the quiet ways a quant test lies to its author.
The quant workflow, in plain steps
The workflow is the backtesting workflow, made stricter. First, state the hypothesis in one sentence: 'buying the pullback to the 20-period average in a daily uptrend wins more than it loses after costs.' Second, write the rule so precisely that a computer — or a stranger — could apply it. Third, test it on history with real spreads and slippage charged, and record every trade. Fourth, and this is the step that separates quant work from ordinary backtesting, test the frozen rule on out-of-sample data — a period the rule was never tuned on — and compare the two results. If the out-of-sample result collapses, the rule memorised the past. Fifth, forward test on demo, in real time, because live data has slippage, gaps and emotions that history files do not. Only after all five steps does position sizing enter the picture, and it is sized from the measured drawdown, not from hope.
Overfitting: the quant's oldest enemy
Overfitting is what happens when a rule is adjusted again and again until it fits the past perfectly. Add a filter, then another, then an exception for Mondays, and the backtest becomes beautiful — and useless, because the future is not the past with the same noise in the same places. The defences are procedural, not clever: keep the rule simple, with few parameters; split your data before you begin; never tune on the test set; and distrust any result that depends on one exact setting — if the rule works at 20 periods but collapses at 19 and 21, you have found a cliff in the noise, not an edge in the market. A robust rule works across a range of settings, across more than one pair, and across different market conditions. That robustness is the real product of quant work.
Do you need to be a quant to trade this way?
No — and this is the encouraging part. You do not need advanced mathematics to think quantitatively. The arithmetic in this library — expectancy in R, drawdown, position sizing from a stop — is the core of it, and any student who keeps a journal in R is already doing quantitative work. What the professional quant adds is scale: more data, more rules tested, more rigorous statistics, and programming to do it quickly. If you want to go further, the honest path is to learn a spreadsheet deeply, then a programming language such as Python, then statistics — in that order, and only after your manual testing is already disciplined. The traders who fail at quant work almost never fail at the mathematics. They fail at the discipline: peeking at the answer, skipping the losing trades, and falling in love with their own rule.
Common mistakes
- Confusing a backtest with a business: a good test is a permission to forward test, not a licence to risk real money.
- Too many parameters: a rule with ten knobs can be tuned to fit anything — including pure noise.
- Testing on one market condition: a trend rule tested only on trending years has been examined by its friends.
- Ignoring transaction costs: a small edge disappears entirely once spreads, commission and slippage are charged honestly.
Practical application
Run a quantitative audit of your own journal this week. Take your last thirty trades, group them by setup, and for each setup write four numbers: how many trades, the win rate, the average result in R, and the expectancy. You will find that one or two setups carry your whole result and the rest are noise — and that discovery, made from your own numbers, is quantitative trading in its most useful form. Keep the winning setups, drop or repair the rest, and repeat the audit every month.