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
| Symbol | v17.0 | v18.0 | v19.0 | Target | Status |
|---|---|---|---|---|---|
| 55 | 0.0% | 89.5% | - | 92% | - |
| 111 | 0.0% | 94.7% | - | 92% | - |
| 124 | 0.0% | 78.9% | 78.9% | 85% | BELOW |
| 963 | 0.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
- Ridge Regression (v18 approach): 78.9% accuracy
- Ridge with time-varying regime features: 73.7% accuracy
- Neural Network (simple): 60% accuracy
- Walk-forward with rolling window: 78.9% accuracy
Files
gnn_features_v19.py- Feature extraction with regime detectionpredictive_modeler_v19_regime.py- Ridge regression with v19 featuresmodels_v19/- Model artifacts124/ridge_v19.pkl- Trained Ridge model124/scaler_v19.pkl- Feature scaler124/validation.json- Validation results
Challenges & Limitations
Why >85% Not Achieved
- Limited data: Only 31 days for Symbol 124
- Regime change: From ~50 to ~71 counts/day (model adapts slowly)
- Spikes: 205, 161 counts are stochastic and unpredictable
- 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
- Collect more data: 3+ months recommended (per v18)
- Regime-aware ensemble: Separate models for bull/bear/neutral regimes
- Spike classification: Predict if spike will occur, then predict magnitude
- 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