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.
Why machine learning models overfit the data - Python Tutorial
From the course: Practical Python for Algorithmic Trading
Why machine learning models overfit the data
- [Instructor] Imagine that today is the 20th of May, 2021. We know what happened with the stock of Microsoft when it acquired LinkedIn in 2016 until today. We already know how the investment strategy performs, which gives us a return of over 500%. And now, we would like to apply this investment strategy in the future until the 15th of March, 2023. We would've thought that the returns we'd expect is 500% or proportional to the times that we have, but we end up getting 10%, which is way lower than could have been expected. Why is this happening? Well, the machine learning model that predicts what will happen tomorrow was trained from 2016 until 2021. If we evaluate the model in the same period of time, they already know what happens. So it's likely that they will have a better performance than in the future whose data is unknown for the model. And that's why we get poorly results. In conclusion, every time that you are…
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)
-