deepdow
is a framework that focuses on portfolio optimization via end-to-end deep learning. Its goal is to facilitate research of networks that perform weight allocation in one forward pass.
The name of the packages is inspired by the father of technical analysis—*Charles Dow*.
As described by Markowitz [MARK1952], portfolio optimization is commonly divided into 2 separate stages:
- Creation of beliefs about the future performances of securities
- Finding optimal portfolio given these beliefs
One extremely popular example of this two stage paradigm is:
- Estimation of expected returns μ and covariance matrix Σ
-
Solving a convex optimization problem, e.g. μTw − γwTΣw such that w > 0 and
${\bf 1}^T \textbf{w}=1$
Commonly, these two steps are absolutely separated since they require different approaches
- Predictive modeling (statistics + machine learning)
- Objective function and constraints design
Not surprisingly, one needs to use totally different tools. Below are some examples from the Python ecosystem.
numpy
,pandas
,scikit-learn
,statsmodels
,tensorflow
,pytorch
, ...cvxpy
,cvxopt
,scipy
, ...
deepdow
strives to merge the above mentioned two steps into one. The fundamental idea is to construct end-to-end deep networks that input the rawest features (returns, volumes, ...) and output asset allocation. This approach has multiple benefits:
- Hyperparameters can be turned into trainable weights (i.e. γ in
2nd stage <traditional>
) - Leveraging deep learning to extract useful features for allocation (rather than just prediction)
- Single loss function
- MARK1952
Markowitz, H. (1952), PORTFOLIO SELECTION. The Journal of Finance, 7: 77-91. doi:10.1111/j.1540-6261.1952.tb01525.x