GithubHelp home page GithubHelp logo

nwihardjo / rl-trading-agent Goto Github PK

View Code? Open in Web Editor NEW
26.0 7.0 10.0 49.27 MB

Direct Reinforcement Learning Agent for Portfolio Management Purposes

Jupyter Notebook 98.95% Python 1.02% Shell 0.02%
technical-analysis portfolio-management pytorch reinforcement-learning

rl-trading-agent's Introduction

Reinforcement Learning Trading Agent

The repository contains implementation of an attempt to train RL agent to trade in the financial market using a Deep Direct Reinforcement Learning model through Technical Analysis methodon the data to provide more robust framework on top of the data using minute-based HKEX market data. Refer to the UROP_1100_Report.pdf for detailed explanation.

The RL agent and its environment is defined in the ./model/ directory, the data is in ./data/ directory, and scripts for pre-processing the data is present in the ./data_wrangling/ directory.

Detailed documentation is provided on README.md in each folder and its corresponding files.

Usage

To use and train the model, refer to the 3 notebooks where the model is trained on 3 different dataset. Refer to the DRL_BOC+CNOOC.ipynb for the most updated and refactored code with its documentation.

To use the your own data, replace and edit the data in the ./data/ directory.

Dependencies

Using conda package manager, build the environment with environment.yml:

$ conda env create -f environment.yml

Or without conda:

  • Python 3.6
  • TA-Lib >= 0.4.17. On some machines, underlying TA-Lib library should be installed in advance before installing using pip or other package manager. Refer here for the predecessor library.
  • Pytorch >= 0.4.1
  • tqdm >= 4.28.1
  • pyfolio >= 0.9.0
  • seaborn
  • numpy
  • pandas
  • jupyter notebook
  • and other basic packages.

Installation

Clone the repo, and build virtual environment using conda for easier installation through the using the step above.

Important note: this project utilises TA-Lib library for python (Technical Analysis) as a part of the knowledge discovery on the data. It requires the predecessor TA-Lib library to be installed on your machine before the TA-Lib library for python can be installed properly (i.e. using pip install talib or conda).

To install predecessor TA-Lib, refer here.

Contributor

Reference

rl-trading-agent's People

Contributors

hanifdean avatar nwihardjo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.