What Is Quantitative Trading? Rules, Backtests, Data and Pitfalls

Quantitative trading means writing your trading rules as exact, testable instructions, then testing them on past data before risking money. Retail traders can do this with free or low-cost tools, but most backtests overstate results; on the stated hypothetical data below, a 7.8% a year in-sample result fell to 2.1% out of sample.

What quantitative trading is, in one paragraph

Quantitative trading, often shortened to quant trading, is trading from rules that a computer can follow without judgement. Every part is written down: what to buy or sell, when to enter, when to exit, how large the position is, and what to do when the market does something unexpected. Because the rules are exact, they can be run on past prices (a backtest) to see what they would have done, and then run automatically.

The word covers a wide range. At one end are large funds that trade thousands of instruments with statistical models and their own data teams. At the other is an individual who tests one moving-average rule on one index fund in a spreadsheet. Both are quantitative in the same sense: the decision comes from a stated rule, not from a feeling about a chart.

Quant trading does not promise an edge. It gives you a way to find out, cheaply and honestly, that an idea does not work. Most ideas do not.

The four parts of a quantitative strategy

Every systematic strategy has the same four parts, and weakness in any one of them can sink the rest.

Rules. The signal and the position size, stated so precisely that two people would produce identical trades from the same data. 'Buy when the market looks strong' is not a rule. 'Buy at the next open when the close is above its 50-day average' is.

Data. The prices, and sometimes other series, that the rules use. Data must be clean and must include what was actually knowable at the time: adjusted for splits and dividends, and including securities that later disappeared.

Backtesting. Running the rules over past data with realistic costs to see the sequence of trades, the return, and the worst drawdown.

Execution. Turning signals into real orders. This is where spread, slippage, commissions and missed fills enter. A backtest that ignores them is describing a trade nobody could have made.

How retail traders and institutions approach it differently

The difference is mostly scale, data and cost of trading, not cleverness.

Institutions can trade large size at low per-unit cost, buy expensive data, and run many strategies so that no single one matters much. Retail traders usually have one or two strategies, small accounts, higher per-trade costs relative to size, and free or low-cost tools. A rule whose edge is smaller than its trading cost works for neither, but the retail trader hits the cost wall sooner.

What retail traders can do well: trade slowly. A rule that trades a few times a month gives costs little room to eat the result. Daily or weekly rules on liquid index funds and futures are far more realistic for an individual than anything that depends on speed.

What they usually cannot do: compete on latency, or on data that institutions buy and retail traders cannot get.

ItemTypical institutionTypical individual
Holding periodSeconds to monthsDays to months is realistic
DataPurchased, cleaned, point-in-timeFree or low-cost, cleaning is your job
Cost per tradeNegotiated, low per unitRetail commission plus spread and slippage
Number of strategiesMany, diversifiedOne to a few
Main edgeScale, speed, research staffPatience, small size, low overhead

What tools and data cost

You can start with a spreadsheet and free historical prices. Python and R are free programming languages with free libraries for loading prices and running backtests. Free data usually has gaps, and it often lacks delisted securities and exact adjustment history, which matters for reasons covered below.

Real-time data is where costs begin. These are published CME futures data prices for non-professional users, from the brokers' own pages, as confirmed on 18 November 2026: NinjaTrader lists the CME Level 1 bundle as free once your account is funded (US$12 a month otherwise) and Level 2 depth at US$48 a month; AMP Futures lists Level 1 at US$15 and Level 2 at US$45 a month through CQG or Rithmic, plus a US$25 monthly Rithmic connection fee per user ID. Exchanges bill the whole month even if you start partway through. At the site rate of 1.4291 CAD per USD (Bank of Canada, 17 Nov 2026), US$48 a month is about C$69 a month; your card or bank rate decides.

We did not find published prices for professional-grade historical data feeds that we could confirm, so none are quoted here. If you buy historical data, check what it includes: adjustments, delisted names, and timestamps.

Cost itemPublished figureSource type
CME Level 1 bundle, NinjaTraderFree once funded; US$12 a month otherwiseBroker pricing page
CME Level 2 bundle, NinjaTraderUS$48 a monthBroker pricing page
CME Level 1 bundle, AMP FuturesUS$15 a monthBroker data-fee page
CME Level 2 bundle, AMP FuturesUS$45 a month plus US$25 Rithmic connection feeBroker data-fee page
Python, R, spreadsheetsNo licence feeOpen source or bundled

Worked example: one simple rule on stated hypothetical data

This example uses made-up numbers to show the method. It is not a real backtest and says nothing about how any market behaved.

The rule: at each day's close, if the index fund's close is above its 50-day average, hold the fund; otherwise hold cash. Trade at the next open. Assume 10 years of daily data for a hypothetical broad index fund. Split it in two. The first five years are the in-sample period, where you may look at results and adjust the rule. The last five years are the out-of-sample period, which you run once and do not adjust against.

In this hypothetical, the rule earned 9.0% a year in the in-sample period before costs. It made 12 round trips a year. Assume each round trip costs 0.10% of the account (spread plus commission, an assumed figure). Annual cost: 12 x 0.10% = 1.20%. Net in-sample: 9.0% - 1.20% = 7.8% a year.

Out of sample, the same rule, untouched, earned 3.3% a year before costs. Subtract the same 1.20%: 3.3% - 1.20% = 2.1% a year. Buying and holding the fund earned, in this made-up data, 6.0% a year in the same later period, so the rule trailed it.

The lesson is the gap between 7.8% and 2.1%, not the numbers themselves. A result found by looking at past data almost always looks better than what happens next. Only the out-of-sample figure deserves any weight, and even it came from one five-year window.

Period (hypothetical)Gross return a yearCost a year (12 trips x 0.10%)Net return a year
In-sample, years 1-59.0%1.20%7.8%
Out-of-sample, years 6-103.3%1.20%2.1%
Buy and hold, years 6-106.0%NegligibleAbout 6.0%

Overfitting: the biggest trap

Overfitting means the rule has learned the noise in the past data, not a repeatable pattern. It is easy to do without meaning to. Try 100 variations of the moving-average length, the exit rule and the filter, keep the best, and the best will look good partly by luck. Each extra parameter you tune gives the rule more room to fit chance.

Bailey, Borwein, Lopez de Prado and Zhu made this point formally in a 2014 paper in the Notices of the American Mathematical Society, 'Pseudo-Mathematics and Financial Charlatanism': the more variations you test, the longer the backtest must be before its best result means anything. We could not open that paper on 23 November 2026 (the site blocked us), so read it directly rather than relying on this one-line summary.

Practical defences. Keep rules simple, with few parameters. Write down in advance how many variations you tried. Hold back data you do not touch until the end. Test on other markets and other periods. Prefer a rule that works across a wide range of settings over one that works only at a single setting, because a real effect is usually not that fragile.

Look-ahead bias, survivorship bias and costs

Look-ahead bias means the backtest uses information that was not available at the time of the trade. The classic form is using a day's closing price to decide a trade that executes at that same close. Another is using an earnings figure before it was published, or a data series that was later revised. The fix is to timestamp everything and trade only on the next available price.

Survivorship bias means testing only on securities that still exist today. Companies that failed or were delisted are missing, so results look better than a trader at the time would have seen.

Costs and slippage are the third quiet error. A backtest filled at the exact signal price, with no spread, will overstate results for any rule that trades often. For faster rules, compare the backtest with real or simulated fills: our page on simulated versus live fills explains why paper results run better.

A backtest that survives all three checks is still only a hypothesis. Markets change, and a rule that worked can stop working.

A sensible way to start, and who should not

If you want to try this, the order that protects you is: write the rule in one sentence; test it on data you have not looked at; include costs you could actually pay; then trade it on a demo account or at the smallest size for long enough to see whether live results resemble the test. Futures contracts such as the Micro E-mini S&P 500 allow very small positions; see our futures guides for tick values and costs.

Quant trading is a poor fit if you cannot follow a rule when it is losing, if you plan to change the rules after every bad week, or if you want a shortcut to income. It is also a poor fit if you expect to beat firms that trade on speed.

This page is general education, not investment advice. Taxes on trading profits depend on your situation; see the CRA and an accountant.

Frequently asked questions

What is quantitative trading?

Trading from exact, written rules that a computer can test on past data and then run, instead of trading on discretion. The rules cover entries, exits and position size.

Can a retail trader do quantitative trading?

Yes, with a spreadsheet or free programming tools and daily price data. Slower strategies on liquid markets are far more realistic than anything that depends on speed.

What is overfitting in a backtest?

Tuning a rule until it fits the noise in past data. It looks excellent in the test and usually disappoints on new data. Keeping rules simple and testing on unseen data reduces the risk.

What is look-ahead bias?

Using information in a backtest that was not available when the trade would have been placed, such as acting on a closing price at that same close.

Does a good backtest mean I will make money?

No. A backtest is a hypothesis built from the past. Costs, slippage and changing markets all push live results below it.

Sources

Provider documents behind this page, checked November 23, 2026.