Deep learning for limit order book trading and mid-price movement. Some data files are too big to upload. If you want to run the code, you need to download the dataset first.
The data is on https://lobsterdata.com/info/DataSamples.php. Download the level 5 data of Amazon, Apple, Google, Intel, Microsoft.
The "Bechmark" dataset is from this paper: Benchmark dataset for mid-price forecasting of limit orderbook data with machine learning methods. Adamantios Ntakaris, Martin Magris, Juho Kanniainen, Moncef Gabbouj, Alexandros Iosifidis.(2018)
https://onlinelibrary.wiley.com/doi/epdf/10.1002/for.2543
The data is on https://etsin.avointiede.fi/dataset/urn-nbn-fi-csc-kata20170601153214969115. Click the "Access this dataset freely." to download the dataset. (sorry)
Unzip the the data file if needed. Put the files in the "data" folder without subfolders.
More details about the models can be found on the paper: Deep learning for Limit Order Book Trading and Mid-price Movement prediction.
We use two CNN models to predict bid ask spread cross. One for long and one for short.
run main_trading.py
We use a CNN model to predict the mid-price movement.
run main_midprice.py
We use a deep CNN model to predict the mid-price movement.
run main_benchmark.py