Coder Social home page Coder Social logo

chetanmehra / stockpredictionrnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dzitkowskik/stockpredictionrnn

0.0 1.0 0.0 4.15 MB

High Frequency Trading Price Prediction using LSTM Recursive Neural Networks

License: MIT License

Python 100.00%

stockpredictionrnn's Introduction

GitHub license

StockPredictionRNN

High Frequency Trading Price Prediction using LSTM Recursive Neural Networks

In this project we try to use recurrent neural network with long short term memory to predict prices in high frequency stock exchange. This program implements such a solution on data from NYSE OpenBook history which allows to recreate the limit order book for any given time. Everything is described in our paper: project.pdf

Project done for course of Computational Intelligence in Business Applications at Warsaw University of Technology - Department of Mathematics and Computer Science

Data

To use this program one has to acquire data first. We need file openbookultraAA_N20130403_1_of_1 from NYSE. It can be downloaded from ftp://ftp.nyxdata.com/Historical%20Data%20Samples/TAQ%20NYSE%20OpenBook/ using FTP. Unzip it and copy to folder src/nyse-rnn.

Installation and usage

Program is written in Python 2.7 with usage of library Keras - installation instruction To install it one may need Theano installed as well as numpy, scipy, pyyaml, HDF5, h5py, cuDNN (not all are actually needed). It is useful to install also OpenBlas.

sudo pip install git+git://github.com/Theano/Theano.git
sudo pip install keras

We use numpy, scipy, matplotlib and pymongo in this project so it will be useful to have them installed.

sudo pip install numpy scipy matplotlib pymongo

To run the program first run nyse.py to create symbols and then main.py (creating folder symbols is necessary):

cd StockPredictionRNN
cd src/nyse-rnn
mkdir symbols
python nyse.py
python main.py

To save data to mongodb one has to install it first mongo install

Look into the code, it may be necessary to uncomment some lines to enable different features.

Performance

To use CUDA and OpenBlas create file ~/.theanorc and fill it with this content:

[global]
floatX = float32 
device = gpu1

[blas]
ldflags = −L/usr/local/lib −lopenblas

[nvcc]
fastmath = True

License

The MIT License (MIT)

Copyright (c) 2016 Karol Dzitkowski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

stockpredictionrnn's People

Contributors

dzitkowskik avatar tk365 avatar

Watchers

James Cloos 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.