--- 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.