How an algorithmic trading strategy gets built
you won't build strategies — but knowing how they're built is how you can spot a weak one.
Most retail traders running algo strategies don't build them — they evaluate and run strategies built for them. Understanding how an algorithmic trading strategy gets built can make you a significantly better evaluator of the ones you choose. You'll know what a backtest can and can't tell you, why a live track record matters more than a simulated one, and what questions to ask when a strategy looks too good to be true.
Step 1 — The hypothesis
Every strategy starts with a belief about market behavior. Not a guess — a reasoned thesis about why a particular pattern should exist and persist.
The "why" matters. This hypothesis has a rational basis: institutional investors gradually increase positions in winners, and it takes time for new information to be fully priced in. A hypothesis with a clear reason to exist is more likely to hold up when conditions change than one that simply found a pattern in historical data without any underlying logic.
The first practical decision is which asset class to target. Asset classes are categories of financial instruments — equities (stocks), futures, forex, crypto, options, fixed income — each with different liquidity, costs, and market behavior. This strategy targets equities because the momentum effect is well-documented there, historical data is deep, and monthly rebalancing is straightforward. The same hypothesis applied to forex or crypto would behave very differently.
Step 2 — Defining the rules
Once the hypothesis is defined, an algorithmic trading strategy needs a precise, executable set of rules. Every detail must be specified — what to buy, when, how much, when to sell.
These rules are complete and unambiguous. Given the same data, two different programmers would produce the same trades. That's the standard a rule-based strategy needs to meet before any testing begins. A quant would then choose a programming language and code the rules before running them against historical data — the language varies depending on their background and the strategy's requirements.
Step 3 — Backtesting
The rules are run against historical market data to simulate how the strategy would have performed. A backtest isn't trading — it's replay.
These results are hypothetical and do not represent actual trading performance. They were generated by applying strategy rules retroactively to historical market data. Hypothetical results were prepared with the benefit of hindsight and have inherent limitations: they do not reflect actual trades executed, actual returns to any investor, or the full impact of real-world execution costs, liquidity constraints, or market conditions. Although transaction cost assumptions are stated above, actual results may differ materially. A strategy’s live performance may be higher or lower than its backtested results. Past performance — including hypothetical past performance — is not indicative of future results. These figures are presented for educational purposes only and do not constitute investment advice or a recommendation to use this or any other strategy.
These are gross numbers — before costs. Every trade incurs spread costs, slippage, and commission. This strategy generates roughly 200 trades per month; those costs compound. After realistic cost assumptions, the CAGR drops from 16.2% to around 12.8%. A well-built backtest models all of this explicitly — a backtest that ignores costs is not credible.
Step 4 — Overfitting & validation
A well-built strategy is one of the most rigorous financial products that exists. Every assumption tested. Every number measured against real markets. That's what a live track record represents.
After seeing the backtest results, the temptation in algorithmic trading development is to improve them — try an 8-month lookback instead of 12, try the top 15% instead of 20%, add a filter. Each change improves the historical numbers. But with enough adjustments, any strategy can be made to look perfect on past data. This is overfitting — and it's the most common reason strategies that look great in backtests fail in live markets.
The defense is out-of-sample testing: develop the strategy on one period of data, then validate it on a separate period it was never exposed to during development.
The performance figures in the table above are hypothetical and do not represent actual trading results. They were generated by applying the described strategy rules retroactively to historical market data and are subject to the following limitations:
- Prepared with hindsight.
- These results were prepared knowing the outcome of the period under analysis. This is not possible in live trading and constitutes a material limitation of any backtested result.
- Not actual performance.
- No actual trades were executed. These figures do not represent returns achieved by any investor. Results may differ materially from what would have been achieved in practice.
- Costs and execution.
- Although transaction cost and slippage assumptions are noted above, hypothetical results may not fully reflect the impact of all trading costs, liquidity constraints, partial fills, or market impact of actual trade execution.
- No guarantee of future results.
- Past performance — including hypothetical past performance — is not indicative of future results. Market conditions change, and a strategy that performed well historically may perform materially differently in the future.
- Educational purpose only.
- These figures are presented solely to illustrate how backtesting works as a concept. They do not constitute investment advice, a recommendation to use this or any other strategy, or a projection of expected returns.
Some degradation is expected and normal. A modest, consistent decline — typically 20–30% degradation from in-sample to out-of-sample — is more consistent with a real edge than a collapse, which typically suggests overfitting.
Step 5 — Paper trading
Before real capital is deployed, the strategy runs on live market data with simulated capital. Wick paper trades every strategy to validate its behavior before it is offered. You paper trade to validate it for your own parameters, account size, and risk tolerance. The same strategy can look very different depending on how it's sized and run.
Paper trading catches things backtests miss: execution timing differences, data feed quirks, and edge cases that historical data didn't contain. It also answers the question that no backtest can: would you actually hold through this drawdown if it were real money?
Step 6 — Going live
backtests are a story. live track records are receipts.
Real capital, real execution, real costs. Slippage, fills, and market conditions that no backtest fully captures. The live track record — not a simulation, not a model, but what actually happened in real markets — is what separates a strategy worth running from one that only looked good in testing.