Commit Graph

9 Commits

Author SHA1 Message Date
OpenSquared
c764bcba8c fix: seuil fedFwdC/ecbFwdC 0.4→0.08 — PMI EU/US colorise le nœud CPI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 23:36:01 +02:00
OpenSquared
48e8d0de37 fix: SVG causal chain — tous les nœuds dynamiques
Bugs corrigés :
- VIX : hardcodé gris → rouge si > base (risk-off = bearish EUR), valeur affichée dans le nœud, flèche épaisseur dynamique
- CPI US/NFP : hardcodé gris/unidirectionnel → fedFwdC bidirectionnel (rouge si hawkish, vert si dovish)
- CPI EU/PMI : idem → ecbFwdC bidirectionnel
- FED : utilisait fedRateC (rate only) → fedC combinant rate + tone (réagit au ton seul)
- BCE : idem → ecbC combiné
- Flèches CPI→FED/BCE : utilisaient la couleur du canal taux → corrigé vers canal forward guidance (tirets)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 23:32:18 +02:00
OpenSquared
6b850091eb fix: PMI US — coloration dynamique + ajout dans fed_fwd_signal
PMI US colorisé rouge/vert selon déviation vs 50 dans le SVG
Flèche PMI US → FED prend la même couleur que le nœud
PMI US ajouté dans fed_fwd_signal (+0.18 par pt) pour symétriser avec PMI EU
Les deux canaux PMI US sont maintenant visibles : CB expectations (→10Y) + direct c_pmi (croissance diff)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 23:25:48 +02:00
OpenSquared
91e624aa56 Simu EUR/USD 2026-06-26 23:19:28 +02:00
OpenSquared
e27ff72c1c feat: simulateur EUR/USD — canaux taux/ton séparés + saisie directe sliders
Modèle causal refactorisé en deux canaux distincts :
- Canal taux (solid) : variations taux directeurs → principalement 2Y (ancrage court terme)
- Canal ton/anticipations (tirets) : discours CB + surprises CPI/NFP → principalement 10Y (anticipations long terme)

Slider : clic sur la valeur affichée → input éditable (Enter/Blur pour valider, Escape pour annuler)

Backend : endpoint /api/simulator/baseline expose us_10y et eu_10y (yfinance ^TNX + GE10YT=RR)

SVG mis à jour : 4 nœuds de taux (2Y/10Y US+EU), 2 nœuds différentiels, flèches solides/tirets
Strip métrique : 6 cellules (US 2Y, US 10Y, Bund 2Y, Bund 10Y, Δ 2Y, Δ 10Y)
Décomposition : séparation "Δ 2Y — taux directeurs" / "Δ 10Y — anticipations/ton"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 23:08:08 +02:00
OpenSquared
fe86cc1994 feat: EUR/USD simulator — live baseline from market data
Backend (routers/simulator.py):
- GET /api/simulator/baseline aggregates current market values:
  1. macro_gauge_snapshots → VIX, Brent oil
  2. FRED economic_events  → FEDFUNDS, ECBDFR, DFII10 (real yield)
  3. yfinance live         → EURUSD=X, ^IRX+^FVX interpolated US 2Y,
                             DE2YT=RR EU 2Y (or ECB rate +15bps fallback),
                             ^VIX, BZ=F
- Returns sources dict so frontend can show data provenance

Frontend (EuroSimulator.tsx):
- Fetch /api/simulator/baseline on mount; use as base anchors
- compute(p, base) now takes dynamic base instead of hardcoded constants
- Reset button returns to today's live baseline, not hardcoded fallback
- Live/Fallback status badge with fetch date
- Sources panel showing data origin per field
- Chart reference line updates to show live base values

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 22:42:18 +02:00
OpenSquared
e00b78f2f6 fix: add position tick on colorize sliders so cursor is visible at baseline
At baseline (deviation=0) the colored bar had width=0 and disappeared.
Added a 2px vertical tick mark at the current slider position so the
handle location is always visible even when there's no deviation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 22:31:12 +02:00
OpenSquared
c36f11ad32 fix: VIX slider bar overflow — clamp pivot to range, add center prop
Slider was computing mid = (0 - 10) / (60 - 10) * 100 = -20% for VIX
(0 outside the 10-60 range), causing the colored track to start at a negative
left position and overflow the container.

Fix: add overflow-hidden on the track div; add center prop (defaults 0)
that the caller sets to the actual baseline value when 0 is out of range.
VIX now pivots at 18, real yield US at 2.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 22:24:31 +02:00
OpenSquared
a24cac38ad feat: eco desk enhanced config + EUR/USD causal simulator
Eco desk (market_event_detector.py + AIDesks.tsx):
- Add currencies filter (USD via FRED, EUR/GBP/JPY/etc via ff_calendar)
- Add min_impact filter (high / high+medium / all levels)
- Add create_market_event toggle — detect surprises without creating events
- Add lookback_releases — inject last N historical releases into event description
- New _check_ff_calendar_surprises() for non-USD surprising releases
- Frontend EcoConfig: currency chips, impact dropdown, releases input, toggle

EUR/USD Simulator (EuroSimulator.tsx):
- Pure frontend causal model — no API calls, no historical data
- 3-column layout: controls | causal chain SVG | results
- FED/BCE rate sliders + hawkish/dovish tone selector
- CPI/NFP/PMI surprise inputs
- SVG causal chain: CPI→CB→2Y→ΔRate→EURUSD with dynamic colors
- Real-time pip decomposition by factor, sensitivity bars
- Route /simulator + sidebar entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 22:17:33 +02:00