File size: 2,037 Bytes
0329adf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
language: en
tags:
- finance
- trading
- futures
- nq
- machine-learning
- lightgbm
- classification
- market-microstructure
- key-levels
license: mit
---

# NQ Futures Key Level Classifier

LightGBM classifier for predicting NQ futures key level reactions based on market microstructure

## Model Details

- **Model Type**: LightGBM Classifier
- **Task**: Multi-class classification for NQ futures key level reactions
- **Training Data**: 1,043,089 episodes from 78 trading days (April-August 2025)
- **Features**: 0 market microstructure and session context features

## Performance

- **Multi-class Log Loss**: 0.9852353681288883
- **Accuracy**: 0.9764018445196484

## Feature Importance (Top 10)

- mae_ticks_60s: 6659.0000
- rv_60s: 6409.0000
- mfe_ticks_60s: 6190.0000
- touch_count_last_30m: 5442.0000
- vwap_dev_ticks: 5023.0000
- mfe_ticks_120s: 4985.0000
- session_cum_delta: 4864.0000
- mae_ticks_120s: 4795.0000
- pullback_ticks_30s: 4774.0000
- p50_intertrade_ms_5s: 4770.0000


## Usage

```python
import joblib
import pandas as pd

# Load the model
model = joblib.load('classifier.joblib')

# Prepare features (same format as training)
features = prepare_features(your_data)

# Make predictions
predictions = model.predict(features)
probabilities = model.predict_proba(features)
```

## Model Architecture

This model predicts four possible outcomes when price approaches key levels:
- **BREAK**: Price breaks through the level decisively
- **BOUNCE**: Price bounces off the level
- **WEAK_BREAK**: Price breaks but with weak momentum
- **TIMEOUT**: Price approaches but doesn't reach outcome within time limit

## Training Context

The model was trained on NQ futures data from the first 2 hours of regular trading hours (09:30-11:30 ET), focusing on:
- Key level identification (OPEN, IBH/IBL, Round Numbers, Session VWAP)
- Market microstructure features (order flow, volatility, timing)
- Session context (cumulative delta, VWAP deviation, touch frequency)

## License

MIT License - see LICENSE file for details.