mirror of
https://github.com/caty21/forex-dashboard.git
synced 2026-07-27 20:37:45 +00:00
3a39904ce5da95429fa0ad075d2c7461ffd274dd
Indicateurs : - JPY CPI : null → IMF/IFS DBnomics MoM% (override 0.1% mai 2026) - AUD CPI : mauvais ID FRED (AUSCPIALLMINMEI→AUSCPIALLQINMEI) + override 1.4% T1 2026 - NZD CPI : mauvais ID FRED (NZLCPIALLMINMEI→NZLCPIALLQINMEI) + override 0.9% T1 2026 - Nouveau data/cpi_overrides.json — surcharge manuelle quand FRED/DBnomics en retard - Override date-comparé : source auto reprend quand elle dépasse l'override Taux directeurs : - GBP : BoE API IUDBEDR primary + IR3TIB01GBM156N fallback FRED (IRSTCB01 inexistant) - USD/EUR/CAD/NZD : sources déduplicées (DFEDTARU, ECBDFR, BoC Valet, IRSTCB01) Zone Euro : - EUR CPI fallback : prc_hicp_mmr (404) → prc_hicp_midx + toIndicatorPct - EUR chômage : geo=EA21 (2026) + fallback EA20 Expectations : - data/rate_expectations.json : données correctes 29/05/2026 (Fed 68bps, ECB 49bps, BoE 53bps, BoJ +32bps, etc.) UI : - Tooltip bps : explication "1 bp = 0,01% de taux" - NarrativeButton : affiche le vrai message d'erreur (était "Erreur Bytez") - Groq API key manquante : message descriptif avec chemin Vercel Types : - IndicatorResult type explicite → corrige erreurs tsc pre-existantes (prev/lastUpdated) - toPmiIndicator retourne IndicatorResult Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Description
Languages
TypeScript
91.7%
JavaScript
6.4%
Python
1.5%
VBScript
0.3%