269 Commits

Author SHA1 Message Date
OpenSquared
ce9c0b53a9 feat: chatbot 2026-07-15 08:47:16 +02:00
OpenSquared
da536e2638 feat: chatbot 2026-07-14 17:55:49 +02:00
OpenSquared
c4de6957ea feat: chatbot 2026-07-14 17:31:34 +02:00
OpenSquared
2dc4d8e91b feat: wavelets 2026-07-14 16:40:19 +02:00
OpenSquared
b693aca2dc feat: wavelets 2026-07-14 16:23:18 +02:00
OpenSquared
ce948f6b65 feat: new cockpit 2026-07-14 14:43:29 +02:00
OpenSquared
ad07c8d886 feat: new cockpit 2026-07-14 11:21:43 +02:00
OpenSquared
9778c74ae3 feat: instrument model 2026-07-03 22:16:02 +02:00
OpenSquared
3be72e44cc feat: instrument model 2026-07-03 21:48:55 +02:00
OpenSquared
716d8fa56c feat: instrument model 2026-07-03 17:39:44 +02:00
OpenSquared
ff551deecd feat: instrument model 2026-07-03 17:20:22 +02:00
OpenSquared
2bb8109eb4 feat: instrument model 2026-07-03 16:03:59 +02:00
OpenSquared
2d8cccec07 feat: instrument model 2026-07-03 15:34:48 +02:00
OpenSquared
243375ff07 feat: instrument model 2026-07-03 14:48:00 +02:00
OpenSquared
90f894e5c6 feat: instrument model 2026-07-03 11:55:51 +02:00
OpenSquared
8f51e0de7b feat: instrument model 2026-07-03 11:00:23 +02:00
OpenSquared
5381b3fb92 feat: instrument model 2026-07-03 10:36:52 +02:00
OpenSquared
c3e9b21bda feat: instrument model 2026-07-03 10:17:02 +02:00
OpenSquared
f4e57e9d84 feat: instrument model 2026-07-03 09:59:26 +02:00
OpenSquared
980c797f53 feat: instrument model 2026-07-03 09:43:39 +02:00
OpenSquared
d9e9d30889 feat: instrument model 2026-07-03 00:31:30 +02:00
OpenSquared
a8ee808937 feat: instrument model 2026-07-03 00:04:37 +02:00
OpenSquared
ff6f0b390d feat: instrument model 2026-07-02 23:36:06 +02:00
OpenSquared
e2144d93e9 feat: instrument model 2026-07-02 22:46:55 +02:00
OpenSquared
7f7c343c9e feat: instrument model 2026-07-02 22:34:16 +02:00
OpenSquared
aecbdc9929 feat: instrument model 2026-07-02 20:31:30 +02:00
OpenSquared
ae5865a156 feat: pressure 2026-07-02 18:07:21 +02:00
OpenSquared
01709e5edf feat: causal lab 2026-07-02 16:46:38 +02:00
OpenSquared
5126360ce9 feat: causal lab 2026-07-02 14:42:50 +02:00
OpenSquared
5081514898 feat: calendar 2026-07-02 11:27:45 +02:00
OpenSquared
8098104f5b feat: causal lab 2026-07-02 09:26:52 +02:00
OpenSquared
916b7b38e6 feat: causal tab 2026-07-01 22:09:01 +02:00
OpenSquared
e1681edffc feat: causal lab 2026-07-01 21:01:00 +02:00
OpenSquared
1829335ad1 feat: macro series 2026-07-01 17:38:33 +02:00
OpenSquared
8b59eff744 feat: macro series 2026-07-01 16:16:51 +02:00
OpenSquared
776c19e1ae feat: macro series 2026-07-01 15:58:47 +02:00
OpenSquared
292d2c6413 feat: bank forceasts 2026-06-30 21:47:20 +02:00
OpenSquared
bb614936c3 feat: macro series 2026-06-30 19:08:33 +02:00
OpenSquared
c3cebc2d7e feat: instrument analysis 2026-06-30 17:23:51 +02:00
OpenSquared
9904c066b2 feat: instrument analysis 2026-06-30 16:15:39 +02:00
OpenSquared
12c298cf83 fix: graphe calculation 2026-06-30 12:00:42 +02:00
OpenSquared
ce7f89cf2a fix: graphe calculation 2026-06-30 11:45:55 +02:00
OpenSquared
f9dddb7184 feat: graph patch grammar DSL for causal editor
New grammar panel replaces free-text AI prompt with a two-step workflow:
1. NL to Grammar: GPT-4o converts description to patch ops (new endpoint ai-to-grammar)
2. Apply: frontend parser applies grammar locally without AI

