# bradleyboyuyang/ml-hft architecture

> Architecture diagram of the GitHub repository bradleyboyuyang/ml-hft, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bradleyboyuyang/ml-hft
- Repository: https://github.com/bradleyboyuyang/ml-hft

## Overview

This repository is a notebook-based high-frequency trading research framework for SGX FTSE China A50 futures. Its documented workflow starts with tick-depth order-book data, develops order-book signals and features, fits predictive models, and evaluates prediction accuracy and PnL. The tree identifies notebooks for data processing, visualization, factor design, feature engineering, and model fitting. No notebook source was provided, so links not explicitly supported by the README are omitted; the graph does not assert their internal call or data-transfer details.

Main entry points: [`data_process.ipynb`](https://github.com/bradleyboyuyang/ml-hft/blob/master/data_process.ipynb) (Data Processing), [`model_fitting.ipynb`](https://github.com/bradleyboyuyang/ml-hft/blob/master/model_fitting.ipynb) (Model Fitting), [`HFT_factors.ipynb`](https://github.com/bradleyboyuyang/ml-hft/blob/master/HFT_factors.ipynb) (Order-Book Signals), [`feature_engineering.ipynb`](https://github.com/bradleyboyuyang/ml-hft/blob/master/feature_engineering.ipynb) (Feature Engineering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Market Data"]
  node_futures_ticks["Futures Tick Data"]
  node_orderbook_ticks["Order-Book Depth Data"]
  node_data_processing["Data Processing<br/>[data_process.ipynb]"]
  node_visualization["Data Visualization"]
end

subgraph group_signals["Signals &amp; Features"]
  node_signals["Order-Book Signals<br/>[HFT_factors.ipynb]"]
  node_features["Feature Engineering"]
end

subgraph group_models["Modeling &amp; Evaluation"]
  node_model_fitting["Model Fitting"]
  node_metrics["Prediction Metrics"]
  node_pnl["PnL Visualization"]
end

node_researcher(("Researcher"))

node_futures_ticks -.->|"provides data"| node_data_processing
node_orderbook_ticks -.->|"provides depth"| node_data_processing
node_researcher -.->|"analyzes data"| node_data_processing
node_data_processing -.->|"supports signal design"| node_signals
node_signals -.->|"develops features"| node_features
node_features -.->|"supports prediction"| node_model_fitting
node_model_fitting -->|"evaluates accuracy"| node_metrics
node_model_fitting -->|"visualizes PnL"| node_pnl

click node_futures_ticks "https://github.com/bradleyboyuyang/ml-hft/blob/master/data/CN_Futures_2014.01.02.csv"
click node_orderbook_ticks "https://github.com/bradleyboyuyang/ml-hft/blob/master/data/order_book_3_2014_1_2.csv"
click node_data_processing "https://github.com/bradleyboyuyang/ml-hft/blob/master/data_process.ipynb"
click node_visualization "https://github.com/bradleyboyuyang/ml-hft/blob/master/data_visualization.ipynb"
click node_signals "https://github.com/bradleyboyuyang/ml-hft/blob/master/HFT_factors.ipynb"
click node_features "https://github.com/bradleyboyuyang/ml-hft/blob/master/feature_engineering.ipynb"
click node_model_fitting "https://github.com/bradleyboyuyang/ml-hft/blob/master/model_fitting.ipynb"
click node_metrics "https://github.com/bradleyboyuyang/ml-hft/blob/master/model_fitting.ipynb"
click node_pnl "https://github.com/bradleyboyuyang/ml-hft/blob/master/model_fitting.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_futures_ticks,node_orderbook_ticks,node_data_processing,node_visualization toneBlue
class node_signals,node_features toneAmber
class node_model_fitting,node_metrics,node_pnl toneMint
class node_researcher toneIndigo
```

## Components

### Market Data

- [Futures Tick Data](https://github.com/bradleyboyuyang/ml-hft/blob/master/data/CN_Futures_2014.01.02.csv): `data/CN_Futures_2014.01.02.csv`
- [Order-Book Depth Data](https://github.com/bradleyboyuyang/ml-hft/blob/master/data/order_book_3_2014_1_2.csv): `data/order_book_3_2014_1_2.csv`
- [Data Processing](https://github.com/bradleyboyuyang/ml-hft/blob/master/data_process.ipynb): `data_process.ipynb`
- [Data Visualization](https://github.com/bradleyboyuyang/ml-hft/blob/master/data_visualization.ipynb): `data_visualization.ipynb`

### Signals & Features

- [Order-Book Signals](https://github.com/bradleyboyuyang/ml-hft/blob/master/HFT_factors.ipynb): `HFT_factors.ipynb`
- [Feature Engineering](https://github.com/bradleyboyuyang/ml-hft/blob/master/feature_engineering.ipynb): `feature_engineering.ipynb`

### Modeling & Evaluation

- [Model Fitting](https://github.com/bradleyboyuyang/ml-hft/blob/master/model_fitting.ipynb): `model_fitting.ipynb`
- [Prediction Metrics](https://github.com/bradleyboyuyang/ml-hft/blob/master/model_fitting.ipynb): `model_fitting.ipynb`
- [PnL Visualization](https://github.com/bradleyboyuyang/ml-hft/blob/master/model_fitting.ipynb): `model_fitting.ipynb`

### Other components

- **Researcher**

## Connections

- Futures Tick Data → Data Processing: provides data
- Order-Book Depth Data → Data Processing: provides depth
- Researcher → Data Processing: analyzes data
- Data Processing → Order-Book Signals: supports signal design
- Order-Book Signals → Feature Engineering: develops features
- Feature Engineering → Model Fitting: supports prediction
- Model Fitting → Prediction Metrics: evaluates accuracy (evidence: `README.md`)
- Model Fitting → PnL Visualization: visualizes PnL (evidence: `README.md`)
