Skip to content

CodeSlinger0110/Deep-RL-for-Automated-Stock-Trading

Repository files navigation

Deep-RL-for-Automated-Stock-Trading

Deep Reinforcement Learning methods for facilitating Automated Stock Trading.

This project implements a Stock Trading Bot, trained using Deep Reinforcement Learning. Implementation is kept simple, Stable baselines has been used for implementation of RL algorithms.

Reinforcement Learning

image

Reinforcement learning (RL) is an area of machine learning concerned with how intelligent agents ought to take actions in an environment in order to maximize the notion of cumulative reward.Reinforcement learning is one of three basic machine learning paradigms, alongside supervised learning and unsupervised learning.

Stable-Baselines

Stable Baselines is a set of improved implementations of Reinforcement Learning (RL) algorithms based on OpenAI Baselines.

image

image

image

Implementing A2C ALgorithm

A2C is a policy gradient algorithm and it is part of the on-policy family. That means that we are learning the value function for one policy while following it, or in other words, we can’t learn the value function by following another policy. We will be using another policy if were using experience replay for example, because by learning from too old data, we use information generated by a policy (ie. the network) slightly different to the current state.

image

On each learning step, we update both the Actor parameter (with policy gradients and advantage value), and the Critic parameter (with minimizing the mean squared error with the Bellman update equation)

Data

You can download Historical Financial data from www.Marketwatch.com for training. We have used data of Apple and DogeCoin for Training.

Training

image

We used data of Apple Stocks for a period of one year.

Here, Red indicates Short SELL, Green indicates Short BUY.

Evaluation

image

The Model predicted the Stock Prices for next 50 days.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published