Giter Site home page Giter Site logo

a-multi-layer-and-multi-ensembled-stock-trader-using-deep-learning-and-deep-reinforcement-learning's Introduction

A Multi-Layer and Multi-Ensemble Stock Trader Using Deep Learning and Deep Reinforcement Learning

Abstract

Abstract The use of computer-aided stock trading is gaining popularity in recent years, mainly because of its ability to process efficiently past information through machine learning in order to predict future market behavior. Several approaches have been proposed this task, with the most effective ones using fusion of a pile of classifiers decisions to predict future stock values. However, using prices information only has proven to lead to poor results, mainly because market history is not enough to be an indicative of future market behavior. In this paper, we propose to tackle this issue by proposing a multi-layer and multi-ensemble stock trader. Our method starts by pre-processing data with hundreds of deep neural networks. Then, a reward-based classifier acts as a meta-learner to maximize profit and generate stock signals through different iterations. Finally, several metalearner trading decisions are fused in order to get a more robust trading. Experimental results of index Futures intra-day trading indicate better performance when compared to several other ensemble techniques and the conventional Buy-and-Hold strategy.

Authors:

  • Salvatore Carta
  • Andrea Corriga
  • Anselmo Ferreira
  • Alessandro Sebastian Podda
  • Diego Reforgiato Recupero

Info

This is the source code of the paper "A Multi-Layer and Multi-Ensembled Stock Trader Using Deep Learning and Deep Reinforcement Learning"

In this source code, we offer two datasets from 2 SP500 symbols: JPM and MSFT (please check ./datasets folder). The source code runs JPM, to change for another one, just change DeepQTrading.py and ensemble.py according.

To execute the code, just run ./run_all_experiments.sh in your terminal, and 100 experiments will be done (check section 5.1 of our paper).

After running each experiment, a final pdf will be built with data from RL training and also a final table, showing the final trading results.

Please check source_code_map.png for a better explanation of what each .py file does.

If using our code, dont forget to cite our paper.

a-multi-layer-and-multi-ensembled-stock-trader-using-deep-learning-and-deep-reinforcement-learning's People

Contributors

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

a-multi-layer-and-multi-ensembled-stock-trader-using-deep-learning-and-deep-reinforcement-learning's Issues

Use of GAF in code is not visible

Referring to the article "A multi-layer and multi-ensemble stock trader using deep learning
and deep reinforcement learning" as mentioned in the research paper, use of Gramian Angular Field (GAF) for converting Time Series to image is not visible in your code.

May be this has been dropped out purposely.
Could you please share the code?

help, two datasets are the same

does anyone help me?
as follow:
1- I found that the last fourth columns of the two datasets are the same(date, open, close, delta_next).
But 1000 prediction columns are different. So the two datasets are for one symbol, not for two different symbols as mentioned in the paper.
2- the validation dataset not exists in the dataset folder.
3- delta_next column value is (close-open) for the next day (next row) in the dataset, but this value was used for reward in the current day (current row), I can't understand why next row used for current row.

What the requirements to run the source code ?

i am not sure what is needed in terms of Tensorflow and Keras versions, there is no clarity at all

Tensorflow 2.3+ which already contains keras
Keras_rl ????? ( this library is mostly outdated ) instead tf-agents is much better

Can you be specific on what are the requirements in terms of library versions needed ?

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.