Phase 2: Live paper trading engine + extended backtesting analytics

Track A — Live paper trading system:
- Extract PositionManager from backtester into shared src/position_manager.py
- Refactor backtester/engine.py to delegate to PositionManager
- New src/live/ package: data_feed (OANDA polling), executor (paper/live orders),
  engine (LiveEngine orchestrator with 5 strategy slots), run.py entry point
- Add phase2 config to system.yaml (S7_Tight, S9, S9_Filtered, S4F, S3)

Track B — Extended backtesting analytics:
- Regime analysis: per-year (2021-2023) breakdown shows 4/5 strategies trending UP
- Correlation analysis: S7+S3 GBP_JPY overlap=16.9% (moderate), S9 pairs=12% (low)
- Kelly sizing: S9_Filtered half-Kelly=7.3%, S4F=2.4%, S3=1.6% with Monte Carlo DD

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Brent Neale
2026-02-19 14:46:51 +10:00
co-authored by Claude Opus 4.6
parent 39a6536284
commit 072ac0f245
14 changed files with 2361 additions and 409 deletions
+27
View File
@@ -102,3 +102,30 @@ supabase:
url: https://<your>.supabase.co
key_env_name: SUPABASE_KEY
table: fx_candles
phase2:
strategies:
- name: S7_Tight
pair: GBP_JPY
timeframe: H1
enabled: true
- name: S9
pair: GBP_USD
timeframe: H1
enabled: true
- name: S9_Filtered
pair: GBP_AUD
timeframe: H1
enabled: true
- name: S4F
pair: EUR_AUD
timeframe: M15
htf_timeframe: H1
enabled: true
- name: S3
pair: GBP_JPY
timeframe: H1
enabled: true
poll_interval_seconds: 60
paper_mode: true
starting_equity: 100000
max_daily_drawdown_pct: 5.0