Optimization? Learning? Control?

AI for portfolio management: from Markowitz to Reinforcement Learning

The evolution of quantitative asset management techniques with empirical evaluation and Python source code

Alexandr Honchar
Sep 28, 2019 · 12 min read
Image for post
Image for post
This is how we’d like them to grow https://investresolve.com/blog/category/diversification/
Image for post
Image for post
Just in case you don’t know what it is :)

Classical optimization

Markowitz efficient frontier

Image for post
Image for post
Efficient frontier visualization: https://investinganswers.com/dictionary/h/harry-markowitz

Custom objectives

Image for post
Image for post
Minimal variance portfolio optimization function
Image for post
Image for post
The maximum diversification portfolio optimization function
Image for post
Image for post
Equal risk contribution portfolio optimization function

Unsupervised learning

Eigenportfolios

Image for post
Image for post
An illustration of different principal components of a portfolio: https://systematicedge.wordpress.com/2013/06/02/principal-component-analysis-in-portfolio-management/

Autoencoder risk

Image for post
Image for post
A visualization of the general idea behind autoencoder neural networks: https://sefiks.com/2018/03/21/autoencoder-neural-networks-for-unsupervised-learning/

Hierarchical risk parity

Image for post
Image for post
Geometrically, a covariance matrix of the assets in the portfolio is a complete graph (on the left), can we figure out a tree-based model that will be more optimal?
Image for post
Image for post
A high-level description of the hierarchical risk parity (HRP) portfolio optimization algorithm

Supervised learning

Forecasting weights

Image for post
Image for post
https://www.sciencedirect.com/science/article/pii/S0378437107001938

Reinforcement learning

Deep Q-learning

Image for post
Image for post
An illustration of a reinforcement learning agent to decide when to enter or leave the position https://hackernoon.com/the-self-learning-quant-d3329fcc9915

Evaluation in the wild

ETF dataset

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Minimal Variance, Maximal Returns and Maximal Sharpe portfolios (click on image to zoom)
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Maximal Decorrelation, PCA and HRP portfolios (click on image to zoom)
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Smoothing forecasting, Autoencoder, and RL agent portfolios (click on image to zoom)

Cryptocurrencies dataset

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Minimal Variance, Maximal Returns and Maximal Sharpe portfolios (click on image to zoom)
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Maximal Decorrelation, PCA and HRP portfolios (click on image to zoom)
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Smoothing forecasting, Autoencoder, and RL agent portfolios (click on image to zoom)

Results discussion

Image for post
Image for post
Statistics of the portfolios on the ETFs dataset
Image for post
Image for post
Statistics of the portfolios on the cryptocurrencies dataset

A not on HRP

Image for post
Image for post
Image for post
Image for post
HRP performance on the more diversified portfolio. As we can see, in this case, it allocates weights over all the assets

A note on Reinforcement Learning

Other approaches

Conclusions

The Startup

Medium's largest active publication, followed by +773K people. Follow to join our community.

Alexandr Honchar

Written by

Co-founder of consulting firm Neurons Lab and advisor to AI products builders. On Medium, I write about proven strategies for achieving ML technology leadership

The Startup

Medium's largest active publication, followed by +773K people. Follow to join our community.

Alexandr Honchar

Written by

Co-founder of consulting firm Neurons Lab and advisor to AI products builders. On Medium, I write about proven strategies for achieving ML technology leadership

The Startup

Medium's largest active publication, followed by +773K people. Follow to join our community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app