A backtest is a check of a trading strategy on historical data to see whether it made money in the past. It helps you judge whether a system has an edge before you risk real money. But the main trap of a backtest is self-deception through curve fitting, when a strategy describes the past perfectly and then fails in live trading.
A backtest is sold to beginners as a way to find a no-lose strategy, and that is the first mistake. I treat a backtest as a useful but treacherous check: it answers "did this work before", not "will it work next". Let's go through what a backtest is, how it is done, and how not to fool yourself with a pretty curve on history.
In this article we'll cover:
- a backtest checks a strategy on past data to judge its edge before real trades;
- it can be done manually on the chart or automatically on dedicated platforms;
- the main danger is overfitting: the strategy is tuned to history and stops working;
- past results do not guarantee future ones, so a backtest needs a forward check on demo or a small account.
Let's start with what a backtest is and why you need one.
What is a backtest and why it matters
Backtest — a check of a trading strategy on historical market data, meant to judge whether it was profitable in the past and how steadily it worked. Put simply, you run your rules over history that has already happened and look at the result.
A backtest exists for one important job: to check whether your strategy has an edge before you take it to a live account. If the entry and exit rules gave a steady plus over a large chunk of history, that is a reason to look at the system more seriously. If they steadily lost, it is better to learn that on history for free than to pay for the lesson with real money. In essence a backtest is a way to weed out hopeless ideas and see whether the system has a positive expectancy. What a trading system is and what it consists of I cover separately.
In short: a backtest runs your entry and exit rules over past history to see whether the system has a positive expectancy, before you risk real money; it is a filter for ideas, not proof of future profit.
How to backtest: manual and automated
There are two ways to backtest, and each has its place. A manual backtest is when you scroll the chart back and check your strategy trade by trade, marking where the entry, the stop and the exit would have been. It is slow, but you see with your own eyes how the strategy behaves in different conditions, feel it better, and notice at once where it breaks.
An automated backtest is running the rules on a dedicated platform that computes the result over all of history in seconds. It is fast and covers a huge amount of data, but it has a flip side: the easier it is to spin the parameters, the stronger the temptation to fit them to a perfect picture. That is exactly how an automated backtest connects to trading bots: a bot's pretty curve is usually drawn by that very fitting. I would advise a beginner to start with a manual backtest; it is slower but more honest, and it teaches you to understand the market rather than to tweak numbers. This isn't personal advice, it is just how I would do it.
In short: start with a manual backtest, scroll the chart and check trade by trade, it is more honest; the automated one is fast, but the easier it is to spin the parameters, the stronger the temptation to draw a pretty curve by fitting.
The biggest backtesting mistakes: overfitting and self-deception
The main backtest mistake is overfitting, also called curve fitting. When you spin a strategy's parameters until you get a perfect curve on past data, you are not finding a working system; you are just describing the past that already happened. On new data the strategy has never seen, that fit falls apart, because the market does not repeat history literally. The more tightly a strategy sits on the past, the worse it usually works in the future.
There is a simple defense against fitting. Split the history into two parts: build and tune the strategy on one, and check the result on the second, which you never touched. If the strategy is also in the plus on the untouched data, that is a serious sign. If the plus was only where you spun the parameters, you are looking at classic overfitting. This out-of-sample check separates a real edge from an illusion more reliably than any pretty curve. As a rough guide, a backtest resting on a handful of trades proves nothing; you want a sample large enough and varied enough to include trends, ranges and at least one sharp shock.
There are other traps too. Testing on too short a stretch of history that did not capture different market phases. Ignoring commissions and slippage, which turns paper profit into a live loss. Watch for look-ahead bias too, where the test quietly uses information that would not have been available at the time, which flatters the curve in a way live trading never will. And the most common, psychological: the wish to see in a backtest a confirmation of what you already believe. So a backtest is not a final verdict but only a first filter. After it, a forward check is a must: running the strategy on new data, on a demo or a small live account, where it can no longer be fitted. Why a positive expectancy, not a pretty history, decides the result I show on live accounts in my video on expectancy in trading. The math of a system and the calculation itself I cover in the course section on the math and calculation, and building a plan in the piece on the trading plan.
In short: split the history in two, tune the strategy on one part and check on the second untouched part; if the plus is only where you spun the parameters, that is overfitting, and after a backtest always run a forward check on a demo or small account with commissions and slippage.
Frequently Asked Questions
It is a check of a trading strategy on past market data. You run your rules over history that has already happened and see whether there was a profit. It helps weed out hopeless ideas before real trades.
No. Past results do not guarantee future ones, because the market does not repeat history literally. Fitting parameters to the past is especially dangerous: on new data such a strategy usually stops working.
It is tuning a strategy's parameters to history until the curve looks perfect. The strategy then describes the past instead of finding a real edge, and falls apart on new data. The tighter it sits on history, the worse it works ahead.
A forward check: run the strategy on new data it has not seen, on a demo or a small live account. There it can no longer be fitted, so it is an honest test of the edge, with commissions and slippage included.
About the Author
Igor Arapov — independent researcher in the psychology of investment decisions and behavioral finance, a practising trader since 2013, founder of arapov.trade, author of a series of trading books (Open Library), (ORCID: 0009-0003-0430-778X).




