PyTorch implementation of Asset Allocation: From Markowitz to Deep Reinforcement Learning.
Asset allocation is an investment strategy that aims to balance risk and reward by constantly redistributing the portfolio's assets according to certain goals, risk tolerance, and investment horizon. Unfortunately, there is no simple formula that can find the right allocation for every individual. As a result, investors may use different asset allocations' strategy to try to fulfill their financial objectives. In this work, we conduct an extensive benchmark study to determine the efficacy and reliability of a number of optimization techniques. In particular, we focus on traditional approaches based on Modern Portfolio Theory, and on machine-learning approaches based on deep reinforcement learning. We assess the model's performance under different market tendency, i.e., both bullish and bearish markets.
The repository contains two files:
- DeepRL.py -> The reincorcement environment for asset allocation and its fucntions
- main.ipnyb -> The Jupyter notebook
To use the code, we only need to run the main.ipnyb
notebook. Note that you might need to installl thrid party libraries such as stable_baselines3, pandas_datareader and pyfolio.
We acknowledge the official code FinRL & Stock-Trading-Environment
@article{durall2022asset,
title={Asset Allocation: From Markowitz to Deep Reinforcement Learning},
author={Durall, Ricard},
journal={Available at SSRN 4148379},
year={2022}
}