Walk-Forward Optimization Task

From GM-RKB
(Redirected from Walk-Forward Optimization)
Jump to navigation Jump to search

A Walk-Forward Optimization Task is a optimization task for a timeseries study.



References

2022

  • (Wikipedia, 2022) ⇒ https://en.wikipedia.org/wiki/Walk_forward_optimization Retrieved:2022-9-8.
    • Walk forward optimization is a method used in finance to determine the optimal parameters for a trading strategy. The trading strategy is optimized with in-sample data for a time window in a data series. The remaining data is reserved for out of sample testing. A small portion of the reserved data following the in-sample data is tested and the results are recorded. The in-sample time window is shifted forward by the period covered by the out of sample test, and the process repeated. Lastly, all of the recorded results are used to assess the trading strategy.

      After the most suitable parameters are found, the system is run using another segment of data. The two segments of data do not overlap each other.It is the culmination of the following methods and aids in creation of robust systems.

      Past data is used for Backtesting of a trading system. It refers to applying a trading system to historical data to verify how a system would have performed during the specified time period and is useful if a system was not profitable in the past.

      Forward testing (also known as Walk forward testing) is the simulation of the real markets' data on paper only. One moves along the markets live and is not using real money, but virtually trading in the markets to understand their movements better. Hence, it is also called Paper Trading. Forward performance testing is a simulation of actual trading and involves following the system's logic in a live market.


2017

  • Jason Brownlee. (2017). “How To Backtest Machine Learning Models for Time Series Forecasting." December 19, 2016 in Time Series
    • QUOTE: ... There are few decisions to make:
      1. Minimum Number of Observations. First, we must select the minimum number of observations required to train the model. This may be thought of as the window width if a sliding window is used (see next point).
      2. Sliding or Expanding Window. Next, we need to decide whether the model will be trained on all data it has available or only on the most recent observations. This determines whether a sliding or expanding window will be used.
    • After a sensible configuration is chosen for your test-setup, models can be trained and evaluated.
      • Starting at the beginning of the time series, the minimum number of samples in the window is used to train a model.
      • The model makes a prediction for the next time step.
      • The prediction is stored or evaluated against the known value.
      • The window is expanded to include the known value and the process is repeated (go to step 1.)
    • Because this methodology involves moving along the time series one-time step at a time, it is often called Walk Forward Testing or Walk Forward Validation. Additionally, because a sliding or expanding window is used to train a model, this method is also referred to as Rolling Window Analysis or a Rolling Forecast.

2013

  • (Ładyżyński et al., 2013) ⇒ Piotr Ładyżyński, Kamil Żbikowski, and Przemysław Grzegorzewski. (2013). “Stock Trading with Random Forests, trend detection tests and force index volume indicators." In International conference on artificial intelligence and soft computing.
    • QUOTE: ... A classical approach for the model validation is to divide data into three parts used for training, testing and validation. However, this schema is not valid for the financial data where face non-stationary time series. For such class of problems the so-called walk forward analysis can be applied. Its goal is to minimize the curve fitting on the out-of-sample data by shifting the moving window. The window is divided into two subsets. First [math]\displaystyle{ oW L }[/math] examples are used for estimating the model. Next, the model is tested on the data consisted of [math]\displaystyle{ t WL }[/math] samples. After that, the moving window is shifted by the [math]\displaystyle{ t WL }[/math] samples and the next iteration begins. The whole process is illustrated in Figure 1, where DFL denotes the data feed length while TW means the testing window. ...

       

      Ładyżyński et al., 2013 Figure 1: Walk forward analysis

      ...