From the course: Practical Python for Algorithmic Trading
Unlock the full course today
Join today to access over 23,400 courses taught by industry experts.
Walk forward validation in machine learning - Python Tutorial
From the course: Practical Python for Algorithmic Trading
Walk forward validation in machine learning
- [Instructor] Let's imagine for a second that we have a data set whose rows start at the beginning of 2016 and they finish at the end of 2022, which are the different algorithms that we can use to evaluate our investment strategy? In previous tutorials we covered the train test split where we choose a splitting point to separate the data between the training set, the blue area, and the test set, the yellow area, based on all the time range. In this tutorial we are introducing the walk-forward validation, both anchored and unanchored. The walk-forward divides the data in a specific number of splits. In this example is five, and you can see that for the anchored walk-forward the first split we separate the data at the end of 2017 and take 2018 as the validation set to evaluate our investment strategy. As you may observe we get an error of 9.4, and in the third split to validate for 2020 we get 33 as the error, which is…
Contents
-
-
-
-
-
-
-
(Locked)
Why machine learning models overfit the data4m 21s
-
(Locked)
How to train models within the backtest2m 47s
-
(Locked)
Challenge: Train test with other tickers3m 5s
-
(Locked)
Walk forward validation in machine learning8m 31s
-
(Locked)
Anchored walk forward validation in backtesting5m 36s
-
(Locked)
Create library for backtesting strategies2m 50s
-
(Locked)
Interpret reports from walk forward validation approaches1m 12s
-
(Locked)
Challenge: Walk forward with other tickers5m 2s
-
(Locked)
-