Giter Club home page Giter Club logo

deep-reinforcement-learning-in-trading's Introduction

Deep Reinforcement Learning for Trading

This repository provides the code for a Reinforcement Learning trading agent with its trading environment that works with both simulated and historical market data. This was inspired by OpenAI Gym framework.

This repository has the Keras implementation of

Code for agents

Article about this project

gif

Requirements

  • Python 3.5/3.6
  • Keras
  • Tensorflow

Workflow

Architecture

Features

  • 3 Reinforcement learning Agents (DQN, DDQN, DDDQN)
  • ADX and RSI technical indicator and extensible for more
  • Historical stock market data ingestion through CSV

Policy

State

[𝐴𝐷𝑋(𝑑), 𝑅𝑆𝐼(𝑑), 𝐢𝐢𝐼(𝑑), π‘π‘œπ‘ π‘–π‘‘π‘–π‘œπ‘›, π‘’π‘›π‘Ÿπ‘’π‘Žπ‘™π‘–π‘§π‘’π‘‘ π‘Ÿπ‘’π‘‘π‘’π‘Ÿπ‘›]

Action

The agent could take three actions – Buy, Sell or Hold

Reward

The reward objective is set to maximize realized PnL from a round trip trade. It also includes

  • Trading commision (penalty)
  • Holding fee (penalty), like the interest brokers charge for overnight levereg position. These rewards are what controls and optimize the agents during the training phase that determines the trading behavior. The latter 2 parameters control the trading frequncy of the agent.

What's next?

  • Prioritized Experience Replay
  • LSTM networks
  • Asynchronous Advantage Actor-Critic (A3C)
  • Multi-agent
  • Reward engineering

deep-reinforcement-learning-in-trading's People

Contributors

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