Backtesting a Trading Strategy

Overview


Backtesting is the process of simulating a trade strategy on historical data to test how that strategy would have performed over the period in question.

Backtesting Steps


The following represents a summary of the basic steps required to run a backtest.

  • Preparing the Dataset : discusses various methods of preparing a raw dataset for backtesting.
  • Calculating Indicators : shows methods of adding indicators to the price dataset.
  • Calculating Trades : shows how to code an algorithm to calculate trades from a price dataset.
  • Backtest Adjustments : discusses the adjustments to the theoretical backtest which makes it more realistic.
  • Analyzing a Backtest : Once the backtest has been completed, there are several methods to analyze the backtest.
    • Portfolio Performance
    • Individual Trade Statistics

Pre-defined Trade Strategies


Davinci provides some out of the box algorithms for back testing various simple strategies on a price series.

  • Price Action :
  • Portfolio :