Skip to content

High frequency trading (HFT) strategies built for futures using machine learning and deep learning techniques.

Notifications You must be signed in to change notification settings

dogfood1/ML-HFT

 
 

Repository files navigation

HFT-ML-Strategy

  • Extract trading signals from multi-level orderbook data
  • Replicate well-designed high frequency trading (HFT) strategies using machine learning and deep learning techniques

Data

The SGX FTSE CHINA A50 INDEX Futures (新加坡交易所FTSE中国A50指数期货) tick depth data are used.

Strategy Pipline

Orderbook Signals

We use level-3 deep orderbook data to develop trading signals, including Depth Ratio, Rise Ratio, and Orderbook Imbalance (OBI).

Price Series

Feature Engineering & HFT Factors Design

  • Simple average depth ratio and OBI:

  • Weighted average depth ratio, OBI, and rise ratio:

Model Fitting

  • Models:

    • RandomForestClassifier
    • ExtraTreesClassifier
    • AdaBoostClassifier
    • GradientBoostingClassifier
    • Support Vector Machines
    • Other classifiers: Softmax, KNN, MLP, LSTM, etc.
  • Hyperparameters:

    • Training window: 30min
    • Test window: 10sec
    • Prediction label: 15min forward

Performance Metrics

  • Prediction accuracy:

  • Prediction Accuracy Series:

  • Cross Validation Mean Accuracy:

  • Best Model:

PnL Visualization

About

High frequency trading (HFT) strategies built for futures using machine learning and deep learning techniques.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%