Grammar syntax: (+|-|~)(node|edge|coef|input|instruments) key=val key=val
Sign shortcuts: + positive, - negative, = neutral
Auto-positions new nodes when x/y omitted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 09:30:17 +02:00
OpenSquared
40d6f14901 feat: causal lab — chip filters, editor zoom, AI modify prompt
Library:
- Color chip filters: category (with per-category colors), sub_type, instrument
- Date range filter (created_at) + text search
- Category labels unified to cover event_calendar, fundamental, calendar_event etc.
- Editer button on selected template → opens in editor tab
- Show created_at + created_by in template detail

Editor:
- Accepts initialId prop so Library can pre-load a template
- AI Modify zone: textarea prompt + button calls /api/causal-lab/template/{id}/ai-modify
- Returns modified graph_json from GPT-4o, applied live — user reviews then saves

Backend:
- New POST /api/causal-lab/template/{id}/ai-modify endpoint
  - Sends current graph_json + user prompt to GPT-4o
  - Returns validated modified graph_json (nodes/edges required)
  - Does not auto-save (user controls save)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 09:04:15 +02:00
OpenSquared
5e37cd81a2 fix: pass prediction_json and actual_json through to snapshot events
The filtered event dict was built with explicit fields and omitted these two columns,
so the frontend always received null despite the DB having valid data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 23:34:32 +02:00
OpenSquared
b33d06cb97 debug: add db_state display + raw pred_json, expand YFINANCE_MAP
YFINANCE_MAP now includes GBPUSD, USDJPY, USDCHF, AUDUSD, NZDUSD, USDCAD, XAGUSD, NASDAQ, DAX, FTSE, WTI, US30Y, DXY.
Frontend diagnostic panel shows db_state rows after Recalculer and raw prediction_json prefix per event.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 23:31:15 +02:00
OpenSquared
05236c31f3 fix: preserve debug info across snapshot re-fetch + widen refresh filter
- refreshDebug state lives in parent (InstrumentDashboard) so it survives
  fetchSnapshotSilent re-render (ExplanationScore no longer loses debugInfo
  when onRefreshDone triggers setLoading → unmount)
- fetchSnapshotSilent: re-fetches snapshot without setLoading(true) so
  ExplanationScore stays mounted with its state
- Refresh filter now catches rows where prediction_json is empty even if
  actual_json is populated, and handles '[]' / null variants

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 23:20:17 +02:00
OpenSquared
c73bedd7d0 debug: expose full inputs/outputs in Recalculer response for diagnosis
_run_auto_analysis now returns a rich dict {ok, inputs, node_values, actual_moves, error}
instead of bool. The refresh endpoint captures and forwards:
- inputs: what values were fed to evaluate_graph
- node_keys: which nodes were computed in prediction
- actual_moves: actual price pips fetched
- run_error: exception message if it failed

Frontend shows all of this after clicking Recalculer so the root cause is visible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 23:09:49 +02:00
OpenSquared
af73b77cba fix: ensure actual_json is computed for auto-generated templates
Auto-generated templates had no lag_days on edges → effective_lag_days=0 →
_drift_metrics used exact-date daily bar (often empty) → actual_json='{}' →
comprehensionScore returned null even after prediction_json was populated.

- Default effective_lag_days=5 when computed as 0 in _run_auto_analysis
- Add lag_days:3 to all auto-generated template edges in _build_graph_json_from_spec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 23:05:10 +02:00
OpenSquared
c93eba7a7f fix: compute surprise_pct from actual/expected when NULL for auto-analysis scoring
Events with surprise_pct=NULL (bootstrap or older events) got inputs={} → evaluate_graph
returned {} → prediction_json='{}' → all scores showed 'En attente'.

Three-step fallback in _run_auto_analysis:
1. Use event.surprise_pct if set (existing behaviour)
2. Compute from actual_value / expected_value stored in market_events
3. Look up most recent ff_calendar release by currency + date

Frontend diagnostic now shows surprise_pct per event and exposes actual/expected
in the refresh result panel to make the source visible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 22:54:57 +02:00