Giter Site home page Giter Site logo

farzantabrizi / timeseries2dbarchartimagecnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from omerbsezer/timeseries2dbarchartimagecnn

0.0 0.0 0.0 299 KB

Conversion of the time series values to 2-D stock bar chart images and prediction using CNN (using Keras-Tensorflow)

Python 65.14% Java 34.86%

timeseries2dbarchartimagecnn's Introduction

TimeSeries2DBarChartImageCNN: Financial Trading Model with Stock Bar Chart Image Time Series with Deep Convolutional Neural Networks

CNN-BI

"In this study, we developed an out-of-the-box algorithmic trading strategy which was based on identifying Buy-Sell decisions based on triggers that are generated from a trained deep CNN model using stock bar chart images. Almost all existing strategies in literature used the stock time series data directly or indirectly, however in this study we chose a different path by using the chart images directly as 2-D images without introducing any other time series data. To best of our knowledge, this is the first attempt in literature to adapt such an unconventional approach. The results indicate that the proposed model was able to produce generally consistent outcomes and was able to beat BaH strategy depending on the market conditions."

Method

image

Generated Images

image

Sample Result:

image

Phases in the algorithm:

Conversion of the time series values to 2-D stock bar chart images and prediction using CNN. Numpy, Pandas, Tensorflow and Keras libraries are used to implement algorithm.

  1. Download stock historical data from "finance.yahoo.com" (there is example files in \data directory).
  2. Run sol.py to create training and test image files.
  3. Run cnn.py with training.csv and test.csv, and create cnn_result file with prediction, price and ground-truth data.
  4. Evalute with evaluateFinancial.java

Paper Link: https://arxiv.org/pdf/1903.04610.pdf

Note: If you are using code or idea from paper, please refer to this paper.

Bibtex:

@article{sezer2019financial,
  title={Financial trading model with stock bar chart image time series with deep convolutional neural networks},
  author={Sezer, Omer Berat and Ozbayoglu, Ahmet Murat},
  journal={arXiv preprint arXiv:1903.04610},
  year={2019}
}

timeseries2dbarchartimagecnn's People

Contributors

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