A live book is a cohort of strategies, each with its own account, started
on one date with one capital and a flat fee per order (trader.LIVE_BOOKS).
The original book keeps its state in data/; a named book in
data/books/<book>/. The monitor runs every book; auto/status/log/compare/
replay take --book. A fresh account opens on the book's first session.
selected_2026_09: US $10,000 and $1 per order from 2026-09-25, CN ¥50,000
and ¥5 per order from 2026-09-28 (the first CN session after the choice).
Strategies beat their benchmark in the Apr-Sep 2026 point-in-time replay
and passed a 10-year PIT backtest (US Sharpe >= 0.6, MaxDD > -50%; CN
Sharpe >= 0.2, CAGR > 0), no daily variants, at most two frequencies per
factor signal, plus the three 2026-09 research strategies.
bridge.py live --book and bridge.py books feed a book selector on the
live page (/api/strategies/live?book=, /api/strategies/live/books).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Strategies
- BarStrategy protocol (close/open/high/low/volume bars; row d uses bars
through d-1) and RobustMomentumStrategy: overnight_recovery_top10 (US),
lowrisk_momentum_top15 and lowbeta_sharpe_mom_top20 (CN), top-N with
rank hysteresis, 10-day rebalance, weights drift between rebalances.
- trader: strategy_fields/strategy_bars/bar_session_weights; one signal
path (_signals_for_sessions) replaces generate_target_weights.
Live fixes
- CSI 300 constituents come from China Securities Index's file; the
Wikipedia table was 122 names off the real index.
- S&P 500 change log moved to "Historical components of the S&P 500".
- data_manager: tickers missing from a partial Yahoo batch are retried
alone before being marked unavailable (CEG, GEV, SNDK ... were dropped).
update() takes fields=[...] and stores high/low/volume panels.
- Whole-lot orders go to the nearest lot within cash (CN books held ~62%
cash); held names are resized only beyond RESIZE_BAND (10%), so books no
longer pay a ticket fee to trade daily drift.
Web backtests
- backtest_runner.py replaces the duplicated bridge/precompute code: PIT
membership in both markets (data/csi300_history.json), stock universe
limited to index members (ETFs and benchmarks in the shared panel were
pickable), and the book kept like the live trader (simulate_live_book:
signal timing, drift, order floor, resize band, fees on orders placed).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- web/src/server/paths.ts resolves the repo root from its own location,
loads the single repo-root .env, and defines data/web/ (watchlist,
stock cache, backtest cache) and data/precomputed/.
- The API spawns bridge.py at the repo root instead of ../quant.
- precompute_backtest.py writes to data/precomputed/ instead of
../stock-agent/data/precomputed.
- Rename the project to quant-trading (web package quant-trading-web).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
trend_rider_v6 backtests failed ('SPY' not in data) because only the stock
universe was passed. Strategy markets in 'list' now follow the trader's
eligibility rule, so v6 is no longer offered for CN.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Monthly/yearly returns chain from the previous period's close (the first
trading day of every period was dropped; up to ~9pp/yr error).
- With cash injections, metrics/drawdowns/periodic returns are time-weighted
on the no-injection curve; capitalFlows reports invested/profit separately.
- Benchmarks cover exactly the strategies' dates.
- CAGR uses calendar time, so gaps in live records do not inflate it.
- Backtests skip the per-trade fee for rebalances below the live minimum
order and keep a ruined portfolio at zero.
- live: exact strategy match, ineligible strategies hidden, currency,
startDate, same-window benchmark, stale-price fallback, equity anchored at
the initial capital.
- PIT membership falls back to the cached history when the Wikipedia change
log cannot be parsed (the table is no longer on the page).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Register trend_rider_v7_vt36 (target_vol=0.36, min_lev=0.75) in
strategy registry, ETF universe map, and bridge metadata.
10y backtest: Ann 60.5%, Sharpe 1.87, MaxDD -29.2%.
- Add hot-reload to monitor: each phase re-imports trader module to
pick up newly registered strategies without restart. New strategies
are logged on detection.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- DEFAULT_MONITOR_STRATEGIES now includes ALL strategies (stock + ETF)
instead of excluding ETF strategies. The cmd_morning/evening/auto
already route ETF strategies to the correct data pipeline via
strategy_universe() and strategy_data_market().
- Register trend_rider_v7, v7_vt24, v7_vt32 in bridge.py STRATEGY_META
so they appear in the stock-agent frontend via /api/strategies.
- Monitor now runs as a background daemon with logs written to
logs/monitor.log (PYTHONUNBUFFERED=1, no tmux dependency).
PID saved to logs/monitor.pid.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>