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

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