From the course: Practical Python for Algorithmic Trading

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

First configurations of the strategy class

First configurations of the strategy class - Python Tutorial

From the course: Practical Python for Algorithmic Trading

First configurations of the strategy class

- [Instructor] In this tutorial we will use the machine learning model that we computed before to create an investment strategy that will be summarized in this table. You can see the returns of a 300000%. Now, which lines of code did we write to come up with this table? Let's find out. The first thing that we need to do is to load the model which is on the models folder, model_dt, classification pickle. The only difference that we have now is that we are reading the file. We are not writing the file as we did in the previous tutorial. Instead of using the function dump, we use the function load. We save the model in a variable model_dt and when we execute the variable, we can see the decision tree classifier we computed before. Now we load the dataset of the Microsoft stock and we need to think about how to implement the investment strategy. We will use the back testing later and the object that we will do the…

Contents