What is quantitative trading? Meaning, workflow and a first strategy
Quantitative trading is making trading decisions from rules that are written down, tested on historical data and kept only if the test supports them. The method is a workflow (hypothesis, data, backtest, validation, live running), and a retail trader can follow it alone with clean data, backtesting software, a validation method and a trading platform.
By Soren Huang · Published · updated · Editorial policy
Contents
- What is quantitative trading?
- How is quantitative trading different from algo trading and discretionary trading?
- What does the quant workflow look like, from idea to live trading?
- What should a retail trader copy from a quant trader's day?
- What first strategy can a retail trader build and test?
- What tools and data do you need to start?
- How do you know the first result is not just luck?
- Frequently asked questions
- References
What is quantitative trading?
Quantitative trading is making trading decisions from rules that are written down, tested on historical data and kept only if the test supports them. The data decides what gets traded, not the trader's feeling on the day. It is a way of working, not one kind of strategy: hypothesis, data, backtest, validation, then live running.
The Chinese term 量化交易 is used in the same sense: "quantified" trading, where every decision can be counted and checked. A quant treats a trading idea the way a scientist treats a claim. Write the idea so that it can turn out wrong. Test it on the data. If the data does not back it, drop it. A trend-following rule, a mean-reversion rule and a breakout rule can all be quantitative. The test is what makes them quantitative.
In practice, a quant does not ask "do I believe in this setup?" but "how many times did this setup occur in the last ten years, what happened after it, and what did it cost to trade?" One person at one computer can answer that question; the steps are below.
How is quantitative trading different from algo trading and discretionary trading?
The three differ in who makes the decision and what justifies it: discretionary trading relies on judgment, algorithmic trading automates the execution of any rule, and quantitative trading requires the rule itself to be chosen by measurement. They overlap in practice, but they answer different questions.
Discretionary trading is trading where a person reads the market and decides each trade from experience and judgment. Algorithmic trading (in Chinese 程式交易, "program trading") is trading where a computer program places the orders according to a rule, whatever the source of that rule. A trader can write a program for a rule they never tested. That is algorithmic, but not quantitative. The reverse also exists: a trader can research a rule carefully with data and then place the orders by hand. That is quantitative research with manual execution.
| Discretionary trading | Algorithmic (program) trading | Quantitative trading | |
|---|---|---|---|
| Who chooses the rule | The trader, trade by trade | The trader, once, from any source | A test on historical data |
| What justifies the rule | Experience and context | Whatever the author believed | Measured results after costs |
| Who places the orders | The trader | A program | Usually a program |
| Common failure | Decisions change with mood | An untested rule runs fast and loses fast | A rule fitted to the past that does not repeat |
Most retail quants end up in the last column with a program placing the orders, because a rule tested on ten years of bars is easiest to follow exactly when a machine follows it. This article covers the research side: how the rule in that last column is chosen.
What does the quant workflow look like, from idea to live trading?
Every quant process runs the same five steps in a fixed order: form a hypothesis, prepare data, backtest with costs, validate on data the test did not use, then run and monitor. The order matters because a failed validation sends the work back to the hypothesis, and skipping that return is where most retail attempts go wrong.
- Hypothesis. A hypothesis is one plain sentence that says what you expect to happen and why, written so that the data can prove it wrong.
- Data. Historical bars for the exact market, resolution and session you will trade, with no missing sessions, one time zone and clean handling of contract rolls.
- Backtest. A backtest is a run of the rule over historical bars that reports every trade the rule would have taken. It includes commission, slippage (the difference between the price the rule assumed and the price a real order would fill at) and next-bar execution, which means the order fills on the bar after the signal bar, never on the signal bar's own close.
- Validate. Validation is testing the rule on data the search never saw, either a held-back later period or walk-forward analysis, which repeats the tune-then-test cycle across the history.
- Run and monitor. Trade the rule exactly as tested and compare live trade count, fills and drawdown with the backtest.
The step that decides whether the process works is what you do when validation fails.
What should a retail trader copy from a quant trader's day?
The habit worth copying most carefully is the written record: each hypothesis written down before the test, each result written down after it, including the variants you dropped. How a quant desk splits the day between a researcher, a data engineer, a risk manager and a trader, and which of those roles software and a checklist can take at home, is covered in what quantitative trading firms do and what retail can copy.
Testing variants by hand means one backtest at a time, and the count of what you tried is easy to lose; write each variant and its result down before running the next one.
The record is what lets you answer the question in the last section: how many things did I try before this one worked? Ten variants is a different situation from ten thousand, and only the record tells you which situation you are in.
What first strategy can a retail trader build and test?
A good first strategy has one clear hypothesis, two or three parameters, a defined session and a stop, for example a session-range breakout on an index future. A simple rule is easy to test honestly, and its failure teaches more than a complex rule's success.
The hypothesis in one sentence: "when the index future breaks out of its early-session range, it tends to continue in that direction until the session close". That sentence turns into a rule with four parts:
- Range. Record the highest high and lowest low of the first N minutes of the session you trade. N is the first parameter; 15, 30 and 60 minutes are common starting values.
- Entry. After the range period ends, if a bar closes above the range high, buy at the open of the next bar. If a bar closes below the range low, sell short at the open of the next bar. Take at most one long and one short entry per day; the maximum number of entries is the second parameter.
- Stop. Place the stop at the opposite side of the range. A third, optional parameter is a minimum range size, so that very narrow ranges that produce stops a few ticks away are skipped.
- Time exit. Close every position at the end of the session. No overnight exposure, so the test is not affected by weekend gaps or roll days.
Hypothetical example
An index future with a point value of $50 per contract (made-up value). The first 30 minutes of the session set a high of 5,020 and a low of 5,000, a 20-point range. A bar closes at 5,022, so the rule buys at the open of the next bar, 5,023. The stop sits at 5,000, so the risk is 23 points, or $1,150 per contract before costs. Commission and one tick of slippage on each side add up to 1.5 points per round trip. Every trade therefore starts 1.5 points behind, and across the whole test the average trade must be comfortably larger than 1.5 points for the rule to be worth anything after costs. On this day the session closes at 5,035 and the time exit sells there: 12 points gross, 10.5 points after costs. On a day where price turns back into the range, the stop takes 23 points plus costs.
Why this rule and not a moving-average cross or an RSI level? Because its entry, stop and exit are defined by the day's own prices, so there are few numbers to tune, and because the time exit removes a whole class of data problems. When the test is done, the trade list tells you directly which days the hypothesis held and which it did not. The detailed rules and settings are in the guide to the opening range breakout strategy and how to backtest it.
What tools and data do you need to start?
A retail quant setup needs four things: clean historical bar data for the market you trade, backtesting software that models fees, slippage and next-bar execution, a validation method such as walk-forward analysis, and a trading platform to run the exported rules. Each block hands its result to the next in a fixed order.
| Block | What it must do | Check before moving up |
|---|---|---|
| Historical bar data | Cover the market, resolution and session you will trade, as a continuous contract (a series that joins one futures contract to the next so you can test across years) | No missing sessions, one time zone, roll days handled, no price spikes the market never traded |
| Backtesting software | Apply the rule bar by bar with commission, slippage and next-bar execution; test many variants with the same settings | Costs set before the first run; the trade list opens and can be read trade by trade |
| Validation | Hold back unseen data, run walk-forward analysis, keep every result on record | In-sample and out-of-sample results shown separately; dropped variants still recorded |
| Trading platform | Run the exact rule that was tested, from exported source code | Live trades match the tested logic: same session, same stop, same time exit |
For the search step, software that generates and tests rule variants from your parameter ranges and constraints replaces hand-written variants; AlphaPrime (Valynox) does this with strategy generation, which works from rules and indicators, parameter ranges, entry and exit conditions and search constraints you set. For the last block, the research software should export the strategy as source code for the platform you trade on; AlphaPrime exports strategy source code to MultiCharts (PowerLanguage), TradingView (Pine Script v6), TradeStation (EasyLanguage), NinjaTrader (NinjaScript), MetaTrader 4 (MQL4) and MetaTrader 5 (MQL5), and the full list is on the platform export page. Data is the block most often skipped by beginners and the one that is hardest to fix later, so start there.
How do you know the first result is not just luck?
A backtest result is only evidence after it survives data the search never used and after you account for how many variants you tried. Compare in-sample with out-of-sample behaviour, and treat a big gap between them as the signal to go back to the hypothesis. The out-of-sample and walk-forward checks in AlphaPrime strategy validation run against thresholds you choose, so a big in-sample versus out-of-sample gap is judged by the same rule for each variant.
In-sample data is the part of the history you used to choose the rule and its parameters. Out-of-sample data is the part you held back and looked at only once, after the rule was fixed. Think of a student who has seen the exam questions in advance: a high score tells you little. The out-of-sample period is the exam the student did not see. A rule that only fitted the past shows a steep in-sample equity curve and a flat or falling out-of-sample curve. That gap is what sends the work back to the hypothesis.
Hypothetical example
The range breakout is tested on eight years of data: six years in-sample, two years out-of-sample. In-sample it takes 600 trades with an average trade of +6 points after costs. Out-of-sample it takes 200 trades with an average trade of +5 points. The trade count per year is similar and the average trade is similar, so the behaviour carried over. A second variant with a tuned minimum-range filter shows +11 points in-sample but +0.5 points out-of-sample, below the 1.5-point cost. The second variant fitted the past; it goes back to the hypothesis stage, not back for more tuning.
The second check is the number of variants you tried. Bailey and co-authors (2014) showed that when enough parameter combinations are tested on the same data, some of them will show an excellent in-sample record by chance alone, and the best in-sample result is then expected to do worse out-of-sample. Harvey and Liu (2015) argue that the bar a backtest must clear should rise with the number of strategies tested to find it. Your written record from the earlier section is what makes this count possible. The practical steps are covered in overfitting in strategy generation.
What this means if you use AlphaPrime: the workflow in this article is the order AlphaPrime is built around. AlphaPrime evaluates each generated candidate with fees, slippage and next-bar execution, runs walk-forward analysis and other validation checks with thresholds you set, and keeps every result in the strategy databank, so the written record of what was tried exists without extra effort.
Frequently asked questions
Is quantitative trading the same as algo trading?
No. Algorithmic trading (程式交易) means a program places the orders according to a rule, whatever the source of the rule. Quantitative trading (量化交易) means the rule itself was chosen by testing it on historical data. Most quantitative traders also automate execution, so the two overlap in practice, but an automated rule that was never tested is not quantitative.
Do I need to know programming to do quantitative trading?
You need to be able to state a rule exactly and read a trade list, but you do not have to write code by hand. Strategy-research software can generate and test rule variants from the ranges you set and export the result as source code for a trading platform. Programming helps when you want to test something the software does not offer.
What is a quantitative trading strategy?
A quantitative trading strategy is a fully specified rule: what data it reads, when it enters, where the stop is, when it exits, and what it costs to trade, with each part chosen because a test on historical data supported it. A session-range breakout with a stop at the other side of the range and an exit at the session close is one example. The strategy type (trend, breakout, mean reversion) does not make it quantitative; the testing does.
What does a quantitative trader do all day?
Most of the day goes to checking data, running and reviewing tests of rule variants, and writing down what was tried and why. Watching live prices is a small part. In a firm these tasks are split among a researcher, a data engineer, compute staff, a risk manager and a trader; a retail trader does the same tasks alone with software and a checklist.
Can a retail trader do quantitative trading alone?
Yes, with four building blocks: clean historical bar data for the market you trade, backtesting software that includes costs and next-bar execution, a validation method such as walk-forward analysis, and a trading platform that runs the tested rule. Start with a simple strategy with two or three parameters and a time exit, and keep a written record of every variant you test.
References
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.

