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.

Challenge: Train test with other tickers

Challenge: Train test with other tickers - Python Tutorial

From the course: Practical Python for Algorithmic Trading

Challenge: Train test with other tickers

- [Instructor] In this new challenge, you will learn why we should always run the backtest on data not seen by the model. Otherwise, we would incur in the problem of over fitting. At the end of the challenge, you will produce these plots one for the training set and the other for the test set to interpret which are the differences between these two sets on the backtest, and which are the implications. But before getting to these plots we should run these lines of code. In this case, we are working with the META stock. We run these lines to filter the dates, create the new target column, drop the missing data and then in the machine learning section we should select the target and explanatory variables. And by the time we want to train, test and split the data. We should think that all of the machine learning algorithms are within sklearn. So from sklearn. and because this is an algorithm to select the best possible model…

Contents