Capucine Gest eb416be780 feat: calendrier économique TE+Investing, OIS SNB, yields 10Y, taux directeurs corrects
Calendrier économique
- Nouvelles sources : TE HTML scraping (483 events/2 sem.) + Investing.com en co-primaires
- Dédupe déterministe par clé currency+category+date (±1j pour policy_rate)
- Filtre catégorie "other", filtre discours CB (fix doublon TE vs Investing)
- CHF/Switzerland via page séparée TE (hors G20)
- Fenêtre 14 jours avec ?startDate=&endDate= passés à TE
- ForexFactory+FRED en secours uniquement si les deux scrapers tombent à vide

Probabilités OIS
- rateprobability.com (7 CBs : FED/ECB/BOJ/BOE/BOC/RBA/RBNZ)
- investinglive.com (Dellamotta) : scan URL-date 14 jours → couvre SNB/CHF manquant
- SNB : 3% probabilité hausse au 19 juin 2026 (source : IL article 2026-05-29)
- rate_expectations.json MAJ : RBNZ 79% hike (corrigé depuis 70% no-change stale)
- Dédup ±1 jour pour policy_rate (fix doublon SNB TE-18/06 vs IL-19/06)

Taux directeurs
- USD : scrapeTeRate() = 3.75% (fin midpoint FRED 3.625%)
- AUD prev : 4.10% (corrigé depuis 4.60%)
- NZD/CHF/JPY/CAD : cohérents avec TE officiel

Yields 10Y souverains
- Nouvelle lib lib/tebonds.ts : scrape TE bonds, données du jour, cache 1h
- Remplace FRED IRLTLT01XXM156N mensuel (JPY/CHF/AUD/NZD avaient 1 mois de retard)
- 8 devises + spread vs USD calculé automatiquement
- /api/yields et /api/drivers utilisent la même lib

Drivers globaux
- BTC : ticker/price Binance (plus précis que 24hr lastPrice)
- HY Spread cache : 86400s → 3600s (données FRED du jour)
- DriversBar : suppression affichage direct US 10Y, tooltip Crb 2-10 affiche US10Y+US2Y

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 23:16:18 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00
2026-05-27 13:18:45 +02:00

Forex Macro Dashboard — v8.0

Tableau de bord macroéconomique pour 8 devises majeures (USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD).

Installation

1. Installer Node.js

Télécharger Node.js LTS sur nodejs.org (inclut npm).

2. Installer les dépendances

cd forex-dashboard
npm install

3. Configurer les clés API

Le fichier .env.local est déjà créé avec tes clés FRED et Bytez. Ajouter ta clé OANDA quand disponible :

OANDA_API_KEY=ta_clé_oanda_ici

Clé FRED gratuite : fred.stlouisfed.org → My Account → API Keys
Compte OANDA gratuit : oanda.com → demo → API Access → Generate token

4. Lancer en local

npm run dev

Ouvrir http://localhost:3000

Données rate expectations (banques centrales non-USD)

pip install requests beautifulsoup4
python scripts/investinglive_scraper.py --n 1 --output json --save data/rate_expectations.json

Un snapshot de démonstration (mai 2026) est inclus dans data/rate_expectations.json.

Structure

forex-dashboard/
├── app/
│   ├── page.tsx                    ← dashboard principal
│   ├── layout.tsx
│   ├── globals.css
│   └── api/
│       ├── fred/route.ts           ← proxy FRED (cache 1h)
│       ├── fx/route.ts             ← Frankfurter ECB (taux spot)
│       ├── cot/route.ts            ← CFTC COT parser
│       ├── sentiment/route.ts      ← OANDA retail sentiment
│       ├── expectations/route.ts   ← rate_expectations.json
│       ├── narrative/route.ts      ← Bytez LLM (Llama 3.1)
│       ├── yields/route.ts         ← obligations 10Y (FRED, ECB, BoE, BoC)
│       └── drivers/route.ts        ← Gold, Brent, VIX, HY/IG spreads
├── components/
│   ├── CurrencyCard.tsx            ← card par devise
│   ├── DriversBar.tsx              ← barre globale des drivers
│   └── NarrativeButton.tsx         ← bouton analyse IA Bytez
├── lib/
│   ├── types.ts                    ← types TypeScript
│   ├── constants.ts                ← séries FRED corrigées, COT codes
│   └── scoring.ts                  ← algorithme §4 + §6 (divergences)
├── scripts/
│   └── investinglive_scraper.py    ← scraper rate expectations
├── data/
│   └── rate_expectations.json      ← snapshot mensuel BC
└── .env.local                      ← clés API (gitignored)

Sources de données intégrées

Catégorie Source Clé
Taux directeurs, CPI, PIB, Retail Sales, Emploi FRED oui
FX Spot Frankfurter (ECB) non
Obligations 10Y USD FRED DGS10 oui
Obligations 10Y EUR ECB Data Portal non
Obligations 10Y GBP BoE API IUDMNPY non
Obligations 10Y CAD BoC API non
COT Positionnement CFTC CSV public non
Sentiment retail OANDA v20 API oui (OANDA)
Rate expectations BC investinglive.com scraper non
Analyse narrative Bytez (Llama 3.1) oui (Bytez)

Déploiement Vercel

git init && git add . && git commit -m "init forex dashboard"
# Créer repo privé sur github.com puis :
git remote add origin https://github.com/TONUSER/forex-dashboard.git
git push -u origin main

Sur vercel.com : New Project → importer le repo → Settings → Environment Variables → copier les variables de .env.local.

Note : le scraper Python ne tourne pas sur Vercel. Lancer localement puis committer data/rate_expectations.json.

S
Description
No description provided
Readme 77 MiB
Languages
TypeScript 91.7%
JavaScript 6.4%
Python 1.5%
VBScript 0.3%