What is Backtesting a Trading Strategy?

Share on Facebook0Tweet about this on Twitter0Share on LinkedIn0Share on Google+0

How to Backtest Trading Strategy?

It is a process of testing a trading hypothesis/strategy on prior time periods. Instead of applying a strategy for the time period forward (to judge performance), which could take years, a trader can simulate his or her trading strategy on relevant past data.

For example, say, a trader wants to test a strategy based on the notion that Internet IPOs outperform the overall market. If you were to test this strategy during the dotcom boom years in the late 90s, the strategy would outperform the market significantly. However, trying the same strategy after the bubble burst would result in dismal returns. The maxim ‘past performance does not necessarily guarantee future returns’ has to be kept into consideration while backtesting.

Keys Decision for Backtesting

  1. Choose the Market/ Asset Segment one intend to trade
  2. Data to cover variety of market conditions
  3. Platform to code and test the trading strategy
  4. Evaluate the system on benchmark parameters

Process of Backtesting

One can build a model using of Excel VBA and test it later with R (if needed). Apart from this, testing on simulator can give insight into the problems faced during execution of a strategy. Stimulator behaves like an exchange which can be configured for various market conditions. For simulator testing the implementation of testing system would require additional knowledge for C++/java.

Since some of the people are not from technical background and do not have requisite amount of coding experience, however, coding experience do assist in advising team in a better fashion.

Platforms Used for Backtesting

Apart from Excel VB, a quick backtesting software for certain kind of strategies (for mainly technical trading) can be done using special platforms such as Amibroker, Tradestation and Ninja Trader. Amibroker has a good range of technical indicators while the benefit of TradeStation is that its coding language is very English like. NinjaTrader uses the very widely used and exquisitely documented C# programming language and the DotNet Framework.

Typical Backtesting Parameters to Evaluate a Trading System

  1. Total P/L
  2. Average P/L
  3. Success Ratio
  4. Maximum Draw down
  5. Sharpe Ratio

Sharpe is ratio encapsulate risk/reward for a strategy and frequently applied in context of judging performance of hedge funds and mutual funds.

Next Step

After understanding basics of backtesting you can start learning backtesting using excel sheets. Here is a more technical article on Backtesting Long Short Moving Average Crossover Strategy using an excel spreadsheet.

Share on Facebook0Tweet about this on Twitter0Share on LinkedIn0Share on Google+0

One thought on “What is Backtesting a Trading Strategy?

  1. […] Python library for trading applications and to create an event-driven system that can support both backtesting and […]

Leave a Reply

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