Journal of Investment Strategies

Correctness of backtest engines

Robert Löw, Stanislaus Maier-Paape and Andreas Platen

  • We provide unit tests to be able to ensure correctness of backtest software.
  • Correctness is ensured for order setups like limit buy order combined with stop loss.
  • We find all possible backtest results on candle data for non-unique situations.
  • We hint to algorithmic considerations to allow for a fast implementation of unit tests.

In recent years, several trading platforms have appeared that provide a backtest engine to calculate the historic performance of self-designed trading strategies on underlying candle data. The construction of an accurate backtest engine is, however, a subtle task, as shown in previous work by Maier-Paape and Platen. Several platforms are struggling to achieve accuracy. We discuss how the accuracy of backtest engines can be verified and provide models for candles and intra-period prices, which may be applied to conduct a “proof of correctness” for a given backtest engine when our tests on specific model candles are successful. Further, we suggest algorithmic considerations in order to allow a fast implementation of the tests necessary for the proof of correctness.

Sorry, our subscription options are not loading right now

Please try again later. Get in touch with our customer services team if this issue persists.

New to View our subscription options

If you already have an account, please sign in here.

You need to sign in to use this feature. If you don’t have a account, please register for a trial.

Sign in
You are currently on corporate access.

To use this feature you will need an individual account. If you have one already please sign in.

Sign in.

Alternatively you can request an individual account here