GNN Model V19.0 - Regime Change Resilience

Overview

v19.0 enhances the GNN-Enhanced predictive model with regime detection features to improve resilience to regime changes (market volatility, trend shifts).

Key Improvements from v18.0

  • Regime Detection Features: Added 6 new features (rolling_vol_short, rolling_vol_long, vol_regime_high, vol_ratio, ma_crossover, trend_direction, regime_change_flag, days_since_regime_change, regime_state)
  • Total Features: 24 (up from 18 in v18)
  • Focus: Improve Symbol 124 accuracy from 78.9% to >85% with regime-aware modeling

Results

Accuracy at 15% Threshold

Symbolv17.0v18.0v19.0TargetStatus
550.0%89.5%-92%-
1110.0%94.7%-92%-
1240.0%78.9%78.9%85%BELOW
9630.0%89.5%-92%-

Symbol 124 Analysis

  • v18 Accuracy: 78.9% (at 15% threshold)
  • v19 Attempted Accuracy: ~78.9% (multiple modeling approaches tried)
  • Target: >85%
  • Status: NOT MET (limited by data availability)

Data Limitations

  • Only 31 days of data per symbol
  • Regime changes: Symbol 124 changed from ~50 to ~71 counts/day
  • Spikes: 205, 161 counts (unpredictable with current data)
  • Best possible with current data: ~90% (per v18 analysis)

Technical Details

Features (24 total)

Original 6 (time-series):

  • daily_count_avg, rolling_7d_avg, rolling_7d_std
  • cross_corr_avg, anomaly_severity_avg, days_since_last_anomaly

GNN 6 (graph structural):

  • node_degree, clustering_coefficient, community_id
  • community_size, avg_edge_weight, link_pred_score

V18 Spike/Volatility 6:

  • spike_frequency, days_since_last_spike, spike_magnitude_avg
  • rolling_7d_median, coeff_variation, rolling_7d_max

V19 Regime Detection 6 (NEW):

  • rolling_vol_short (7-day std of returns)
  • rolling_vol_long (30-day std of returns)
  • vol_regime_high (1 if current vol > 75th percentile)
  • ma_crossover (1 if 7-day MA > 30-day MA)
  • trend_direction (slope of MA)
  • regime_state (-1 bear, 0 neutral, 1 bull)

Models Attempted

  1. Ridge Regression (v18 approach): 78.9% accuracy
  2. Ridge with time-varying regime features: 73.7% accuracy
  3. Neural Network (simple): 60% accuracy
  4. Walk-forward with rolling window: 78.9% accuracy

Files

  • gnn_features_v19.py - Feature extraction with regime detection
  • predictive_modeler_v19_regime.py - Ridge regression with v19 features
  • models_v19/ - Model artifacts
    • 124/ridge_v19.pkl - Trained Ridge model
    • 124/scaler_v19.pkl - Feature scaler
    • 124/validation.json - Validation results

Challenges & Limitations

Why >85% Not Achieved

  1. Limited data: Only 31 days for Symbol 124
  2. Regime change: From ~50 to ~71 counts/day (model adapts slowly)
  3. Spikes: 205, 161 counts are stochastic and unpredictable
  4. Static GNN features: Don’t capture daily regime changes

V18 Document Analysis

From GNNModelV18.md:

  • “Best possible with current data: ~90% (10% spikes that are unpredictable)”
  • “Volatile symbols (124): 79% accuracy due to regime changes and spikes”

Next Steps for v20.0

  1. Collect more data: 3+ months recommended (per v18)
  2. Regime-aware ensemble: Separate models for bull/bear/neutral regimes
  3. Spike classification: Predict if spike will occur, then predict magnitude
  4. Deep learning: Use LSTM/Transformer with more data

Commands

# Generate v19 features
cd /home/avalonas/.hermes/kanban/boards/gourmet/workspaces/t_851e9a43
python3 gnn_features_v19.py

# Train v19 model (attempt)
python3 predictive_modeler_v19_regime.py

# Check results
cat /home/avalonas/.hermes/GOURMET/GOURMET/models_v19/124/validation.json

Tags

#Gourmet #GNNModelV19 #v19 #RegimeDetection #Symbol124 #PredictiveModeling #AccuracyImprovement

← Back to Research