• Stars
    star
    643
  • Rank 70,000 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

High Frequency Trading Price Prediction using LSTM Recursive Neural Networks

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.

More Repositories

1

cuda-cuckoo-hashing

An efficient data-parallel algorithm for building large hash tables of millions of elements in real-time using cuckoo hashing technique.
Cuda
9
star
2

Introduction-To-Machine-Learning-And-Data-Mining

All scripts and exercises for "Introduction to Machine Learning and Data Mining" course at DTU
MATLAB
7
star
3

CUDA-smart-pointers

Very simple implementation of smart pointers for CUDA
C++
6
star
4

GpuTimeSeriesCompressionOptimizer

TIME SERIES COMPRESSION OPTIMIZER ON GPU USING CUDA
C++
3
star
5

coevolutionary-tic-tac-toe-learning

Coevolutionary artificial intelligence learning algorithm for TicTacToe game with N x N board using Neural Networks.
R
3
star
6

NeuralNetwork-pybrain

Simple neural network implementation in python using pybrain for regression and classification problems
Python
2
star
7

ImpProgLang2015

Simple imperative language interpreter written in F#
F#
2
star
8

time-series-data-manager

C++ library for reading and writting time series data
C++
2
star
9

buildroot-rpi-linsw

Linux on embedded systems configurations and packages for course LINSW in Technical University of Warsaw
CSS
1
star
10

mini-gpu-cluster

Gpu Cluster Configuration on MINI WUT
Shell
1
star
11

Computer-Graphics-DTU

Exercises and OpenGL learning from DTU course of Computer Graphics
C
1
star
12

TwitterSentimentAnalysis

All the scripts from DTU course "Introduction to Data Mining using Python"
TeX
1
star
13

mpi-matrices

Project for High Performance Computing for MiNI Warsaw University of Technology
C++
1
star
14

CorpoGameApp

A sample application for booking table football written using .NET CORE
C#
1
star