Rui-RanYu / DRL_GBI

The code and related work of my project - combining (deep) reinforcement learning and goals-based investing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DRL_GBI

The code and related work of my project - combining (deep) reinforcement learning and goals-based investing

This project has been selected as a top project among the Spring 2020 Business graduation projects.

A brief can also be found on the Hanlon Lab website: https://fsc.stevens.edu/combining-deep-reinforcement-learning-and-goals-based-investing/

Code Design for DDPG

About:

Until now, I have uploaded the code for DDPG of a single goal. I mainly use Stable_Baselines to implement DDPG, and customize an environment following the gym interface, to solve this specified portfolio optimization problem in retirement planning. Through setting step length, I can adjust the weight periodically.

Usage:

Run "main_ddpg.py" and see the results. Or just check the file 'results' to see my plot quickly. I use Callback to monitor my training and load the best_model to plot the results.

Datasets:

Given the suggestion of Dr.Homescu, I use a portfolio including:

4 stocks index: iShares Russell Mid-Cap ETF, iShares Russell Top 200 ETF, S&P 500 Index and SPDR MSCI Emerging Markets UCITS ETF

2 bond index: Bloomberg Barclays Global High Yield Total Return Index Value Unhedge, Bloomberg Barclays Municipal Bond Index Total Return Index Value Unhedge USD

From the Sharpe Ratio, I think this portfolio is better than before. In the following, I need to add more components to optimize this portfolio, such as some alternative investment index.

Visualization:

Run the SixtyHourProj in folder DDPG to achieve interactive visualization. I add and modify the new subtabs of tabs Data, Analysis One, ResultsTwo and Summary. In the plot, I add additional cash 0.1(after normalization) and adjust weights monthly during 10 years when setting the initial value as 1. So in the practical, if the initial value is $10,000 and add $1,000 every month, the portfolio value after 10 years will be $234,400.

Or quickly check the link below: https://swen1.shinyapps.io/Viz_Shiny_Modules/

Contribution:

This project is a group task. I corporated with another teammate to complete it.

I mainly responsible for:

  1. Literature review

  2. Data selection and portfolio construction

  3. Data process

  4. Optimize reward function

  5. Research useful packages in Python

  6. Implement DDPG by using Stable_Baselines library

  7. Data visualization

  8. Modify and polish the final report

About

The code and related work of my project - combining (deep) reinforcement learning and goals-based investing


Languages

Language:R 86.7%Language:Python 13.3%