Trading Courses

Options Trading Course - Profiletraders.

Why A Trader Must Do Backtesting of Any Trading Strategy in 2021?

Updated: Mar 31

Most people I admired a decade ago have quit trading.


Less than 5% of my trading inspirations are still in the market. This is a terrible fact.


Trading is an emotional game. If a trader cannot control his emotions, then he tends to commit mistakes.


Then, how to control emotions?


There are many ways – but the #1 method is to develop high conviction on your trading setup.


And Backtesting is the only way to increase your conviction on the trading setup.


How to Backtest a Trading Strategy - Profiletraders.in

What is Backtesting?


Backtesting is a process of analyzing the performance of a trading strategy with historical data. Traders use the results to compare, fine-tune trading strategies to get the maximum benefits in live trading.


In backtesting, three parameters are essential to evaluate the performance of a trading strategy:

  1. Success Rate

  2. Risk-Reward Ratio

  3. Maximum Drawdown

3-steps of backtesting

Success Rate – It is the ratio between the winners and losers. For example, out of 10 trades, if 8 trades are successful and 2 are failed trades. Then the success ratio is 80%. There is an 80% chance that the trade based on this strategy will become a winning trade in simple words.


Risk-Reward Ratio – 'Success Rate' alone is insufficient to measure a trading system's efficiency because a trading system can lose money even after having an 80% success rate if the failed trades lose more money than money made in the winning trades.


In simple words, the risk-reward ratio is the average of the money in losing trades compared to the average of the money made in winning trades.


Suppose the average of the money in losing trades is 1000 and the average of the money in winning trades is 2000, then the risk-reward Ratio is 1:2.


Maximum Drawdown – Again, 'Success Rate' and 'Risk-Reward Ratio' will not measure a trading system's performance. Because trading is filled with emotions, and whenever a trader loses money, he gets a lot of emotions in his mind, and at some point, he will lose trust and confidence in the trading system.


Hence maximum drawdown plays a crucial role from a trading psychology perspective.


Maximum Drawdown is nothing but a maximum loss from a peak to the bottom level of a portfolio before it establishes another new peak.


Suppose a trader starts with 1,00,000 trading capital. He uses a trading strategy of his own. At one point, his balance gone down to 80,000 before going up to 1,50,000.


In this case, the Maximum Drawdown is 20%.


A beginner can read Top-10 Trading and Investing Books if he is not aware of any good trading strategies.


How Backtesting Works?


Traders use backtesting to test and compare various trading techniques before taking trades in the live market.


The logic is straightforward. If a trading technique shows better results with the historical data, then there is a high probability of performing better in the future (vice-versa is also true).


Backtesting Logic

If a trading system shows poor results, then the trader has two choices – 1) Discard it entirely and look for another trading system, or 2) Fine-tune the same system until it shows the better results.


A good trading system will show positive expectancy. For example, if a system displays a 50% success rate, 1:2 Risk-Reward, and 20% Maximum Drawdown, it is a better system as it showed positive expectancy.


Please note, the market will never move in the same passion. However, there is a higher probability that a trading technique behaves in the same way in the long run. Besides, backtesting a trading system and taking trades in the live market is far better than taking trades without logic.


Types of Backtesting


There are two types of backtesting:

  1. Manual backtesting

  2. Automated backtetsing


In manual backtesting, a trader opens the charts and looks at the probable trade setups as per his trading system with the past data. Then he will mark all the essential parameters like entry, exit, stop-loss, risk, reward in an excel sheet. In the end, he will arrive at the overall success rate, risk-reward by averaging the details collected in manual backtesting.


In automated backtesting, traders will use some software or tool (Python, Amibroker) to perform the work. The advantage of this mode is we can get the results in a few seconds. But one has to learn the coding to define their strategy to the software/tool.


Typical Parameters to Evaluate in Backtesting


One has to record many parameters to assess the performance of a trading system. Below are essential parameters:

  • Scrip Name

  • Entry Date/Time

  • Entry Price

  • Stop-loss

  • Exit Date/Time

  • Exit Price

  • Risk-Reward


Note – For positional system use 'Entry Date' and 'Exit Date,' and for intraday system use 'Entry Time' and 'Exit Time.'