Commit Graph

6 Commits

Author SHA1 Message Date
Yuxuan Yan 31baa18ce5 Add offline workflow and coverage tests 2026-06-16 17:37:16 +08:00
Yuxuan Yan 3c58a1372e Use next-open returns for research eval 2026-06-12 18:41:18 +08:00
Yuxuan Yan 0a6f367fbf Evaluate weights against next-period returns to avoid look-ahead
Weights formed from close[t] now earn the t→t+1 return: forward returns
are computed on the full market calendar before selecting signal dates,
so a sparse signal grid earns the next available return rather than the
next signal date, and the final signal date (no forward return) is
dropped. Signal pct_change uses fill_method=None so suspended names do
not inherit stale prices.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 17:39:55 +08:00
Yuxuan Yan 534b91aaa4 Document and abstract portfolio trading costs 2026-06-10 15:41:38 +08:00
Yuxuan Yan 98a4f99300 Fix portfolio construction NaN handling 2026-06-10 14:58:06 +08:00
Yuxuan Yan 94ab679a75 feat: add portfolio phase — discretize alpha weights into tradable positions
Adds a fourth pipeline phase modeling A-share microstructure: lot sizes,
the 2023-08-10 Main Board increment change, STAR 200-share minimum/odd-lot
rules, limit-up/down, suspensions, volume caps, costs, and slippage.

Two layers: research (continuous weights → return/Sharpe/turnover/Fitness,
no IC per repo convention) and execution (state-dependent lot rounding +
two-stage greedy exposure repair + next-open reference simulator).

Wires `portfolio build/simulate/eval` into the CLI and adds the
POSITION/FILL/PNL schema contracts. Covered by tests/test_portfolio.py.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 11:23:04 +08:00