2 Commits

Author SHA1 Message Date
ramseshk 7d7a67bd20 Add ML prediction pipeline — LightGBM, calibration fix, ensemble disagreement
Tier 1 ML enhancements:
- Feature engineering (37 features across 5 groups: thermal, dynamic,
  moisture, temporal, interaction) from NWP model output
- 7 LightGBM probability models for rain/temp/wind thresholds
- Temperature-scaled probabilities to prevent overconfidence on bootstrap data
- MLPredictor: unified inference pipeline replacing heuristic sigmoids
- Ensemble disagreement signals (composite spread → edge amplification)
- Fixed calibration loop: update_calibration() now functional (EMA of errors)
- record_outcome() wired for post-resolution feedback
- Nautilus strategy updated: ML predictions take priority, heuristics as fallback
- Historical backtest engine with Sharpe/ROI/max-DD simulation
- Bootstrap training data generator from HK climate normals

Run: python ml/train.py && python ml/backtest.py --edge 50
2026-08-10 17:50:07 +08:00
ramseshk 533939d178 Add NautilusTrader Polymarket execution layer
- Full NautilusTrader integration using BinaryOption instruments
- Polymarket CLOB data client (L2 order book, WebSocket deltas)
- Polymarket CLOB execution client (limit orders, market orders, batch ops)
- PolymarketWeatherStrategy with auto market discovery, order book subscription,
  weather model signal generation, Kelly sizing, and order placement
- Proper Polymarket precision: tick sizes, GTC/GTD limit orders, FAK/IOC market orders
- Weather category fee model (0.05% taker, 25% maker rebate)
- Paper trading mode (real market data, simulated execution)
- Live trading mode with PK/funder/env credential support
- 30s disconnection timeout + 30s post-stop delay per Polymarket docs

Run: python -m execution.runner --paper
2026-08-10 17:29:23 +08:00