feat: causal lab

This commit is contained in:
OpenSquared
2026-06-28 14:18:43 +02:00
parent 20f1897211
commit 863ba67610
4 changed files with 247 additions and 97 deletions

View File

@@ -140,15 +140,16 @@ function isActiveAt(ev: SnapshotEvent, selectedDate: string | null): boolean {
// ── Causal graph config ───────────────────────────────────────────────────────
// Maps snapshot event category → causal template category
const EVENT_TO_CAUSAL_CAT: Record<string, string> = {
macro_us: 'macro_us',
macro_eu: 'macro_eu',
geopolitical: 'geopolitical',
report: 'report',
sentiment: 'sentiment',
commodity: 'commodity',
fundamental: 'macro_us',
event_calendar: 'macro_us',
// market_events.category → causal_graph_templates.category
// event_calendar & fundamental cover both US and EU; geopolitical/report/sentiment map 1-to-1
const EVENT_TO_CAUSAL_CAT: Record<string, string[]> = {
event_calendar: ['macro_us', 'macro_eu'],
fundamental: ['macro_us', 'macro_eu'],
geopolitical: ['geopolitical'],
report: ['report'],
sentiment: ['sentiment'],
commodity: ['commodity'],
technical: [],
}
// Maps instrument dashboard category → causal lab instrument keys