LOB을 이용한 기계학습 주가예측 모형들

1.
HFT가 유행할 때 제품을 만들면 High라는 단어를 넣어서 작명했습니다. Low Latency가 유행일 때는 Low 대신 Zero로 작명을 하였습니다. ZeroAOS도 이런 규칙에 따라 만든 서비스명칭입니다. 빅데이타, 기계시대에 맞는 작명은 무엇일까요? JP Morgan이 발표한 Deep Hedging이나 구글이 만든 DeepMind처럼 Deep이 들어가야 할 듯 합니다. 솔직히 ZeroAOS의 다음버전으로 DeepAOS를 만들고 싶지만 아직까지 손을 대지 못하고 있습니다. C로 만들어진 제품인 ZeroAOS와 Python의 환경을 어떻게 통합할지 고민스럽기 때문입니다.

글 제목에 등장하는 DeepLOB와 DeepFolio도 역시 기계학습을 포함한 개념입니다. DeepLOB는 순전히 LOB=Limit Order Bookt이 들어가서 무언인가 관심이 들어서 찾아보았습니다.

DeepLOB: Deep Convolutional Neural Networks for Limit Order Books

Download (PDF, 625KB)

논문과 관련한 소스는 DeepLOB: Deep Convolutional Neural Networks for Limit Order Books에서 확인할 수 있습니다. 이 논문은 2018년에 발표한 기술의 발번을 놓고 볼 때 좀 오랜 논문입니다. 이 논문은 Forecasting Stock Prices from the Limit Order Book Using Convolutional Neural Networks의 성과를 인용하고 있습니다.

Download (PDF, 213KB)

DeepLOB가 고빈도의 LOB와 CNN을 이용하여 주가를 예측하는데 다른 horizon k를 적용할 때 mid price를 예측을 했고 Linear SVMs과 MLP(Multi layer perceptron)보다 좋은 결과를 보였습니다.

찾아보면 DeepLOB과 유사한 논문이 무척 많습니다. 그럼에도 관심을 가진 이유는 저자인 Zihao Zhang이 Man AHL과 Oxford대학이 공동으로 만든 연구소에서 연구를 하였기때문입니다. 그리고 2021년부터 Man AHL에서 근무를 하고 있습니다. Man AHL은 오래 전부터 기계학습과 관련한 연구를 계속했고 저자도 DeepLOB이후 관련한 연구를 계속하여 관련논문을 계속 발표하였습니다. 먼저 DeepLOB와 베이즈 정리를 결합한 BDLOB를 발표합니다. 이 논문을 보면 앞서 두 논문의 모형인 DeepLOB 및 CNN과 BDLOB의 결과를 비교합니다.

BDLOB: Bayesian Deep Convolutional Neural Networks for Limit Order Books

Download (PDF, 329KB)


다음으로 2019년이후 매매, 포트폴리오, 투자전략으로 이어집니다.

Deep Reinforcement Learning for Trading
Deep Learning for Portfolio Optimisation

Download (PDF, 861KB)


Download (PDF, 1.45MB)

DeepLOB는 CNN + LSTM을 결합한 모델이라고 하면 Transformers for limit order books은 CNN과 Transformer를 결합한 모형으로 TransLOB라고 부릅니다.

In summary, inspired by the wavenet architecture of [24] where dilated causal con-volutions were used to encode long-range temporal dependencies, we use these causalconvolutions to build a feature map for our transformer blocks to act on. We refer to ourspecific architecture as TransLOB. It is a composition of differentiable functions that pro-cess and integrate both local and global information from the LOB in a dynamic relationalway whilst respecting the causal structure.

DeepLOB와 TransLOB를 비교할 결과는 아래와 같습니다.

Download (PDF, 403KB)

DeepFolio도 LOB를 이용한 주가예측모형입니다.

DeepFolio: Convolutional Neural Networks for Portfolios with Limit Order Book Data

DeepLOB처럼 CNN + LSTM을 적용하였지만 손실을 줄이기 위하여 Gated recurrent units (GRU)이라는 개념을 도입한 ResCNN +GRU를 개발하였습니다.


>

이상으로 시험한 결과를 CNN, DeepLOB와 비교한 결과입니다.

Download (PDF, 1.85MB)

2.
이상이 LOB를 이용한 예측모형이라고 하면 MOB를 이용한 모형도 있습니다.앞서 논문을 작성한 Zihao Zhang이 필자입니다.

Deep Learning for Market by Order Data

우선 Market by Order (MBO)는 생소한 단어입니다. CME가 정의한 그림입니다.

정의를 보면 “Market by Order (MBO) describes an order-based data feed that provides the ability to view individual queue position, full depth of book and the size of individual orders at each price level.”라고 합니다. Queue POsition(Queue Order)까지를 포함한 시세정보입니다.Market Mechanics가 정의한 도표를 보면 확실힌 무엇인지를 알 수 있습니다. Order By Order를 모은 시세데이타입니다.

MBO를 이용한 정확도를 다른 모형과 비교하면 어떨까요? 논문에 실린 결과입니다.

도표중 Ensemble은 아래와 같이 정의한 결과입니다.

To verify this statement, we include three ensemble models in our experiment, where Ensemble-MBO is obtained from MBO-LSTM and MBO-Attention; EnsembleLOB is from LOB-LSTM, LOB-CNN, and LOB-DeepLOB; and Ensemble-MBO-LOB combines Ensemble-MBO and Ensemble-LOB. A equal weighting scheme is used to construct ensemble models and we can observe that ensemble approaches, in general, improve predictive performance. In particular, Ensemble-MBO-LOB delivers the best performance, indicating the potential benefits of combining the MBO and LOB data.

Download (PDF, 1.57MB)

CNN을 이용한 모형이 아닌 ANN의 MultiLayer Perception를 이용한 시험도 있습니다. Deep Learning Modeling of the Limit Order Book: A Comparative Perspective이 제공하는 결과입니다.

Download (PDF, 984KB)

마지막으로 저자가 한국인인 드문 논문을 소개합니다.그냥 참고입니다.

A deep learning algorithm for optimal investment strategies

Download (PDF, 8.3MB)

LOB와 HFT를 위한 기계학습모형은 이외에도 무척 많습니다. 무엇이 최적인지는 데이타와 모형에 따라 달라질 듯 하지만 돌고 돌면 결국 데이타입니다. 훈련을 위한 데이타…

Leave a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.