/first-child

My first project (and also Bachelor's thesis project) on Deep Reinforcement Learning for Portfolio Optimization

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

Python Matplotlib NumPy Pandas scikit-learn TensorFlow

First Child Project: Deep Q-Learning for Portfolio Optimization

Hi folks, this is my first serious (and a little bit complex) project about Reinforcement Learning for financial applications. Moreover, this is also a part of my Bachelor's Degree final thesis on "Forecasting Models and Deep Q-Learning for Portfolio Management", a thesis in which I combine forecasting models and Reinforcement Learning techniques to create an Asset Management bot.

Structure of the Project

The principal file on which you will find the results of my model are in the first_child.ipynb file, while the files in the Python directory contained functional modules for defining a custom Trading Environment for portfolio management and creating a custom D3QN Model.

In the Jupyter Notebook file you can find the project that contains original images useful to visualize and explain the work. After the problem definition section, the file is divided in two sections:

  1. Data Analysis and Benchmark Creation: the secton in which I select the assets to use, analyse the correlation between the assets and their past returns...

Assets Return Charts

... and select the two benchmarks to compare to agent results using a Montecarlo simulation.

Montecarlo Simulation and Efficient Frontier

  1. Agent Training: the section in which I preprocess input features, train the model and expose the results of my study.

New Efficient Frontier

Conclusion

To give a slight spoiler, the model has generated promising results, but additional tests need to be done to verify its effectiveness. Moreover, I am working to implement the part on traditional forecasting models in the code to improve the model's metrics.