Cryptocurrency Limit Order Books: On predicting price movements using neural networks

No Thumbnail Available

URL

Journal Title

Journal ISSN

Volume Title

Perustieteiden korkeakoulu | Master's thesis

Date

2024-03-12

Department

Major/Subject

Applied Mathematics

Mcode

SCI3053

Degree programme

Master’s Programme in Mathematics and Operations Research

Language

en

Pages

66

Series

Abstract

Cryptocurrency markets share similarities with both foreign exchange and equity markets. Cryptocurrencies are traded against other currencies on exchanges which rely on a matching engine and a limit order book to match buy and sell orders. When an incoming order cannot immediately be matched with another, it is entered into the limit order book. Usually limit order books are public, frequently updated, and dynamic, which makes them a rich data source for research. It has been observed that order flow can be predictive of an asset's price. In this thesis, we study limit order books and use order data to predict the direction of change in the midprice of bitcoin. Our data consists of BTCUSD spot market limit order book snapshots from two time periods, one of which was relatively volatile and the other relatively stable. We apply a neural network model called DeepLOB to the two datasets and predict the direction of change in the midprice one time step into the future. The DeepLOB model achieves similar accuracy on our cryptocurrency data as it has previously achieved on equity limit order book data. We found that the model trained on the less volatile dataset had good performance on test data from both time periods. The model trained on the more volatile dataset performed well on its test data, but had poor accuracy on the test data from the more stable period. The results indicate that the DeepLOB model can capture patterns in cryptocurrency limit order books and is able to use them to forecast the direction of price changes.

Kryptovaluutat kuten bitcoin ovat merkittävä rahaan liittyvä innovaatio. Kryptomarkkinoissa on piirteitä sekä valuutta- että osakemarkkinoista. Kryptovaluuttoja vaihdetaan pörsseissä, joissa kaupankäynti perustuu tilauskirjaan ja algoritmeihin, joilla kaupat toteutetaan. Tilauskirja on yleensä avoin, tiuhaan päivitetty ja dynaaminen, mikä tekee tilauskirjoista hedelmällisiä aineistoja tutkimukselle. Empiirisissä tutkimuksissa on havaittu, että omaisuuserän hinnan muutoksia voidaan ennakoida pörssiin saapuvien tilauksien perusteella. Tässä diplomityössä tutkitaan tilauskirjoja ja käytetään tilauskirjadataa bitcoinin keskihinnan muutosten suunnan ennustamiseen. Työtä varten kerättiin dataa bitcoinin ja Yhdysvaltain dollarin välisen spot-kurssin markkinalta kahdelta eri ajanjaksolta. Yhdellä ajanjaksolla hinnan vaihtelu oli suurta, toisella vuorostaan suhteellisen vähäistä. Aineistoihin sovitettiin DeepLOB-neuroverkkomalli, jolla ennustettiin keskihinnan muutoksen suuntaa yksi aika-askel tulevaisuuteen. DeepLOB-mallilla saavutettiin ennustustarkkuus, joka on verrattavissa aiemmin saavutettuihin tuloksiin, kun mallia on sovellettu osakkeiden tilauskirjadataan. Vähäisemmän hintavaihtelun aineistoon sovitettu malli saavutti tasaiset tulokset molempien ajanjaksojen testidatalla. Suuremman hintavaihtelun aineistolla koulutettu malli saavutti hyvän tarkkuuden saman ajanjakson testidatalla, mutta ei tasaisemman ajanjakson testidatalla. Työn tulokset viittaavat siihen, että DeepLOB kykenee mallintamaan kryptovaluuttojen tilauskirjoja ja ennustamaan keskihinnan muutoksen suuntaa hyvällä tarkkuudella.

Description

Supervisor

Ilmonen, Pauliina

Thesis advisor

Ilmonen, Pauliina

Keywords

cryptocurrency, limit order book, time series forecasting, convolutional neural network, long short-term memory

Other note

Citation