Basics of Backtesting

Basics of Backtesting

Testing of any trading strategy is of utmost importance before trading it live. One needs to have a correct idea about the returns and risk the strategy holds for him.

Backtesting is a process by which a strategy is tested on historical data and lets you know the returns it would have generated if that strategy was live traded. A program that is used for backtesting purposes is called a backtesting software or a stock market simulator.
It needs a time frame for which you want to do the testing, the type of orders, i.e. market or limit, the frequency at which the strategy has to be tested, can be 1 minute , 2 minutes, 15 mins or longer time periods, the stocks you want to backtest on and the strategy.

The backtesting software starts testing your strategy at each and every price based on your frequency setting on the stocks selected by you. At the end of the backtesting, it gives you an estimate of the returns that would have been made from live trading that strategy.

Returns of a strategy are not the only parameters that define the quality of the strategy. Parameters like Sharpe ratio, Annualized volatility, maximum drawdown and hit ratio hold prime important also.
There are a few guidelines on backtesting that need to be followed to ensure that the results are reliable.
Minimum simulation period should be at least 1 year.
Strategies having Sharpe ratio > 2 on a simulation period of 2 years are good.
A single strategy won’t function on all the stocks. Different strategies work with different stocks as the movement behavior of each stock is different. A single strategy will not be able to capture all those different behaviors.
It’s better to have a stress test done on the strategy before live trading it. A stress test is a backtesting of your strategy on artificially created data modeled on existing prices. It gives a best and worst case performance of the strategy.

Developing a good algorithmic trading strategy isn’t an easy job and needs patience and perseverance.

Add a Comment

Your email address will not be published. Required fields are marked *