Git Product home page Git Product logo

reinforcement-learning-for-portfolio-allocation's Introduction

Reinforcement-learning-for-portfolio-allocation

Optimistic Bull or Pessimistic Bear: Adaptive Deep Reinforcement Learning for Stock Portfolio Allocation

If you feel that our code is helpful to you, please cite our paper:

Xinyi Li, Yinchuan Li, Yuanchen Zhan, Xiao-Yang Liu, "Optimistic Bull or Pessimistic Bear: Adaptive Deep Reinforcement Learning for Stock Portfolio Allocation," International Conference on Machine Learning (ICML) Workshop on AI in Finance, May 2019.

Please follow the instructions below to run the code:

Prerequisites

Python 3.6 envrionment

Anaconda3

Tensorflow

OpenMPI

Installation of system packages OpenMPI

Install gym under tensorflow

pip install gym

Download Official Baseline Package and install it

git clone https://github.com/openai/baselines.git cd baselines pip install -e . ```

Find the following files and change the address in the files into your address

./gym/envs/init.py ./gym/envs/portfolio/ portfolio_env.py ./gym/envs/portfolio/ portfolio_testenv.py

Baseline

  • Find your baselines folder, and replace it with baseline in this repository

Gym

  • Find your gym folder, and replace it with gym in this repository

Code description

./baselines/baselines/run.py used for train or test ./baselines/baselines/common/cmd_util.py used for parameter configuration ./baselines/calculate_table.py used for generating data for Table 1 in paper ./baselines/plot_financial.py used for generating figure for Figure1 in paper ./baselines/plot_property.py used for generating figure for Figure 5 and Figure 6 in paper

reinforcement-learning-for-portfolio-allocation's People

Contributors

yinchuanll avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.