Commit Graph

132 Commits

Author SHA1 Message Date
jgrusewski
756b3bab47 docs: plan — deploy-the-fund knobs (fund_config CLI + per-sleeve allocation)
5 tasks: (1) fund_config model+read/write/fallback/validate/seed, (2) fxhnt
fund-config CLI + seed-on-migrate, (3) nightly reads fund_config for equity+
policy, (4) per-sleeve registry+provider, (5) suite-green. Post-impl: in-
cluster falsification gate (G1/G2/G3) + local cockpit verify.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 07:17:34 +02:00
jgrusewski
b1cfdf1a7f docs: spec — CLI-configurable fund capital+risk knobs + per-sleeve allocation
Deploy-the-fund knobs: single-row fund_config (capital, target_vol, kelly)
set via 'fxhnt fund-config', read by the nightly allocation with a settings
fallback. Per-sleeve crypto allocation (promote xsfunding/unlock via
promote_on_pass, demote bybit_4edge to a research reference; generalize the
honest-inputs provider to size any crypto sleeve). Marginal LOO gate KEPT +
a predetermined falsification gate (G1 survival / G2 deployment% / G3
anti-reactive) that accepts the honest verdict either way. target_vol 0.20.
Paper scope; execution wiring a follow-on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 07:07:48 +02:00
jgrusewski
c5f4405570 docs: plan — capacity-aware capital allocator (6 bite-sized TDD tasks)
Upgrade of the B2a allocation engine. Tasks: 1 inverse-vol (risk-parity) base weights, 2 capacity
ceiling from an honest capacity curve, 3 compute_allocation weights inverse-vol capped (not
equal), 4 honest-reference series+ceiling provider per deploy strategy (bybit_4edge book /
positioning sleeve / equity-default), 5 record_allocation sizes from the provider + caps at
capacity, 6 policy knobs (capacity_min_sharpe, equity_default_ceiling) + ceiling shown next to the
curve. Reuses forward-gating, cross-venue, funding-decay, killswitch, vol-target, $ conversion.
Self-review flags the int-vs-str series-key conversion at the provider seam. Scope stays paper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 23:12:38 +02:00
jgrusewski
5874c2d279 docs: spec — capacity-aware capital allocator (upgrade of the B2a engine)
Focused upgrade (not a new system) of allocation_engine.compute_allocation: (1) equal-weight ->
inverse-vol (risk-parity) capped at max_strategy_weight; (2) a per-deploy-strategy capacity
ceiling from the honest-reference so a growing fund never over-scales a capacity-limited edge
(xsfunding breaks ~$350k). Everything else (forward-gating via deploy+promoted, cross-venue,
funding-decay, killswitch, vol-target, $ conversion) already exists and is reused.

Gate reality investigated: deploy-tier = only bybit_4edge + positioning (both WAIT post-re-warm);
strategy_allocation is empty because compute_allocation needs 60 forward days but the re-warm
reset tracks to ~8. So sizing basis moves to the honest-reference BACKTEST (stable, capacity-
adjusted), with the forward gate as the LIVE-DEPLOY switch only ("honest weights now, live per
gate"). Granularity: bybit_4edge needs a book-level capacity; positioning uses its sleeve curve;
multistrat (IBKR equity) gets a high default ceiling in v1 (real equity-ADV model = follow-on).
Self-critical section: Sharpe-4 not forward-proven (concentration cap + gating guard), equity
capacity stub, backtest-sizing-not-live caveat. Scope stays paper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 23:09:40 +02:00
jgrusewski
19e669664b docs: plan — crypto honest-reference pipeline (8 bite-sized TDD tasks)
Implementation plan for the honest-reference spec. Builds on existing engines
(sleeve_weights_and_contributions -> coin-level {day:{sym:(w,r)}}, read_panel(_,"turnover")
for ADV, reconciliation_series == sleeve_returns_from_store(cost_bps=0) as the fidelity
invariant, nav_backfill_stats for Sharpe/CAGR/maxDD). Tasks: 1 honest-return core + fidelity
hard-stop, 2 AUM capacity curve, 3 sqrt-impact slippage + real-spread floor, 4 risk-parity
weights + book, 5 gates G1/G2/G3, 6 leverage-ceiling vs real DD + G4 anti-reactive, 7 candidate
edge #4 causal pump detector + 3-gate eval, 8 research report CLI. Read-only throughout; no
live cockpit/sizing change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 21:21:26 +02:00
jgrusewski
ec972017ce docs: spec — honest-reference (capacity/cost/leverage) pipeline for the crypto book
Research/validation-scope design for a coin-level capacity-, cost-, and leverage-honest
backtest reference, after quantifying (2026-07-15) that the book's numbers are tail-inflated:
top-10 days drive 58% of unlock / 29% of positioning; unlock's Sharpe collapses 1.03->0.19
under a P98 upside haircut; the "levered" backtest's -11.8% maxDD < the naive -15.4% (a
re-weighting artefact, not leverage).

