8 Commits

Author SHA1 Message Date
5005cc28ec fix(strategy-ui): correct rankings, currency, injection view and staleness
- MaxDD ranks shallower drawdowns first (values are negative); ruined
  results are badged and never ranked as best.
- Metrics render '—' for null/non-finite values instead of crashing.
- Amounts use the market's currency (CNY for CN) instead of hard-coded USD.
- Injection scenarios show invested / final value / profit / return on
  invested from capitalFlows and label return metrics as time-weighted.
- Precomputed results show their data end date and warn when older than 7
  days; live strategies warn when not updated for 4 days, show start date,
  price as-of, stale holdings, and same-window benchmark with excess return.
- Unknown precomputed scenario returns 400 instead of silently serving the
  first scenario; the client uses the scenarioId it receives.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:22:07 +08:00
8946267d80 fix(live): remount strategy detail when switching focused strategy
Keying LiveStrategyDetail by strategy name resets its child state (trade-log
pagination), so switching strategies no longer keeps the previous page index.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:17:09 +08:00
1db5a6365c chore(deploy): bind vite to localhost behind nginx and enable env proxy for node fetch
Vite is now only an upstream for the nginx :5443 HTTPS entrypoint, and the
API server opts into NODE_USE_ENV_PROXY so Nasdaq/Yahoo requests go through
the host proxy. Ignore the .qoder/ IDE session directory.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:16:34 +08:00
7350d6286c feat(ui): split client into Live and Strategy pages and wire new routes
Rebuilds the client into Live (watchlist with charts, fundamentals, news,
quant analysis) and Strategy (backtest runner / precomputed results) pages,
adds the corresponding /api/stocks/:symbol/chart|fundamentals|related|quant
and /api/strategies endpoints, and updates project tooling.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 23:21:03 +08:00
4cc9f847d4 feat(strategy): add backtest strategy module
Introduces strategyTypes shared schema and a server-side strategyService
that lists strategies, runs backtests, and caches results.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 23:20:50 +08:00
870b9cb2b1 feat(data): extend market data provider with charts, fundamentals, and quant analysis
Adds a stock data cache layer and indicator helpers (MA/RSI/MACD), expands
the MarketDataProvider interface with candles, fundamentals, related-data,
and quant analysis, and threads tags + source attribution through the
shared types. Updates affected agent tests.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 23:20:42 +08:00
6092675f8d chore: add dev start scripts for server and vite
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 22:59:32 +08:00
437565c16c feat: bootstrap personal stock agent 2026-05-11 21:10:55 +08:00