Files
Brent Neale 072ac0f245 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>
2026-02-19 14:46:51 +10:00

132 lines
2.4 KiB
YAML

general:
project_name: fx-quant
timezone: UTC
brokers:
- name: oanda
type: oanda_v20
enabled: true
instruments:
- GBP_AUD
- EUR_AUD
- EUR_CAD
- EUR_NZD
- GBP_USD
- EUR_USD
- GBP_JPY
- USD_JPY
- EUR_GBP
- GBP_CAD
data:
candle_count: 200
candle_granularities:
- M15
- H1
- H4
tick_export: false
features:
sma_windows:
- 3
- 20
- 50
- 100
- 200
ema_windows:
- 20
- 50
- 100
- 200
rsi_period: 14
atr_period: 14
vwap_window: 20
volatility_window: 20
macd: [12, 26, 9]
adx_period: 14
stochastic: [5, 3, 3]
session_vwap_bands: true
ai:
model: local-ensemble
confidence_threshold: 0.75
retriever_enabled: true
retriever_source: supabase
ensemble_models:
- logistic_regression
- random_forest
- gradient_boosting
backtest_validation_window: 50
sanity_checks:
rsi_overbought: 80
rsi_oversold: 20
volatility_multiplier: 3.0
strategy:
rule: pivot_retest_engulfing
params:
sma_period: 50
lookback_bars: 20
retest_tolerance_atr: 0.5
strong_close_pct: 0.30
sl_atr_multiplier: 1.5
trade_size_pct_of_equity: 0.025
max_drawdown_pct: 0.05
# Previous strategy (uncomment to switch back):
# strategy:
# rule: sma_cross
# params:
# short: 50
# long: 100
# trade_size_pct_of_equity: 0.025
# max_drawdown_pct: 0.05
execution:
paper_mode: true
canary_size_pct: 0.01
max_positions: 5
interval_seconds: 60
economic_calendar:
enabled: true
table: economic_calendar
days_back: 400
chunk_days: 28
sleep_between_chunks: 1.0
impact_threshold: "High"
event_buffer_minutes: 30
feature_lookforward_minutes: 240
currency_country_map:
EUR: "euro area"
USD: "united states"
GBP: "united kingdom"
JPY: "japan"
AUD: "australia"
CAD: "canada"
CHF: "switzerland"
NZD: "new zealand"
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