Locked decisions (from brainstorming): coin-level ADV/impact model (turnover data verified:
818 coins, 2021-2026, USD); participation_cap 3%; AUM curve {35k,100k,350k,1M,10M} to locate
the ceiling; risk-parity/inverse-vol weighting; ex-ante risk layer with an anti-reactive gate
(G4) — reactive de-sizing stays out (A/B-rejected 3x); candidate edge #4 (pump/anomaly
detection) falsification-tested through the same honest-cost pipeline. No live cockpit change
(production gate-replacement is a follow-on). Self-critical section names the 5 ways this could
still fool us (recompute fidelity, slippage-is-modeled-not-measured, survivorship, AUM
relevance, still-a-backtest).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 21:16:06 +02:00
jgrusewski
49b6a102d8 docs: update IBKR parity spec+plan to mockup-validated UX
Consolidate /paper into ONE "Paper books" page (crypto simulated + IBKR real,
both clickable -> holdings detail); the holdings detail shows what it's holding
(assets + shares + value + %), recent trades (cost-to-trade %), value-over-time
(real vs plan) + per-strategy breakdown. Overview gets a plain "real trades"
sub-line + "behind plan" pill. HARD RULE: plain language, no dev jargon — a
single display_names map is the source of every rendered name; REAL PAPER vs
PAPER badges. Backtests page includes the IBKR tracks (D1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 22:54:44 +02:00
jgrusewski
2cbd2736e5 docs: plan — IBKR paper cockpit parity (D1 sim curve, D2 capture+detail, D3 overview, D4 account view)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 22:30:04 +02:00
jgrusewski
8a99aff76a docs: spec — expand IBKR paper parity to full UX (overview + account view + multi-strat)
Add D3 (overview EXEC badge + real-vs-sim divergence chip + account rollup),
D4 (/paper/ibkr account-level view: total NAV + all positions/fills +
per-strategy breakdown), a UX & information-architecture section (3-level
progressive disclosure, one divergence signal rendered consistently), and a
strategy-tagged data model so a second executor is a new ROW, not a redesign.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 22:27:15 +02:00
jgrusewski
5c0b9ddb27 docs: spec — IBKR paper cockpit parity (backtest sim curve + real DU-account book + reconciliation)
Bring the IBKR paper strategies to cockpit parity with the Bybit book: their
0a backtest curve in /paper/sim (D1), and capture the REAL DU paper-account
state (fills -> exec_fills, positions, NAV) rendered as a cockpit book +
reconciled vs the recomputed multistrat sim (D2) — the honest pre-live
verification. Paper-only (no live/arm), Bybit untouched (no EU testnet keys),
faithful extension of the existing exec path (IbkrBroker already reads NLV+
positions; exec_fills exists but is empty).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 22:19:53 +02:00
jgrusewski
47419b398b docs(0b): insert Task 3 (align Bybit reconciliation cost basis, single-source 5.5); renumber 4-9
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 21:04:08 +02:00
jgrusewski
22e35b39af docs(0b): fold state_file cleanup into spec + write implementation plan (8 tasks)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 19:52:01 +02:00
jgrusewski
31346cf4c5 docs(0b): spec — venue consolidation to Bybit+IBKR (migrate xsfunding+unlock, retire tstrend-standalone+stablecoin, remove Binance+Alpaca)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 19:44:06 +02:00
jgrusewski
976bd0089b docs(0a): align plan with as-built (task 5 report reuse, task 6 reader, task 8 gate-seam test)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 19:44:06 +02:00
jgrusewski
83a0e29894 fix(backtest): unify bybit-book scheduled writer — backtest-refs --all writes bybit_sleeve_ret + refs via shared compute-once helper (no cockpit-data regression) 2026-07-13 12:37:49 +02:00
jgrusewski
d035ff24b1 docs: plan — unified DB-backed backtest architecture (0a), 8 tasks
T1 backtest_ref dispatch + backtest.kind; T2 fix xsfunding sleeve ref (bug A);
T3 the CI invariant (gated-but-ref-less = failure); T4 TimescaleDuckDbEngine
(ephemeral ATTACH); T5 report provider + backtest-refs CLI; T6 route nightly refs
+ scheduled resourced CronJob (bug B, replaces manual Job); T7 park B3+carry
file-stores + verify paper_book DuckDB; T8 cockpit-local verify.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 11:13:11 +02:00
jgrusewski
dc5bdc929d docs: spec — unified DB-backed backtest architecture (Phase 0a)
One backtest->ref path (registry-driven dispatch: recompute-replay / report / none)
replacing the 3 fragmented mechanisms, so every reconciliation-gated strategy always
has a ref — a structural invariant (a gated strategy without a ref becomes a CI
failure). Fixes the live gate bugs: xsfunding (reconciliation gate, no ref -> stuck
WAIT forever) + the bybit deploy gate depending on an unscheduled Job. Timescale =
the one durable store; DuckDB repositioned as an ephemeral columnar engine that
ATTACHes Timescale (verified feasible on duckdb 1.5.3) for heavy report backtests —
no persistent DuckDB files/PVC in the live path. Heavy backtests move to a dedicated
resourced scheduled step (own memory, not the OOM-prone 4Gi daemon). Binance/Alpaca
cleanup (0b) + cockpit Ops/Fleet UI (Phase 2) + equity-factor revival are out of scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 11:07:17 +02:00
jgrusewski
8da219dfa3 docs: plan — IBKR consolidation (OPRA-backed XSP-VRP + UCITS routing), 9 tasks
Component A (Tasks 1-7): VRP on real OPRA data — pure BS/IV/parity helpers, OPRA
options adapter path, xsp_option_bars PIT table+repo, VrpStrategy defined-risk ladder
recomputed off frozen bars, registry+anchor, vrp_nav asset (freeze slice + real ref),
IBKR XSP mleg exec twin (SUSPENDED). Component B (Task 8): US->UCITS execute routing
(--venue ucits) + suspended monthly CronJob. Task 9: local cockpit verify.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 22:46:16 +02:00
jgrusewski
938ea3f0cd docs: spec — IBKR consolidation (OPRA-backed XSP-VRP + UCITS multistrat routing)
One fused venue-consolidation spec, two bounded components, execution coded-but-suspended:

- Component A (centerpiece): a `vrp` sleeve rebuilt on REAL OPRA option data (XSP
  put-credit-spreads, 2013→). Databento OPRA.PILLAR verified empirically (XSP/SPX bars
  back to 2013-04-01). Put-call-parity forward + IV-inversion 20Δ strike + real-mark
  defined-risk P&L, frozen into an xsp_option_bars PIT table. Wired to forward engine +
  reconciliation gate + merged CVaR sizing + cockpit. Supersedes the parked flat-VIX
  synthetic spec (biased placeholder).
- Component B (thin): UCITS-legal execution routing for the existing multistrat — modeled
  track UNCHANGED (models US underlyings, long history); adds a US→UCITS instrument map +
  `--venue ucits` execute path. PRIIPs blocks US ETFs on a Dutch retail account.

Both exec legs ship SUSPENDED (C1/C2/C3 pattern) — neither XSP options nor UCITS-Euronext
can be paper-executed on the US-style DU9600528 account. Crypto stays structurally on Bybit
(perp edges; IBKR can't host). Marks 2026-07-11 synthetic-VRP spec SUPERSEDED.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 22:38:41 +02:00
jgrusewski
a68a3ff929 docs: spec — defined-risk equity-VRP modeled sleeve (SPY put-credit-spreads, recompute)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 21:21:45 +02:00
jgrusewski
884183a959 docs: plan — resolve Task 5 test-file reference
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:54:03 +02:00
jgrusewski
58d16db332 docs: plan — configurable ceiling + CVaR-aware sizing (B2a)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:53:35 +02:00
jgrusewski
55cd3af22b docs: spec fix — preserve vol-degenerate k_vol=0 fallback (CVaR is a pure floor)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:51:05 +02:00
jgrusewski
b73c3a5228 docs: spec — configurable paper/live capital ceiling + CVaR-aware ex-ante sizing (B2a)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:48:51 +02:00
jgrusewski
503cc47612 docs: plan — unified execution-CLI + paper envelope + exec-venue (C3, single plan)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 00:20:54 +02:00
jgrusewski
a88d017170 docs: spec — unify execution on CLI (bybit port) + paper envelope + exec-venue (C3, single spec)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 00:17:34 +02:00
jgrusewski
195955b2c8 docs: plan — paper-validation envelope + exec-venue recording (C3)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 00:09:41 +02:00
jgrusewski
5a601cad4f docs: spec — bybit paper-envelope via explicit Dagster Config (symmetric w/ CLI flag)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 00:04:52 +02:00
jgrusewski
0a126754eb docs: spec — paper-validation envelope + real exec-venue recording (C3)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 23:57:12 +02:00
jgrusewski
c39d80745c docs: plan — cockpit surfacing + mobile redesign, 6 tasks
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 11:56:21 +02:00
jgrusewski
e508f71aa5 docs: spec — cockpit surfacing + mobile redesign (observability layer)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 11:48:58 +02:00
jgrusewski
5a93176f12 docs: plan — Bybit execution leg (C2), 5 tasks (funding-net envelope-basis exec track)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 10:04:37 +02:00
jgrusewski
6639db22fe docs: spec — Bybit execution leg (C2), B2a/B3-driven envelope + funding-net observed track
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 09:42:45 +02:00
jgrusewski
a16c8e2eb0 docs: plan — funding revocation on sustained decay (B3), 5 tasks; spec cockpit-defer
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 01:09:57 +02:00
jgrusewski
7456e987fe docs: spec — funding revocation on sustained decay (B3), scoped from health layer
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 00:56:38 +02:00
jgrusewski
a5a78ffac9 docs: plan — execution engine Alpaca/multistrat loop (C1), 4 bite-sized tasks
Pure helpers: scaled_weights bridge + envelope-basis flow-excluded compute_exec_return (T1) →
multistrat_exec observed registry track (T2) → record_exec_track books the exec return via A's
run_track + carries position-state (T3) → wire execute_multistrat to the B2a envelope, flatten
on $0, record on --execute (T4). TDD, reuses ExecutionService/AlpacaBroker/A's observed machinery,
no new engine, no capital authorized (paper, dry-run default).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 23:11:02 +02:00
jgrusewski
65569d593f docs: spec — execution engine Alpaca/multistrat loop (C1)
First slice of the execution plane (layer 5) on the data-driven-pipeline north-star. Makes
execute-multistrat B2a-driven: deploy exactly strategy_allocation[multistrat] dollars into the
multistrat book on Alpaca (envelope = min(target_$, NLV); $0/absent → flatten to cash — the
killswitch/prune propagates to real positions), reconcile + place via the existing ExecutionService
(dry-run default, hard-won gates), and record the executed book's daily return as an observed
forward_record for a new multistrat_exec track (comparable to the modeled multistrat). Load-bearing:
the exec return is on B2a's envelope (not full NLV) and excludes re-allocation capital flows
(time-weighted). Paper only; real capital human-armed. Builds on A + B1 + B2a.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 22:57:47 +02:00
jgrusewski
3b43856621 docs: plan — declarative strategy-level allocation policy + capital ceiling (B2a), 6 tasks
AllocationPolicy + hash (T1) → pure helpers full-history-vol/equal-weight-marginal-prune/killswitch
(T2) → compute_allocation ex-ante composition + anti-reactive invariant (T3) → target_capital hard
ceiling (T4) → strategy_allocation table+repo (T5) → nightly records the allocation from A's records
+ B1 deploy set (T6). TDD, ex-ante only (full-history vol), no capital moved (that is C).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 20:54:56 +02:00
jgrusewski
3a91373ac4 docs: spec — declarative strategy-level allocation policy + capital ceiling (B2a)
Core of the allocation plane (layer 4, plane 2) on the data-driven-pipeline north-star.
Versioned in-code AllocationPolicy + a pure compute_allocation: equal-weight the marginal-Sharpe-
gate survivors, ex-ante vol-target leverage from the FULL-history vol (never trailing — the
anti-reactive invariant that honours the 3x-rejected reactive de-sizing conclusion: ex-ante K +
rare killswitch), a rare latching aggregate killswitch, and target_capital that caps total
deployed gross at a HARD human capital_ceiling (the one human gate, in the versioned policy).
Recorded + policy-version-stamped. No capital moved (that is C). Builds on A + B1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 20:27:53 +02:00
jgrusewski
a1190dddca docs(policy): note promotion_min_overlap_days in the B1 spec field list (review minor)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 15:26:02 +02:00
jgrusewski
889ba74852 docs: plan — declarative gate + promotion policy (sub-project B1), 6 bite-sized tasks
GatePolicy + policy_hash (T1) → resolve_policy (T2) → wire gates to ResolvedPolicy, remove
scattered constants (T3) → forward_summary policy stamp columns (T4) → ingest stamps every
verdict (T5) → promotion correlation backstop (T6). TDD, byte-identical verdicts under current
thresholds, per-verdict audit stamp, no capital.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 13:31:33 +02:00
jgrusewski
7e9f8520b9 docs: spec — declarative gate + promotion policy (sub-project B1)
First plane of the policy layer (layer 4) on the data-driven-pipeline north-star.
Consolidates the scattered gate defaults (reconciliation_gate module constants + gate.py
inline literals + registry gate_spec) into one in-code, versioned GatePolicy; resolves the
effective per-track policy at one point; stamps each verdict with policy_version + a
content-derived policy_hash (auditability + forced version-bump); and formalizes promotion
as gate==PASS AND human promote_on_pass flag AND an automatic correlation backstop (< threshold
vs the equal-weight deploy book from A's records). Byte-identical verdicts under current
thresholds. No capital (deploy-tier is tracking; capital is B2). Builds on sub-project A.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 13:25:11 +02:00
jgrusewski
4a50c88ea5 docs: plan — deterministic forward state (sub-project A), 9 bite-sized tasks
Recompute-from-anchor implementation plan: forward_anchor table + repo (T1),
declared definition + hash (T2), append-only forward_record + book-state (T3),
pure recompute/derive_nav (T4), the anchor-lifecycle engine (T5), wire
_run_paper_tracker (T6), PIT Yahoo snapshots (T7), one-time migration (T8),
retire the state_reader JSON path (T9). TDD, WAIT-safe, idempotent, per-task commits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 23:00:41 +02:00
jgrusewski
55b26f8d32 docs: spec update — two record modes (recompute + observed) for sub-project A
Planning surfaced that not all active tracks are recomputable: xsfunding books a
live funding snapshot with no reproducible full-history series (and combined carries
latching kill-state). Add a per-track record_mode: `recompute` (anchor + PIT data,
the majority) vs `observed` (anchor + append-only immutable booked log + minimal
carried book-state in DB). Observed removes the hand-editable PVC JSON for those
tracks and is the same machinery sub-project C reuses for execution fills.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 22:54:25 +02:00
jgrusewski
e20eae988c docs: spec — deterministic forward state (sub-project A), recompute-from-anchor
Foundation of the unified data-driven pipeline: replace mutable, hand-editable
tracker JSON state with an immutable (T0, definition_hash) anchor in Postgres;
recompute the forward record over [T0, today] from PIT warehouse data each run;
auto-re-inception on declared-definition change. Migration preserves existing T0s
and reconciles (divergence = drift, surfaced not silenced). Yahoo closes get PIT
snapshots (recompute stability); execution fills scoped out to sub-project C.
Data-driven mechanics, human-gated capital — A does not touch capital.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 22:46:34 +02:00
jgrusewski
fd9534e978 feat(exec): multistrat book on Alpaca — target-weight bridge + crypto BTC leg
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>
2026-07-08 00:33:22 +02:00
jgrusewski
5b2cb72500 docs: spec — Alpaca execution foundation (fractional US-equity venue)
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>
2026-07-07 23:48:26 +02:00
jgrusewski
adc3d96d60 docs: spec update — add tail-concentration cap + drop glitch-guard (moves are real)
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>
2026-07-07 22:23:37 +02:00
jgrusewski
b737445a67 docs: spec — positioning capacity-aware realized returns
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>
2026-07-07 22:16:39 +02:00
jgrusewski
f258222094 docs: FALSIFY H2 spec — vol-target overlay is reactive de-sizing in disguise
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>
2026-07-07 20:02:23 +02:00