Puts the adaptive multi-strat ETF book on the clean execution port:
- multistrat.target_weights(closes): exposes the final-day per-instrument weights
(L*tw*volnorm_scale) that book_series applies but only collapses into a return.
Refactored _volnorm via a shared _volnorm_scale so book_series stays byte-identical.
Tested: sum(w*R[last]) reconstructs book_series's last booked return exactly.
- ExecutionService.rebalance_weights(weights, prices): a direct pre-computed-weights
entry beside rebalance(book), sharing one _plan engine (gates + fractional sizing).
Caller owns data<->broker symbol mapping.
- AlpacaBroker crypto-aware: a slash symbol (BTC/USD) -> time_in_force gtc; equities
stay day. So the book's BTC-USD leg trades on Alpaca crypto alongside the 5 ETFs.
- CLI fxhnt execute-multistrat (maps BTC-USD -> BTC/USD); the alpaca-rebalancer
CronJob now runs it (suspended until paper keys).
Full suite green (1832); +5 tests. Alpaca-crypto position-symbol form validated on
first paper run.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AlpacaBroker (httpx REST, Broker port) + fractional-aware ExecutionService +
paper-first CronJob. Runs on the survivor book (fxhnt execute --broker alpaca)
end-to-end. The multi-strat ETF book's position logic is NOT on the clean port
(only its return series is; live exec is an archived out-of-repo foxhunt script),
so putting THAT book on Alpaca (weight-extraction + ExecutionService bridge +
BTC-USD leg) is an explicit follow-up reusing this foundation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
OHLC/spot investigation: the +150% microcap days are REAL (HUSDT +154% spot-
corroborated, $214M turnover, capturable at $100k) — NOT glitches. So the fix is
capacity-cap (scale protection) + an ISV-driven per-coin tail-concentration cap
(contribution <= K*sigma_book, gains-only) to cut the fat-right-tail dependence
(28% of return from 10 days), NOT a glitch guard (would suppress real gains).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cap each coin's realized GAIN by a capacity fraction min(1, pi*med_turnover/(capital*|w|))
in _book_breakdown (the SSOT for the positioning forward + gate ref + 4-edge book).
Gains-only/conservative; capital-aware (barely binds at $100k where positioning IS
capturable, caps thin names as capital scales). Fixes the microcap-squeeze overstatement
(28% of return from 10 uncapturable +150% microcap days) the investigation surfaced.
Data-glitch filtering + other sleeves are non-goals.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ran the spec's own anti-pro-cyclical gate early (pre-build): the +0.24 OOS book
Sharpe is pure vol-shrinkage, not return (daily diff -0.31bp, t=-0.65). The
de-risk misses more upside than downside it avoids (net -10.8%) and cuts hardest
before top-decile up days (0.854 vs 0.904) = the cut-before-the-bounce signature.
In crypto-bull, high vol correlates with drawdown-then-bounce, so vol-conditioning
== the 3x-rejected drawdown de-sizing in effect. Not built; raw momentum stands.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Q2 (deterministic warehouse-backed sleeve): drop the separate 2-3wk shadow wait.
Back-compute vol-targeted momentum + book over backtest + elapsed forward; if
gates pass, swap into bybit_4edge (re-inceptions 0/21) and let the book's own
21-day gate be the frozen-forward validation. Contrast xsfunding (live-snapshot,
un-backfillable). Q1: gate 1 becomes multi-condition (net Sharpe >=+0.15 AND DD
non-worse AND per-year consistent AND anti-pro-cyclical clean) instead of a
brittle single +0.2 point.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ex-ante sleeve-level volatility-target overlay on crypto_tstrend (TrendRunner):
scale exposure DOWN in high-realized-vol regimes, never lever (cap=1.0). OOS
investigation (881 test days) shows +0.24 book Sharpe / -1.4pp maxDD, robust
net-of-cost to 40bp/turn and across L/floor params. Distinguished from the 3x
rejected reactive de-sizing (conditions on vol, not drawdown; improves DD).
Strict gates: net-book re-measure >=0.2 Sharpe, anti-pro-cyclical falsification,
per-year consistency. Shadow-first deploy (false-WAIT-safe).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Execution-mechanics validation on Bybit testnet via a SEPARATE Dagster job (no CronJob),
ccxt adapter, market orders, raw-weights + overlay-re-applied-on-testnet-state, decomposed
slippage (execution vs timing, pure+tested), execution-gap verdict. Slippage-magnitude
(unlock 35bp) honestly deferred to mainnet micro-live (thin testnet alt liquidity).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>