diff --git a/frontend/src/pages/EuroSimulator.tsx b/frontend/src/pages/EuroSimulator.tsx index 08304cd..ff9705d 100644 --- a/frontend/src/pages/EuroSimulator.tsx +++ b/frontend/src/pages/EuroSimulator.tsx @@ -278,15 +278,25 @@ function CausalChain({ r, base, p }: { r: ModelResult; base: Params; p: Params } const col3 = (v: number, threshold = 0.03): string => Math.abs(v) < threshold ? '#94a3b8' : v > 0 ? '#f87171' : '#34d399' - const fedRateC = col3(r.fed_rate_pressure, 0.3) - const ecbRateC = col3(-r.ecb_rate_pressure, 0.3) // flipped: ECB hawkish → EUR up → green + // ── Node colors ──────────────────────────────────────────────────────────── + // CPI/NFP/PMI inputs → forward guidance signal (positive = hawkish Fed = red for EUR) + const fedFwdC = col3(r.fed_fwd_signal, 0.4) + const ecbFwdC = col3(-r.ecb_fwd_signal, 0.4) // ECB hawkish fwd signal → green for EUR + + // CB nodes: combined rate + tone signal dominates + const fedC = col3(r.fed_rate_pressure + r.fed_fwd_signal * 0.4, 0.25) + const ecbC = col3(-(r.ecb_rate_pressure + r.ecb_fwd_signal * 0.4), 0.25) // PMI US: positive deviation (> 50) = US strong = bearish EUR = red const pmiUsC = col3(p.pmi_us - 50, 1.5) + // VIX: above baseline = risk-off = USD safe haven = bearish EUR = red + const vixC = col3(p.vix - base.vix, 2) + + // Yield node colors const us2C = col3(r.us_2y_implied - base.us_2y) const us10C = col3(r.us_10y_implied - base.us_10y) - const eu2C = col3(-(r.eu_2y_implied - base.eu_2y)) // EU yield up → EUR/USD up → green + const eu2C = col3(-(r.eu_2y_implied - base.eu_2y)) const eu10C = col3(-(r.eu_10y_implied - base.eu_10y)) const diff2C = col3(delta2yVal, 0.02) @@ -335,22 +345,22 @@ function CausalChain({ r, base, p }: { r: ModelResult; base: Params; p: Params } {COLORS.map(c => mk(`a${c.replace('#', '')}`, c))} {/* US inputs */} - 0.4 ? '#f87171' : '#94a3b8'} w={98} /> + - - + + {/* EU inputs */} - 0.4 ? '#34d399' : '#94a3b8'} w={98} /> - + + {/* CB nodes */} + col={fedC} w={118} /> + col={ecbC} w={118} /> {/* FED → US 2Y (solid, rate) and FED → US 10Y (dashed, tone) */} @@ -376,9 +386,9 @@ function CausalChain({ r, base, p }: { r: ModelResult; base: Params; p: Params } - {/* VIX (left) */} - - + {/* VIX (left) — risk-off = USD safe haven = bearish EUR = red */} + + {/* Differentials → EURUSD */}