mirror of
https://github.com/BrentNeale1/fx-quant.git
synced 2026-08-14 02:38:03 +00:00
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:
co-authored by
Claude Opus 4.6
parent
b1f3a919bf
commit
546d7311ec
@@ -0,0 +1,20 @@
|
||||
CREATE TABLE economic_calendar (
|
||||
event_datetime TIMESTAMPTZ NOT NULL,
|
||||
country TEXT NOT NULL,
|
||||
event_name TEXT NOT NULL,
|
||||
currency TEXT,
|
||||
impact TEXT,
|
||||
impact_numeric INTEGER,
|
||||
actual DOUBLE PRECISION,
|
||||
forecast DOUBLE PRECISION,
|
||||
previous DOUBLE PRECISION,
|
||||
revised DOUBLE PRECISION,
|
||||
reference TEXT,
|
||||
source TEXT,
|
||||
last_updated TIMESTAMPTZ DEFAULT now(),
|
||||
PRIMARY KEY (event_datetime, country, event_name)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_ec_datetime ON economic_calendar (event_datetime DESC);
|
||||
CREATE INDEX idx_ec_currency ON economic_calendar (currency);
|
||||
CREATE INDEX idx_ec_impact ON economic_calendar (impact_numeric);
|
||||
Reference in New Issue
Block a user