From a37859ad405c8f3c025faf28d4ed5c888eb6b191 Mon Sep 17 00:00:00 2001 From: caty21 Date: Mon, 29 Jun 2026 12:18:51 +0200 Subject: [PATCH] feat(OIS): onglet Probabilites - barres proba par reunion + bps cumules, defaut Probabilites avant Rate Path Co-Authored-By: Claude Sonnet 4.6 --- app/page.tsx | 2 +- components/CurrencyCard.tsx | 81 ++++++++++++++++++++++--------------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 1897808..c13641b 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -50,7 +50,7 @@ export default function Dashboard() { const [globalMacroSlide, setGlobalMacroSlide] = useState<"mon"|"infl"|"cro"|"empl">("mon"); const [globalCardTab, setGlobalCardTab] = useState<"overview"|"mispricing"|"focus">("overview"); const [globalSignauxSlide, setGlobalSignauxSlide] = useState<"ois"|"cot"|"sent">("ois"); - const [globalOisChartTab, setGlobalOisChartTab] = useState<"curve"|"implied"|"scenarios">("curve"); + const [globalOisChartTab, setGlobalOisChartTab] = useState<"curve"|"implied"|"scenarios">("scenarios"); const [macroSyncEnabled, setMacroSyncEnabled] = useState(false); // ── Sentiment multi-paires Myfxbook → {CCY: {longPct, shortPct, pair}} ────── diff --git a/components/CurrencyCard.tsx b/components/CurrencyCard.tsx index 5e5dd79..8473426 100644 --- a/components/CurrencyCard.tsx +++ b/components/CurrencyCard.tsx @@ -482,7 +482,7 @@ function OISEnhancedBlock({ ratePath, syncChartTab, onChartTabChange }: { syncChartTab?: "curve" | "implied" | "scenarios"; onChartTabChange?: (id: "curve" | "implied" | "scenarios") => void; }) { - const [localChartTab, setLocalChartTab] = useState<"curve" | "implied" | "scenarios">("curve"); + const [localChartTab, setLocalChartTab] = useState<"curve" | "implied" | "scenarios">("scenarios"); const chartTab = syncChartTab ?? localChartTab; const setChartTab = (id: "curve" | "implied" | "scenarios") => { setLocalChartTab(id); @@ -538,6 +538,8 @@ function OISEnhancedBlock({ ratePath, syncChartTab, onChartTabChange }: { rate: +m.impliedRate.toFixed(3), prob: m.probMovePct, isCut: m.probIsCut, + changeBps: m.changeBps, + cumulBps: Math.round((m.impliedRate - currentRate) * 100), })); // Y-axis domain for Rate Curve @@ -619,9 +621,9 @@ function OISEnhancedBlock({ ratePath, syncChartTab, onChartTabChange }: { {/* Tab buttons */}
{([ + { id: "scenarios" as const, label: "Probabilités" }, { id: "curve" as const, label: "Rate Path" }, { id: "implied" as const, label: "Implied Pts" }, - { id: "scenarios" as const, label: "Scénarios" }, ]).map(t => (