Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
tags:
|
4 |
+
- finance
|
5 |
+
- trading
|
6 |
+
- futures
|
7 |
+
- nq
|
8 |
+
- machine-learning
|
9 |
+
- lightgbm
|
10 |
+
- classification
|
11 |
+
- market-microstructure
|
12 |
+
- key-levels
|
13 |
+
license: mit
|
14 |
+
---
|
15 |
+
|
16 |
+
# NQ Futures Key Level Classifier
|
17 |
+
|
18 |
+
LightGBM classifier for predicting NQ futures key level reactions based on market microstructure
|
19 |
+
|
20 |
+
## Model Details
|
21 |
+
|
22 |
+
- **Model Type**: LightGBM Classifier
|
23 |
+
- **Task**: Multi-class classification for NQ futures key level reactions
|
24 |
+
- **Training Data**: 1,043,089 episodes from 78 trading days (April-August 2025)
|
25 |
+
- **Features**: 0 market microstructure and session context features
|
26 |
+
|
27 |
+
## Performance
|
28 |
+
|
29 |
+
- **Multi-class Log Loss**: 0.9852353681288883
|
30 |
+
- **Accuracy**: 0.9764018445196484
|
31 |
+
|
32 |
+
## Feature Importance (Top 10)
|
33 |
+
|
34 |
+
- mae_ticks_60s: 6659.0000
|
35 |
+
- rv_60s: 6409.0000
|
36 |
+
- mfe_ticks_60s: 6190.0000
|
37 |
+
- touch_count_last_30m: 5442.0000
|
38 |
+
- vwap_dev_ticks: 5023.0000
|
39 |
+
- mfe_ticks_120s: 4985.0000
|
40 |
+
- session_cum_delta: 4864.0000
|
41 |
+
- mae_ticks_120s: 4795.0000
|
42 |
+
- pullback_ticks_30s: 4774.0000
|
43 |
+
- p50_intertrade_ms_5s: 4770.0000
|
44 |
+
|
45 |
+
|
46 |
+
## Usage
|
47 |
+
|
48 |
+
```python
|
49 |
+
import joblib
|
50 |
+
import pandas as pd
|
51 |
+
|
52 |
+
# Load the model
|
53 |
+
model = joblib.load('classifier.joblib')
|
54 |
+
|
55 |
+
# Prepare features (same format as training)
|
56 |
+
features = prepare_features(your_data)
|
57 |
+
|
58 |
+
# Make predictions
|
59 |
+
predictions = model.predict(features)
|
60 |
+
probabilities = model.predict_proba(features)
|
61 |
+
```
|
62 |
+
|
63 |
+
## Model Architecture
|
64 |
+
|
65 |
+
This model predicts four possible outcomes when price approaches key levels:
|
66 |
+
- **BREAK**: Price breaks through the level decisively
|
67 |
+
- **BOUNCE**: Price bounces off the level
|
68 |
+
- **WEAK_BREAK**: Price breaks but with weak momentum
|
69 |
+
- **TIMEOUT**: Price approaches but doesn't reach outcome within time limit
|
70 |
+
|
71 |
+
## Training Context
|
72 |
+
|
73 |
+
The model was trained on NQ futures data from the first 2 hours of regular trading hours (09:30-11:30 ET), focusing on:
|
74 |
+
- Key level identification (OPEN, IBH/IBL, Round Numbers, Session VWAP)
|
75 |
+
- Market microstructure features (order flow, volatility, timing)
|
76 |
+
- Session context (cumulative delta, VWAP deviation, touch frequency)
|
77 |
+
|
78 |
+
## License
|
79 |
+
|
80 |
+
MIT License - see LICENSE file for details.
|