Add economic calendar module to filter trades near high-impact events

Introduces a full Trading Economics API pipeline that fetches, stores, and
queries economic events (NFP, CPI, rate decisions, etc.) so the backtester
can block trade entries within a configurable buffer window of high-impact
releases — reducing slippage and false signals.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Brent Neale
2026-02-17 20:00:28 +10:00
co-authored by Claude Opus 4.6
parent b1f3a919bf
commit 546d7311ec
7 changed files with 654 additions and 5 deletions
+1
View File
@@ -4,3 +4,4 @@ OANDA_ENV=practice
DASHBOARD_PASSWORD=changeme
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-supabase-anon-key-here
TRADING_ECONOMICS_API_KEY=your-trading-economics-api-key-here
+18
View File
@@ -62,6 +62,24 @@ execution:
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