Algo Trading
A Python Package for Optimal Mean Reversion Trading
From portfolio construction to optimal execution
In this new python package called Machine Learning Financial Laboratory (mlfinlab) developed by Hudson & Thames, there is a module that automatically solves for the optimal trading strategies (entry & exit price thresholds) when the underlying assets/portfolios have mean-reverting price dynamics.
It covers a few mean-reverting models, including the Ornstein-Uhlenbeck (OU) model. The trading model and computations are based on the results from this journal article.
The module includes three main steps: