feat: VaR/PnL schedulers + snapshots DB + page sur bouton
Backend:
- Tables var_snapshots + pnl_snapshots dans SQLite (contexte macro + prix tickers)
- var_service.py : save_var_snapshot, save_pnl_snapshot + fonctions get_*
- var_scheduler.py : threads APScheduler pour VaR (défaut 6h) et PnL (défaut 1h)
- router var.py : /run-now (POST compute+save), /latest, /snapshots, /pnl/run-now,
/pnl/latest, /scheduler/status, /scheduler/config
- main.py : démarrage des deux schedulers au startup
Frontend:
- VaRAnalysis.tsx : plus d'auto-fetch ; charge le dernier snapshot DB au mount ;
bouton "Calculer" → POST /run-now ; erreur backend = message clair ; historique
de snapshots sélectionnables
- Config.tsx : section "Schedulers VaR & PnL" dans l'onglet cycle avec toggle
enable/disable, intervalle, et boutons "Snapshot maintenant"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>