Carefully! Lots of text.

Backtest plays an important role in optimizing interaction with financial markets. It allows you to test trading strategies and evaluate the consequences of their use.

What does a backtest of a simple investment strategy look like? What should you be wary of when testing trading strategies? What is the difference between backtest and paper trading? About everything in our article.

 

Introduction

A backtest is a tool for exploring new markets and strategies that can provide valuable information and confirm or refute assumptions about the effectiveness of a trading strategy.

Regardless of the asset class, a backtest does not involve risk by any means. It comes down to using software to test a strategy in a simulated environment, giving you the ability to create and optimize your approach to the market. Let's look at this in more detail.

 

What is a backtest?

From a financial point of view, a backtest helps evaluate the effectiveness of a trading strategy by demonstrating the results of similar strategies in the past. If the backtest shows good results, traders or investors can apply the strategy in a live environment.

But what does good results mean? The purpose of a backtest is to analyze the risks and potential profitability of a specific strategy. An investment strategy can be optimized using statistical data to maximize potential results. A good backtest can also ensure that the strategy is at least viable when implemented in a trading environment.

You can use a backtesting platform or tool to ensure that the strategy is viable or not too risky. If the backtest results indicate that the strategy is ineffective, abandon it or optimize it. However, it is important to consider the market conditions in which the strategy being tested is applied, since a backtest may produce inconsistent results if they change.

At a more professional level, backtesting trading strategies is absolutely necessary, especially for algorithmic trading strategies (automated trading).

 

How does a backtest work?

The basic idea behind testing is that if a strategy has worked in the past, it can work in the future. However, determining effectiveness can be very difficult because what works well in one market environment may not work in another.

For backtesting, it is important to use reliable sources of information, since incorrect data will lead to incorrect results. This is why it is critical to find a good sample that reflects the current market environment despite changing market conditions.

Before testing a strategy, it is necessary to formulate the purpose of the backtest. Make sure the strategy is effective? Or, on the contrary, find a refutation of its effectiveness? If you know the answers to these questions in advance, the results may be inconclusive.

A backtest should take into account trading and withdrawal fees, as well as any other costs associated with the strategy. It's worth noting that backtesting software can be quite expensive, as can access to reliable market data.

To access historical data using the Binance Futures platform, fill out the application form.

Remember that backtesting is a way of testing, so as with technical analysis and charting, there is no guarantee that a strategy will be profitable, even if historical data suggests otherwise.

 

Backtest example

Let's look at a simple long-term strategy for Bitcoin.

Our trading system is as follows:

  • We buy Bitcoin as soon as the 20-week moving average chart begins to rise.

  • We sell Bitcoin as soon as the 20-week moving average chart begins to move down.

This strategy produces only a few signals per year. Let's look at the time period starting from 2019.

Bitcoin weekly chart since 2019.


We see that the strategy gave five signals:

  • Buy ~$4000

  • Sell ​​~$8000

  • Buy ~$8500

  • Sell ​​~$8000

  • Buy @ ~$9000

 

So, the backtest results suggest that the strategy would be profitable. Does this provide any guarantee? No. It just means that given a particular set of data, the strategy would have been profitable. The data obtained can be taken as a guide for decision making.

Keep in mind that we looked at less than two years of data, which isn't always sufficient. To create an effective strategy, you will need more information about price movements over several years.

Thus, a backtest is an excellent start to the implementation of any strategy. With its help, you can adjust your investment strategy, collect more data on metrics and technical indicators to ensure the reliability of your signals. It all depends on the ideas, investment timing and willingness to take risks.


➟ Do you think where to start working with cryptocurrencies? Buy Bitcoin on Binance!

 

Backtest and paper trading

We now have an understanding of the backtest and its application to a simple investment strategy. However, the success of a strategy in the past does not guarantee its success in the future.

How to optimize a systematic strategy for current market conditions without risking real funds? Forwardtest, or paper trading, will help us with this.

Paper trading is an imitation of a strategy in a real trading environment. It is called paper because, although transactions are documented and recorded, no real funds are used. That is, transactions take place only on paper. This method allows you to improve your strategy and get an idea of ​​its effectiveness.

Where to begin? Binance Futures testnet is the perfect place to test strategies in real time without financial risk. You can get started right now: simply create an account and test your strategies in the same environment as if you were trading the real-time markets.

It is important here not to draw hasty conclusions and fully rely on the system data. The purpose of the forward test is to test the effectiveness of the strategy in real time. Therefore, if the system prompts certain actions, agree to them. If you start choosing trades based on personal biases, testing a systematic strategy will be invalid.

 

Manual and automatic backtest

Manual backtesting involves analyzing charts and historical data, as well as manually placing trades. An automated backtest does the same thing using computer code (using programming languages ​​like Python or specialized backtesting software).

Many traders use Google or Excel spreadsheets as reports to evaluate the effectiveness of a strategy. Documents can take into account all sorts of information such as trading platform, asset class, trading period, number of successful and unsuccessful trades, Sharpe ratio, maximum drawdown, net profit and much more.

The Sharpe ratio is used to evaluate the potential return on investment (ROI) of a risk-adjusted strategy. The higher the Sharpe ratio, the more attractive the investment or trading strategy.

The maximum drawdown is the point at which a trading strategy performs worse than the last peak.

 

Summary

Many systematic traders and investors rely heavily on the results of backtesting - one of the most important tools for working with algorithms.

At the same time, interpreting the results of a backtest in isolation from personal biases can be quite difficult. Remember that a backtest is just one stage of creating effective trading strategies, used to test ideas and monitor the market situation.