From the course: Practical Python for Algorithmic Trading

Unlock the full course today

Join today to access over 23,800 courses taught by industry experts.

Smart optimization to save computing time

Smart optimization to save computing time - Python Tutorial

From the course: Practical Python for Algorithmic Trading

Smart optimization to save computing time

- [Instructor] In the previous tutorial we performed the grid search optimization where some of the values of limit buy and limit sell were constrained to have bad results. To save computing time, we could perform a smart search where we strategically select the limit sell and limit buy that gives the best results based on numerical methods. Without further ado, let's uncover the lines of code that will get us to the smart search. We first load the machine learning model then we load the dataset we run the cells to create the back testing class to create the strategy class that we also did in the previous tutorial, the back testing and now the important part optimizing the back testing with multiple combinations. In this case, we establish the limit buy from zero to 10 limit sell from minus 10 to zero to maximize the returns. To perform the smart search we need to set a specific method. If we look at the documentation…

Contents