OpenSquared
66f6607568
feat: Data Management tab — purge endpoints for all major data stores
...
Backend — new DELETE /purge-all endpoints:
- /api/logs/purge-all → truncate system_logs (immediate, no 30d wait)
- /api/reports/purge-all → cycle_reports + ai_reports
- /api/portfolio/purge-all → portfolio + trade_entry_prices
- /api/analytics/purge-all → pattern_score_history, regime_clusters,
pattern_embeddings, cycle_runs,
macro_regime_history, geo_alert_history
- /api/var/purge-all → var_snapshots + pnl_snapshots
- /api/pattern-lab/purge-all → backtest_lab_runs
Frontend — Config.tsx: new 'Data Management' tab
- PurgeButton component with inline double-confirm (click Purge → confirm)
- Shows table names affected + row count deleted
- 6 purge actions: Logs, AI Reports, Portfolio, Analytics, VaR, Pattern Lab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-22 18:25:01 +02:00
OpenSquared
4a1dc76d26
feat: page Historique Positions + diff entre 2 snapshots PnL
...
Backend:
- get_pnl_snapshot(id) : détail complet d'un snapshot avec trades parsés
- diff_pnl_snapshots(a, b) : diff positions entre deux snapshots (nouvelles /
fermées / évolution PnL par position + delta portfolio)
- GET /api/var/pnl/snapshots/{id} : détail snapshot
- GET /api/var/pnl/diff?a=&b= : calcul du diff
Frontend PositionHistory.tsx :
- Timeline scrollable des snapshots avec sparkline PnL
- Clic snapshot → détail des positions à ce moment (prix entrée, prix actuel,
PnL %, PnL €, régime macro)
- Boutons A/B par snapshot → sélection de deux points à comparer
- Vue diff A→B : nouvelles positions, fermées, évolution PnL par trade,
delta portfolio (capital, PnL %, PnL €)
- Route /position-history + nav sidebar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-20 06:36:55 +02:00
OpenSquared
b4f3089c58
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 >
2026-06-20 06:21:20 +02:00
OpenSquared
d64d1029bf
feat: page VaR Analyse avec approche delta Black-Scholes
...
- Service var_service.py : calcul VaR Historique / Paramétrique / Monte Carlo
stressé (vol ×1.5) + CVaR par méthode, deltas BS par position, fallback
synthétique si yfinance indisponible
- Router /api/var/compute : paramètres confidence, horizon, lookback, IV défaut
- Page VaRAnalysis.tsx : cartes métriques %, montants EUR, histogramme retours,
VaR glissante 30j, tableau positions + deltas, backtest Kupiec pass/fail
- Route /var + nav sidebar « VaR Analyse »
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-19 23:15:39 +02:00