Giter Club home page Giter Club logo

limit_orderbook_prediction's Introduction

Limit Order Book(L2) Prediction

This repo trys to predict price jumps from features derived from L2 order book information.

Order book information contains ask, bid prices and corresponding quantities at each level.
Note! price jumps : current bid price > previous bid price (within short period of time)

orderbook_info

  1. Example JuypterNotebook-Rnn
  2. "./data" contains sample data from upbit, tick-tick information of L2 orderbook (KRW-ADA)
  3. features are from https://github.com/dzitkowskik/StockPredictionRNN/blob/master/docs/project.pdf

features

Getting Started

from nn import NeuralNetwork
from rnn import RNN

timestep = 50
n_cross_validation = 3
# for order book info only
data = data_prep.get_test_data(timestep, predict_step=5, filename="upbit_l2_orderbook_ADA")

# input_shape <- (timestep, n_features)
# output_shape <- n_classes
nn = NeuralNetwork(RNN(input_shape=data.x.shape[1:], output_dim=data.y.shape[1]), class_weight={0: 1., 1: 1., 2: 1.})

print("TRAIN")
nn.train(data)

print("TEST")
nn.test(data)

print("TRAIN WITH CROSS-VALIDATION")
nn.run_with_cross_validation(data, n_cross_validation)

Prerequisites

keras, tensorflow, sklearn, nuumpy, pandas ...

pip install -r requirements.txt

Impements LSTM / Conv2DLSTM

[LSTM]https://github.com/miroblog/limit_orderbook_prediction/blob/master/rnn.py
[CNN-LSTM] https://github.com/miroblog/limit_orderbook_prediction/blob/master/cnn_lstm.py
lstm convolutional

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

limit_orderbook_prediction's People

Contributors

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