Résumé
Backtesting can be an important step in optimizing how you interact with financial markets. It helps you know if your trading ideas and strategies make sense and if they can potentially generate profits.
But what does backtesting a simple investment strategy look like? What should you pay attention to when testing trading strategies? Is backtesting similar to paper trading? We will answer all these questions in this article.
Introduction
Backtesting is a tool that you (as a trader or investor) can use to explore new markets and strategies. It can provide valuable data-driven feedback and tell you whether your initial idea was valid.
No matter what asset class you trade, backtesting does not require you to risk losing your hard-earned funds. By using backtesting software in a simulated environment, you can create and optimize a particular approach to a market. This is what we will see now.
What is backtesting?
In finance, backtesting allows you to evaluate the viability of a trading strategy by testing how it would have performed based on historical data. You use past market data to see how a strategy would have worked. If backtesting performs well, traders or investors can move on to the next phase and apply the strategy to a real-world environment.
But what do good results mean in this case? Well, the purpose of a backtesting tool is to analyze the potential risks and profitability of a particular strategy. The investment strategy can be optimized and improved based on statistical returns to maximize potential results. A well-performed backtest can also ensure that the strategy is at least viable when implemented in a real trading environment.
Naturally, a backtesting platform or tool can also be useful in proving that a strategy is not viable or too risky. If the backtesting results indicate suboptimal performance, the trading idea should be ignored or modified. However, it is also important to consider the market conditions in which the test takes place. The same backtesting can present conflicting results when market conditions change.
On a more professional level, backtesting trading strategies is absolutely essential, especially when it comes to algorithmic trading strategies (i.e. automated trading).
How does backtesting work?
The underlying principle of backtesting is that what worked in the past might work in the future. However, this can be really complicated to determine. What works well in one particular market environment may not work in another.
Making a purchase at the wrong time is surprisingly easy, and it can lead to very bad results. This is why it is essential to find a good statistical sample for the backtesting period that reflects the current market environment. This can be particularly difficult because the market is constantly changing.
Before you decide to backtest a strategy, it can be helpful to determine exactly what you want to know. What would make the strategy viable? Conversely, what would contradict your hypotheses? If you have the answers to these questions before you start, it will be harder for the results to affect your biases.
Backtesting should also include trading and withdrawal fees, as well as any other costs the strategy may incur. It's also worth noting that backtesting software can also be quite expensive, as can access to high-quality market data.
If you would like to have access to historical data on the Binance Futures platform, please complete this request form.
And keep in mind that backtesting is testing. Like technical analysis, there is absolutely no guarantee that your strategy will work, even if it produces excellent results based on historical data.
Exemple de backtesting
Let's review a simple long-term strategy for Bitcoin.
Here is our trading system:
We buy Bitcoin at the first weekly close above the 20-week moving average.
We sell Bitcoin at the first weekly close below the 20-week moving average.
This strategy only produces a few signals per year. Let's look at the period from 2019.

Weekly Bitcoin chart since 2019.
The strategy produced five signals within the time frame tested:
Buy @ ~$4,000
Selling at ~$8,000
Buy @ ~$8,500
Selling at ~$8,000
Buy at ~$9,000
Thus, our backtesting results show that this strategy would have been profitable. Does that mean it's a guarantee that it will continue to work? No. This simply means that by looking at this specific data set, the strategy would have generated a profit. This result can be considered as an approximate result.
Remember, we only looked at less than two years of data. If we would like to turn this into an actionable strategy, it may be worth going back in time and testing it with more trading data.
That said, it's a promising start. Our initial idea seems to be good, and perhaps we can create an investment strategy based on it with additional optimization. Perhaps we would like to include more technical measurements and indicators to make the signals more reliable? It all depends on individual ideas, investment horizon and risk tolerance.
➟Do you want to get started with cryptocurrencies? Buy bitcoins on Binance!
Comparison of backtesting and paper trading
We now have a rough idea of what backtesting can look like and we've looked at a very simple investment strategy. However, past performance does not reflect future results.
So how can we optimize a systematic strategy to fit current market conditions? We could try it in a real market, but without risking real funds. This method is also known as future performance testing or paper trading.
Paper trading is the simulation of a strategy in a real trading environment. This is called paper trading because although trades are documented and logged, no actual funds are used. This gives you an additional step that will allow you to improve the strategy and get an idea of its performance.
That's great, but where to start? The Binance Futures testnet is the perfect place to test strategies here and now, but without risking your funds. You can create an account in minutes and test strategies in an environment similar to real-time markets.
You have to be careful about “pecking”. This involves selecting only a subset of data to confirm a biased point of view. The starting point for testing is to test the strategy as if it were a real-time test. If the system tells you to do something, do it. If you only choose trades that look “good” based on your personal bias, the systematic strategy test will not be valid.
Manual or automatic backtesting
Manual backtesting involves analyzing charts and historical data and manually placing trades according to the strategy. Automated backtesting is essentially the same, but the process is automated by computer code (using programming languages like Python or specialized backtesting software).
Many traders use Google or Excel spreadsheets to evaluate a strategy's performance. These documents function like strategy tester reports. They can include all kinds of information, such as trading platform, asset class, trading period, number of winning and losing trades, Sharpe ratio, maximum loss, net profit, etc.
In short, the Sharpe ratio helps assess a strategy's potential return on investment relative to its risks. The higher the value of the Sharpe ratio, the more attractive the investment or trading strategy.
The maximum loss represents the moment when your trading strategy had the worst performance compared to the last peak (i.e. the largest percentage decline in your portfolio during the analyzed period).
To conclude
Many systematic traders and investors rely heavily on backtesting for their strategies. It is one of the essential instruments in an algo trader's toolbox.
At the same time, interpreting test results can be complicated. It is easy to incorporate your own biases into the backtesting method. Backtesting alone probably won't create viable trading strategies, but it will help you test some ideas and stay in tune with the market.
