Static Versus Walk-Forward Curve Fitting

Introduction

This article provides an overview of static versus walk-forward optimization. Trading software applications generally do not enable walk-forward adaptation of indicator parameter values by default. By contrast, BioComp Dakota was designed specifically for the construction of trading systems that adapt moving forward bar by bar. Dakota enables this via the use of swarm adaptation routines.

Static Curve Fitting

The following points describe a problematic and often frustrating scenario. 

  • The analyst builds a trading strategy that makes use of a few technical indicators (data transformations, rules etc.) to output a trading signal.
  • He then applies an optimization process to determine what indicator parameter values have been optimal for a particular market over the last 2 years (modeling period).
  • He then monitors the performance of the system post construction and is, more than likely, disappointed to see that the performance does not resemble the hypothetical performance over the modeling period.

Curve fitting, or function fitting, is not an evil process as some people believe. In fact it is vital to many aspects of life itself. A small book could be written describing the pitfalls with this scenario. I do not want to expand on the subject in this article. Hypothetical performance over the modeling period is, in the majority of cases, unrealistic.

Walk-Forward Curve Fitting

Walk-forward curve fitting can be implemented using various trading software applications and produces more realistic hypothetical trading results. Some trading applications require a significant amount of programming effort to enable walk-forward adaptation because they were not designed for this purpose. The following points describe walk-forward curve fitting at a high level. 

  • The analyst uses the same trading strategy as that used in the static curve fitting process.
  • A lookback period or modeling period of 2 year is used, once again, to determine optimal indicator values.
  • A curve fitting algorithm is applied each trading day over a 5 year hypothetical trading period using the prior 2 years for optimization walking-forward. Data from t (-504) to t(-1) is used to determine optimal indicator parameter values, where t is the trading day that the signal is being generated for. This is repeated for each trading day over the 5 year period. Signals are generated for the last 5 years, so a total of 7 years of data is required.

The adaptive curve fitting process produces hypothetical trading results that are closer to reality. It is worth noting that curve/function fitting occurs at more levels than just the determination of indicator values. Therefore, there is potential for us to fool ourselves on many levels. Some examples of curve fitting that do not involve indicator parameter values follow: 

  • Determination of the system parameter values such as the modeling period and the performance metrics. If the walk-forward simulation is repeated over and over using different modeling periods etc. until optimal system parameter values are determined then curve fitting and possibly over-fitting has occurred.
  • Selection of the trading strategies to apply to a given market. If the analyst evaluates a large set of trading strategies and selects a subset to use then curve fitting and potentially over-fitting has occurred.
  • Selection of the data to use for the simulation. It is possible that the market dynamics that were dominant over the last n years will cease to be dominant over the next year.

How can we avoid further curve fitting? Do everything on a walk-forward basis! Are my modeling procedures 100% walk-forward? No not yet… perhaps the ideal trading system would use one master trading strategy that can be applied successfully to any liquid market where data is available. It would be likely that this master trading strategy would be composed of a number of sub-trading strategies to cater for varying market conditions.

Leave a Reply

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