Commit Graph

5904 Commits

Author SHA1 Message Date
jgrusewski
2eb8cd8333 docs: spec — migrate Terraform state GitLab -> Scaleway Object Storage (Phase 2A)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 15:16:28 +02:00
jgrusewski
2c08b49b4f Merge: decommission dead Rust infra (Phase 1)
GPU pools (L40S/H100/cpu-hm) destroyed, 4 gitlab-runners uninstalled, 5 build-cache
PVCs + Scaleway volumes deleted (~195GB), 3 Rust buckets deleted (~6.7GB, 0 .dbn),
dead Argo templates/manifests removed. All .dbn market data + fxhnt/platform preserved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:46:26 +02:00
jgrusewski
b1a60ca134 chore(infra): remove dead Rust Argo templates, runner values, GPU overlays, cache PVC manifests
Removed (Rust compute/CI/GPU, now decommissioned):
- argo: alpha-{cv,perception,rl}, build-ci-image, ci-pipeline, compile-and-deploy,
  gpu-test-*, lob-backtest-sweep, nsys-test, sanitizer-test, smoke-test, train,
  train-multi-seed, refresh-deps-cache templates + README; cargo/sccache PVC manifests;
  Rust CI events (ci-pipeline-sensor, gitlab-push-eventsource, auto-compile-configmap)
- gitlab: runner-{h100,h100x2,rl,}-values.yaml (runners uninstalled)
- gpu-overlays/: ml-training + trading GPU service overlays
- training/: training-output-pvc, image-prepuller, job-template, populate-test-data, s3-creds example
- kustomization.yaml trimmed to platform RBAC + netpol

Preserved (.dbn data tooling + kept-PVC declarations + active deploy):
- training/: training-data-pvc, test-data-pvc, download-mbp10/trades, data-sync/upload jobs
- argo: databento-download-template, feature-cache-pvc, fxhnt-cockpit (cluster)

Cluster: deleted 14 dead wftmpls + gpu-test-nightly/refresh-deps-cache-nightly crons.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:45:06 +02:00
jgrusewski
f4f54c352b chore(infra): destroy GPU+precompute pools (L40S/H100/cpu-hm) — Rust training retired
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:33:20 +02:00
jgrusewski
a0181431b3 docs: plan — decommission dead Rust infra (Phase 1), inline+gated execution
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:24:41 +02:00
jgrusewski
feb0ae2541 docs: spec — decommission dead Rust infra (Phase 1), data-preserving (keep all .dbn)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:21:49 +02:00
jgrusewski
4afaa5e248 fix(infra): resolve double-declared NAT gateway (kapsule vs public-gateway)
The real gateway foxhunt-gw (42653780) was an unmanaged orphan: kapsule state never had a gateway,
public-gateway state referenced a deleted gateway (7a7ffaa5) -> BOTH modules' terragrunt apply would
have created a duplicate gateway (risking cluster egress). Fix:
- kapsule module: removed the legacy gateway/dhcp/gateway_network resources (pre-refactor duplicate,
  never in kapsule state; cluster only needs the private_network which stays). kapsule plan now clean.
- public-gateway module (canonical, IPAM mode): state rm the stale 7a7ffaa5 refs + imported the real
  gateway/gateway_network/IP (42653780 / 661c8543 / dc419a10); set bastion_enabled=true to match the
  live gw. public-gateway plan now 'No changes'. Live gateway untouched throughout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 14:05:50 +02:00
jgrusewski
e21a9a5da4 fix(gitlab): enable terraformState object storage (was 403 on all TF-state API calls)
Root cause: global.appConfig.terraformState was missing entirely from the GitLab Helm values, so the
chart rendered terraform_state.enabled=false + object_store disabled -> every /terraform/state API call
403'd ('Object Storage is not enabled for Terraform::StateUploader'), blocking terragrunt. State files
were intact in MinIO (foxhunt-gitlab-artifacts) the whole time. Added terraformState{enabled,bucket,
connection} mirroring artifacts/lfs/packages; helm upgrade -> revision 25 -> TF-state API now 200.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 13:54:13 +02:00
jgrusewski
b2efc58940 fix(ci): downsize ci-compile-cpu pool POP2-HC-32C-64G -> POP2-4C-16G (root-cause: zone stock-out)
Root cause of the stuck cockpit deploy: ci-compile-cpu (32C/64G POP2-HC) hit a fr-par-2 zone stock-out
('Resource POP2-HC-32C-64G is out of stock') -> autoscaler ScaleUpTimedOut -> kaniko build Pending forever.
The big node was sized for the now-dormant Rust cargo compile + precompute_features; the Python fxhnt
cockpit build only needs ~2-6 vCPU. Downsized to POP2-4C-16G (in stock in fr-par-2, far cheaper, scale-to-zero).
Apply blocked in-session: cluster GitLab tokens lack 'api' scope for the TF state backend (403).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:26:01 +02:00
jgrusewski
fbb7b429e3 infra(cert): ACME wildcard *.fxhnt.ai via cert-manager + Scaleway DNS-01 (replaces expired manual LE cert)
cert-manager ClusterIssuers (LE staging+prod) + Certificate writing gitlab-tls-cert, auto-renewing.
Scaleway webhook helm-installed (scaleway/scaleway-certmanager-webhook, cert-manager ns); DNS creds
in cert-manager/scaleway-dns-credentials. Proxy tls-certs volume repointed live to gitlab-tls-cert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 11:21:30 +02:00
jgrusewski
f4bd1e2432 research(surfer): crypto edge-falsification probes — intraday/cascade dead, stablecoin peg-reversion validated
- crypto_mft_xsec / mft_*: intraday/MFT XS price edge FALSIFIED (fee-trap)
- crypto_cascade_reversion: liquidation-cascade reversion FALSIFIED (continuation)
- crypto_trend_sizing: TS-trend return-engine reconfirmed (Sharpe ~1.25)
- crypto_stablecoin_dislocation/harden/intraday: short-rich peg-reversion VALIDATED (bounded, uncorrelated); long-cheap = death-spiral trap

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 10:40:34 +02:00
jgrusewski
6878aac950 fix(ci): grant ci-deploy SA serviceaccounts/pvc/cronjobs + deployments-watch
The fxhnt-cockpit deploy step applies manifests containing ServiceAccounts (dashboard/dagster), a PVC
(forward track), and a CronJob — none of which the ci-deploy Role permitted, so kubectl apply failed
partway. Also added 'watch' on deployments for 'kubectl rollout status'. Surfaced once the cockpit deploy
finally ran (it previously died at the MinIO log sink first). Rule: this Role must gain a grant for every
new resource KIND a deployed manifest introduces.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 22:36:25 +02:00
jgrusewski
bccd814716 deploy(proxy): route dashboard.fxhnt.ai to the fxhnt cockpit (via its tailnet node)
Replaces the web-dashboard upstream. Proxies peer-to-peer over the tailnet (the kernel-mode proxy can't
reach platform-pool ClusterIPs due to the 100.64/15 pod-CIDR ↔ Tailscale CGNAT overlap, but reaches tailnet
nodes fine). Live CM already patched; this keeps the repo in sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 14:42:55 +02:00
jgrusewski
cfa28368d5 fix(surfer): futures fetch weekly (Sunday only) in forward-track cron — cost control
Daily 16y all-expiry Databento refetch was ~$6/day (~$190/mo) for the 17% hedge sleeve. Now: crypto_pit
fetched daily (free, the 83% alpha), futures fetched only on Sundays (~$25/mo, within free credits), and
forward-track runs daily (books the combined book's new days). The alpha is validated daily-accurate; the
slow trend hedge weekly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 00:11:00 +02:00
jgrusewski
f9b62d108c feat(surfer): fxhnt combined-book forward-track cron + dynamic fetch END
fetch_daily.py: END now clamps to the GLBX dataset range-end (was hardcoded 2026-06-05; clamp handles the
~1-3d exchange lag — END=today failed get_cost). scripts/surfer/fxhnt_forward_cron.sh: daily wrapper —
fetch crypto_pit (free) + futures (Databento, cost-capped) + 'fxhnt forward-track' to book the new paper-
NAV day of the validated combined book (crypto X-sec momentum alpha + futures trend hedge). Crontab: daily
23:30 UTC -> data/surfer/fxhnt_forward.log. Sources DATABENTO key from ~/.secrets (never printed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 00:09:40 +02:00
jgrusewski
54e3d50db8 backtest: fusion (regime-adaptive QQQ<->crisis-alpha) FAILS OOS, keep static GD
Fused all ideas: QQQ core + foxhunt controllers as a ROTATOR (edge-decay-trust + resurrection +
drawdown-CB) rotating QQQ<->crisis-alpha by regime. Pre-registered criterion: beat static GD on OOS
Calmar. RESULT: full-sample fusion Calmar 0.41 > GD 0.34 (IS-flattered by 2008), but OOS (2018-2026)
static GD 0.64 > fusion 0.58, even pure QQQ 0.59 > fusion -- GD strictly dominates OOS (higher CAGR +
lower DD). Regime-rotation whipsaw + late-re-entry cost exceeds the protection benefit in bulls.
Verdict: fusion fails OOS -> keep the simpler static GD. Simple beats fancy; only OOS separates them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 23:01:04 +02:00
jgrusewski
d82439219d add: drawdown-profile analysis tool (multistrat_dd.py)
Full drawdown profile of the deployable book (depth/frequency/duration/recovery/ulcer) vs 60/40.
Analysis tool, not part of the deployed pipeline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:11:06 +02:00
jgrusewski
3f321bb4bf fix: broker-data sanity-check + drop incomplete intraday bar (two live-only bugs)
(1) IBKR paper reports summary fields (cash/GrossPositionValue) inconsistent with actual positions
(found: $141k/13% gap, fills+positions are ground truth). Bot now cross-checks NLV vs cash+position-
market-value, WARNs on >2% gap, sizes on the CONSERVATIVE NLV (never inflates), and a gate refuses to
trade if the gap exceeds MULTISTRAT_DATA_TOL (default 25%).
(2) build() included today's INCOMPLETE intraday bar when run mid-session -> spiked vol estimate ->
halved the leverage (1.0->0.5) -> would have sold half the book as churn at the 14:35 cron. Now drops
today's partial bar; uses completed closes only (matches the daily-close backtest). Verified live:
leverage back to 1.0, book recognized on-target (in_band), no spurious orders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:01:04 +02:00
jgrusewski
02b851ca8b feat: growth-discipline forward-tracker (NAV sim, alongside the live book)
Works exactly like multistrat_paper.py (daily cron, status/run/weights, idempotent, forward-start,
catch-up) but tracks the GD strategy: 70% QQQ + 30% multi-strat book, continuously rebalanced. NAV
simulation (no orders) running alongside the live IBKR-paper book to compare forward: GD = higher
CAGR, deeper drawdown by design. Cron 12/15/18 UTC. GD_EQUITY_WEIGHT configurable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 09:45:35 +02:00
jgrusewski
a3f309dd7e backtest: growth-discipline multi-premia (QQQ core + trend sleeve + book)
User's '10x boring' idea tested. GD-70 (70%QQQ/15%trend/15%book) has highest Sharpe-excess (0.67-0.84
vs QQQ 0.65, book 0.39); trend sleeve = genuine crisis-alpha. GD@1.3x cheap-lev ~= QQQ return with
shallower drawdown (-48 vs -53%). VRP(PUTW) does NOT add (dilutes); carry no clean retail ETF. Clean
stackable premia = equity-core + trend-sleeve + execution-alpha (behavior gap/tax/cheap-lev, on top,
not in backtest). GD genuinely beats both the over-conservative book and panic-prone raw QQQ.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 09:42:30 +02:00
jgrusewski
db8f5434a0 doc+tool: CAGR-maximizer reference plan + side-by-side strategy comparison
Honest reference plan (docs/.../2026-06-08-cagr-reference-plan.md): CAGR builds wealth not Sharpe;
more CAGR always = more drawdown; only free CAGR is drag reduction; book's 0.96 Sharpe was an rf=0
artifact (excess-over-financing, equities win); leverage moat = cheap financing. Recommendation:
max equity + low drag + contribute + never sell, optional 1.2-1.3x futures if you survive -65%.
strategy_compare.py: re-runnable side-by-side (book / SPY 1x / SPY 1.3x / 60-40 / 70-30 / overlay)
with backtest stats + the P0+PMT trajectory. Configurable --p0 --pmt --fin --years.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 08:34:49 +02:00
jgrusewski
1cdbc81390 tune: daily weekday rebalancer eval (35 14 * * 1-5, REBALANCE_DAYS=1)
Switch from weekly to daily (weekday) evaluation for faster risk response — the leverage (vol-target
+ drawdown CB + corr de-risk) re-evaluates each day so a vol spike de-levers within a day vs a week.
Hysteresis (3% NLV) still gates actual trades, so turnover stays low (in-band days = no-ops). No
return impact; tighter risk only. Weekends excluded (US market closed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:51:20 +02:00
jgrusewski
7662d82232 fix(bot): whole-share orders (IBKR API rejects fractional, err 10243) + state only on accepted
Eyes-on EXECUTE=true validation caught two bugs: (1) fractional qty -> all 6 orders cancelled (10243);
round to whole shares (skip if 0). (2) last_rebalance was set even when all orders were rejected,
which would block retry; now only marked when >=1 order is accepted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:34:01 +02:00
jgrusewski
2a468e4b5e arm: multistrat-rebalancer EXECUTE=true (autonomous paper trading)
After full validation (in-cluster connect via 4004, paper account DU9600528, gates pass, clean logs
post NaN-fix), arm the CronJob to place paper orders. Triple-guarded against real money: paper
account + Gateway paper-mode + bot refuses non-DU without MULTISTRAT_ALLOW_LIVE_CONFIRMED.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:31:18 +02:00
jgrusewski
8ebb65f27e fix: NaN-safe correlation de-risk in book_series (zero-variance windows)
np.corrcoef on a window where a vol-normalized stream is constant (warmup / non-moving stream)
divided by zero std -> RuntimeWarning + NaN in the corr matrix -> ac=NaN -> propagated via chist
into the z-score and could poison leverage L and book with NaN (silent corruption). Fix: correlate
only streams with std>0 in the window, nansum over the actual valid count, fall back to ac=0 when
<2 vary. Verified: no RuntimeWarning (tested with warnings-as-errors), no NaN, identical L/weights.
Affects all scripts importing book_series + the cluster ConfigMap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:29:36 +02:00
jgrusewski
f320c5f09f fix(infra): rebalancer connects to ib-gateway:4004 (socat bridge), not 4002
Pod-to-pod on 4002 reaches IB Gateway with the pod IP as source -> not in the trusted-IP allowlist
(default 127.0.0.1) -> TCP connects but API handshake times out. The gnzsnz image's socat on 4004
relays via localhost so IB Gateway trusts it. (Local port-forward worked on 4002 because it enters
the pod netns = localhost.) Egress netpol now allows 4002+4004; IB_PORT=4004.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:20:28 +02:00
jgrusewski
dc2b7214f7 feat(infra): K8s CronJob for multi-strat rebalancer (production deployment)
Weekly in-cluster CronJob running multistrat_bot.py on IBKR paper via the existing ib-gateway
(connects to ib-gateway:4002 directly, no port-forward). Lean: code via ConfigMap (no image build),
python:3.12-slim + runtime pip. Includes PVC (state/HWM persistence across runs), egress
NetworkPolicy (ib-gateway:4002 + 443 for pip/Yahoo + DNS), and ib-gateway ingress patched to allow
the rebalancer. Schedule Mon 14:35 UTC (~1h after US open). MULTISTRAT_EXECUTE=false by default
(cluster dry-run); flip to true after validating logs. Drawdown CB + leverage cap + idempotency +
paper-guard enforced by the bot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:16:36 +02:00
jgrusewski
4bbf07bddf feat: production multi-strat rebalance bot (lean enterprise core)
Single-file cron-ready IBKR rebalancer for the adaptive book. Money-touching core only: env config
(no secrets), paper/live guard (refuses live without MULTISTRAT_ALLOW_LIVE_CONFIRMED), leverage cap,
HWM drawdown circuit-breaker, fat-finger per-order cap, once-per-period idempotency, stale-price
guard, post-trade reconciliation, structured JSON audit log. Default dry-run; run needs
MULTISTRAT_EXECUTE=true. Verified vs cluster ib-gateway paper (DU9600528): gates pass, 6-order plan,
JSON audit trail + HWM state persisted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:10:24 +02:00
jgrusewski
66e37955ce feat(ibkr-bot): mini test mode — validate paper env + order routing with 1 share
'mini' mode: confirms account is paper (DU prefix; aborts on live U-prefix), places BUY 1 SPY,
reports fill/routing. Validated against cluster ib-gateway: account DU9600528 [PAPER], order routed
(PreSubmitted, queued for next open — market closed on weekend). Confirms the full chain works:
cluster Gateway -> port-forward 4002 -> bot -> paper account.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:59:27 +02:00
jgrusewski
63d4f7f61d fix(ibkr-bot): entry-from-zero uses 0.5% floor, not full 3% hysteresis
The 3% hysteresis blocked the IBIT crypto sleeve (target 2.3% < 3%) from ever entering. Hysteresis
is for damping rebalances of existing positions; first entry from zero should use a small floor.
Now all 6 instruments deploy. Verified live against the cluster ib-gateway paper account ($1M NLV):
all 6 orders present (SPY/IEF/GLD/PDBC/DBMF/IBIT). Connected via kubectl port-forward svc/ib-gateway 4002.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:50:49 +02:00
jgrusewski
ba543ea85e feat: IBKR paper-trading bot for the adaptive multi-strat book (ib_async)
Runs the book on IBKR PAPER (realistic fills, no capital): gets target weights from the harness
(Yahoo), connects to IB Gateway/TWS paper, rebalances the ETF book (SPY/IEF/GLD/PDBC/DBMF + IBIT
for crypto = no exchange counterparty tail). Default dry-run (shows intended orders); 'rebalance'
places on paper. Hysteresis 3% of NLV. User runs Gateway + logs in (their creds); bot connects on
127.0.0.1:4002 (paper Gateway) / 7497 (TWS). Best paper-forward: realistic fills + real API, zero
risk. Setup steps in the docstring.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:20:55 +02:00
jgrusewski
e35b79a531 spec: add concrete micro-live runbook (Appendix A)
Phase-2 runbook: $500-1k unlevered, all-in-one-brokerage fractional ETFs (SPY/IEF/GLD/PDBC/DBMF +
IBIT for crypto -> removes the exchange counterparty tail). Get weights via multistrat_paper.py
weights 1000, place manually, rebalance MONTHLY at micro scale (weekly deltas are rounding-dominated)
with 5% hysteresis, track actual-vs-intended. Gate to scale (~4-8wk): live ~= paper, cost <20bp,
clean ops. Objective is execution validation not return (pennies on $1k). Validation context: +1.20
in-sample / +1.41 holdout-OOS / +0.96 20yr (survived 2008/2020/2022) / bootstrap p5 +0.62.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 21:50:15 +02:00
jgrusewski
40c6e2f2ab test: multi-strat 20yr robust (survived 2008/2020/2022) + bootstrap CI (p5 +0.62)
Faster confidence without waiting forward: long-history (2006-2026, 20y incl all crises) on
SPY/IEF/GLD/DBC+trend (conservative, no DBMF/crypto). Full Sharpe +0.96, maxDD -9.9%; survived
EVERY crisis (2008 +1.1, 2020 +1.4, 2022 -0.2), shallow DDs; 16/21 yrs positive. Block-bootstrap
CI: Sharpe p5 +0.62 / median +0.99 / p95 +1.34, P(>0.5)=99%. 2006-2018 quasi-OOS held +1-2/yr.
This is the weaker version (full book +1.20/+1.41 OOS). Robust across 20y + every crisis with
positive CI floor -- strongest/fastest-confirmed deliverable. Faster-confidence levers: longer
history, bootstrap, micro-live.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 21:47:32 +02:00
jgrusewski
4817bd4e7c test: FinBERT news-sentiment (real LLM, real FNSPID data) -> dead for retail
User wanted to download a small open LLM and test news. Did it: FinBERT scoring 10408 FNSPID
headlines (7 tickers, 1332 obs). corr(sentiment, same-day ret) +0.082 (weak, contemporaneous);
next-day +0.026 (~0); next-day trade net 10bp OOS Sharpe +0.05 (dead). News real but reaction
INSTANT (HFT-captured); no tradeable next-day drift for retail; net of cost = nothing. Matches
Lopez-Lira/Tang + FinGPT research. Model was never the constraint -- market structure is. Closes
the news/LLM thread; deployable answer remains the adaptive multistrat book (news = risk-managed).
(note: pin transformers<5 for torch 2.6.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 21:13:54 +02:00
jgrusewski
a9a1c3c511 test: diversification maxed in base-6; more streams dilute (they're beta-repackaging)
What to do with diversification? Tested sqrt(N) lever: base-6 vs expanded-12 (+REITs/TIPS/HY/intl/
EM/vol-premium). Expanded WORSE (+1.20->+1.04, 2022 +0.1->-1.4): candidates are equity/bond-beta in
disguise -> concentrate not diversify. Trust layer manages edge-health not redundancy. Genuine
uncorrelated net-positive streams are scarce; base-6 already spans the distinct premia. Diversification
is maxed in the deployable book; the lever is capital, not more streams.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 20:50:27 +02:00
jgrusewski
247e469a31 test: cross-market connectedness = diversification, not alpha
User intuited markets are connected -> exploitable? Measured equity/bond/gold/commod/trend/crypto
(2019-26): contemporaneous corr low (+0.03 avg; equity-crypto +0.43, equity-trend -0.28), crisis
corr STABLE (didn't spike -> diversification held in stress), lead-lag ~0 (trade OOS Sharpe -1.01).
Connectedness is priced-in -> value is diversification (already in the book, validates it beating
60/40 low-DD), not a predictive signal. Same efficient wall for cross-market alpha.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 20:46:38 +02:00
jgrusewski
ac01db39fa spec: update perf with validated real-ETF backtest (+1.20 Sharpe, -5.4% DD, every year positive)
Replaces the ~0.5-0.7 estimate with the validated 2019-2026 real-ETF backtest: +1.20 Sharpe
(realistic fwd ~0.8-1.0), -5.4% maxDD, positive every year incl 2022, beats 60/40 (+0.87/-21%)
on Sharpe AND drawdown. Robust signals: low maxDD + every-year-positive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 20:29:17 +02:00
jgrusewski
9a90720500 backtest: deployable ETF book Sharpe +1.20, maxDD -5.4%, every year positive (beats 60/40)
Backtested the EXACT live pipeline on REAL ETFs (SPY/IEF/GLD/PDBC/DBMF+BTC), 2019-2026 multi-regime.
Adaptive unlevered: Sharpe +1.20, ann +6.1%, maxDD -5.4%, positive EVERY year incl 2022. Beats
60/40 (+0.87, -21%) and equity (+0.85, -34%) with ~1/4 the drawdown. Better than the ~0.7 framing
because real ETFs (DBMF/PDBC) >> roll-zeroed futures proxies + adaptive risk layer. Caveats: Sharpe
partly low-vol-flattered (maxDD -5.4% + every-year-positive are the robust signals); 2019-26 favorable
for premia; mild param-contamination -> realistic fwd ~0.8-1.0. Modest absolute return (~.1k/yr on
5k, very smooth); lever for $ is capital. The genuine deliverable of the search, validated on real
instruments across regimes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 20:28:37 +02:00
jgrusewski
ce8f8cbd46 test: ML vol-nowcaster (Mamba2/CfC/TLOB proxy) doesn't help risk layer
User asked if advanced architectures help. Tested ML vol-nowcaster (GB proxy) vs EMA for risk-layer
de-lever timing: GB OOS vol-corr +0.09 < EMA +0.18 (EMA captures clustering better); downstream
identical Sharpe +0.72, GB maxDD slightly worse. ML doesn't help -> CfC/Mamba2 won't either (more
overfit). Return-prediction already dead (IC 0.004); TLOB's order-book signal is latency-gated.
Fancy architectures add nothing; engine value = simple adaptive risk/allocation. Simple beats fancy,
confirmed once more. Adaptive multistrat book (EMA-vol, ~0.72 Sharpe, -8.5% maxDD) is the answer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 20:14:25 +02:00
jgrusewski
ba7e7dca79 feat: adaptive multi-strat paper-forward harness (spec Phase 1)
Full 6-stream adaptive book live paper-forward: SPY/IEF/GLD/PDBC/DBMF + BTC-USD via Yahoo, with
edge-decay trust allocation + adaptive risk layer (EMA vol/Kelly-floor/self-recovering DD/z-score
corr), unlevered. status/run/weights modes, forward-start, idempotent, catch-up. Cron 12/15/18 UTC.
Live weights sensible: trust down-weights bond(7%)+crypto(2%), gold/commod/trend healthy(~23%).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 20:02:51 +02:00
jgrusewski
60e900e43a spec: adaptive multi-strat book — deployable (the honest endpoint)
Diversified, edge-decay-adaptive, adaptively-risk-managed, UNLEVERED multi-asset ETF book
(SPY/IEF/GLD/PDBC/DBMF + small BTC). ~0.5-0.7 Sharpe, ~-7-12% maxDD, ~$2-3k/yr on $35k, scales
with capital. Edge-decay-trust allocation + adaptive risk layer (EMA vol, Kelly-floor, continuous
self-recovering DD de-lever, z-score corr, leverage-floor) = the foxhunt engine as risk/allocation
brain (validated). Unlevered because retail financing (6-7%) kills the leverage benefit (1x Sharpe
+0.48 vs 2x +0.14); the hedge-fund moat is cheap prime-brokerage financing, structural not algo.
Premium harvest, not alpha; engine value = risk-mgmt. Phased rollout: paper-forward -> micro-live ->
scale. The honest deployable endpoint of the whole search.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 19:51:37 +02:00
jgrusewski
be084b5154 result: hedge-fund reframe -> moat is cheap leverage, not the strategy
Multi-strat with foxhunt's own ideas. (1) Combine uncorrelated premia: ~0.72 Sharpe 2019-26 but
~=60/40, only when streams net-positive (traditional 2010-26 combine +0.51 < equity +0.68 = dilution).
(2) Edge-decay-trust allocation (Page-Hinkley theta, resurrection) genuinely helps: +0.16->+0.27,
correctly down-weights decayed streams. (3) Static risk layer crushed returns (one-way latch);
ADAPTIVE layer (continuous self-recovering DD de-lever + Kelly-floor + z-score corr + EMA vol)
beat it (+0.03->+0.14, maxDD -18.7->-14.5) -- value is drawdown control. (4) THE MOAT = cheap
financing: adaptive 1x Sharpe +0.48 vs 2x +0.14; retail 6-7% margin kills leverage benefit. Funds
lever ~0.7 Sharpe only via prime-brokerage SOFR+1-2%. Deployable best = ~1x adaptive-risk-managed
diversified book (~0.5-0.7 Sharpe, unlevered), scales with capital. Foxhunt ideas improve execution
(validated); engine value = risk-mgmt not alpha. Ceiling ~0.7 ironclad.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 19:48:46 +02:00
jgrusewski
764fd99480 correction(crypto): cross-venue arb is MARGINAL not breakthrough (honest fixed-pair OOS)
The +14.9 OOS Sharpe was the max-min optimism (assumes daily free re-positioning to optimal venue
pair). Honest fixed-pair version (hold the entry-chosen pair, book its actual funding diff): OOS
Sharpe collapses +14.9->+0.8, OOS ann +15.3%->+1.1% (realistic ~breakeven net of cost), 0/12
configs robust OOS, feb month -8.2. Capture 0.68 was the tell (32% reshuffle loss). Cross-venue
arb joins the cost-walled/in-sample-only list. User's OOS insistence caught it. Only deployable
thing remains simple 60/40 (~0.7). Every crypto-funding variant marginal once honestly tested.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 19:10:13 +02:00
jgrusewski
e731c2fc2f result(crypto): cross-venue funding arb PASSES clean OOS (the breakthrough)
Full-year (331d Binance-HL) clean OOS: config picked on first 60% (IS Sharpe +12.0) applied
BLIND to last 40% -> OOS Sharpe +14.9 (held), OOS +15.3%/yr, 14/14 configs robust, all 4 OOS
months positive (+11..+18), capture 0.68. The ONLY edge in the whole search to clear the clean
OOS horde that killed PEAD/equity-ML/AI4Finance. Market-neutral, no spot leg, persistent, carry
not prediction. HONEST: Sharpe 6-15 inflated (low ~1% vol -> realistic /2.5-4 -> ~3-6; real
number is return ~8-15%/yr) + sim books daily max-min assuming optimal-pair-held (capture 0.68 =
~32% reshuffle loss) -> needs held-pair-realized fix for true number, then micro-live + counterparty
mgmt. Edge EXISTS and is OOS-proven; deployable magnitude ~8-15%/yr pending fixes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 19:08:08 +02:00
jgrusewski
2b36929b5f test(crypto): clean OOS for cross-venue arb (IS-pick config -> OOS-blind apply)
The hysteresis params were chosen by looking at the data = in-sample. Clean OOS protocol (same
that killed PEAD): pick best config on first 60% by IS Sharpe, apply EXACT config blind to last
40%. Reports IS-best -> OOS Sharpe, robustness (configs IS>2 that also OOS>1), OOS per-month.
Decisive: OOS holds -> real; OOS collapses -> in-sample fit. Monitor armed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 19:03:30 +02:00
jgrusewski
ee2215f4d3 feat(crypto): cross-venue harness -> hysteresis (deployable) + deep full-year history
(1) Live cross_venue_funding.py paper harness now uses HYSTERESIS (enter >10bp/day, hold until
spread decays <5bp) instead of naive daily top-K -> tracks the deployable low-turnover version
(naive was cost-killed -4.5 Sharpe; hysteresis nets +10-14%/yr). State reset. (2) fetch_xvenue_hist2
now paginates Binance fundingRate -> full ~330d history (was 67d) so Binance-HL overlap = full year
(330 days) for the regime test across ~11 months. Monitor armed for the full-year backtest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 18:58:24 +02:00
jgrusewski
027d73a504 research(crypto): cross-venue funding arb survives net-of-cost with hysteresis
Backtested the cross-venue funding arb on historical funding (Binance/OKX/Hyperliquid). Gross
+21%/yr, spreads persist (capture 0.71), but NAIVE daily rebalance is cost-killed (net Sharpe
-4.5, negative every month). HYSTERESIS (hold winners until spread decays, entry>10bp/exit>5bp)
flips net to +10-14%/yr market-neutral (Sharpe +11-15, but inflated by ~1% vol + idealized fills;
realistic ~3-6 / return ~10-14%). Turnover is the swing factor. First edge of the whole search to
survive the net-of-cost horde -- market-neutral, persistent, no spot leg (solves hedgeability),
operational not predictive. Caveats: 94d/one period, idealized fills, counterparty. Next: switch
live harness to hysteresis, deepen history to full year, micro-live.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 18:33:28 +02:00
jgrusewski
4f73e99225 feat(crypto): cross-venue funding-arb scanner + paper-forward (solves hedgeability)
Short high-funding-venue perp + long low-funding-venue perp (same coin) = price-neutral, collect
the funding DIFFERENCE, NO spot leg needed -> fixes the single-venue hedgeability block. Binance/
Bybit/Hyperliquid bulk funding, normalized to daily (HL is hourly!). Sanity-filtered (liquid >$10M
both legs, exclude |funding|>50bp/day distress/artifacts -- raw scan top was 9000%/yr delisting
junk). Clean spreads: ETH ~20%, ARB/ONDO ~20%, up to ZEC 167%; 16 coins >5bp/day. scan/run/status,
idempotent daily, cron 9/12/15/18 UTC. Decisive open question = PERSISTENCE (snapshot != edge;
paper-forward measures whether spreads last long enough to collect net of ~10bp fees).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 17:32:35 +02:00
jgrusewski
9bf67e731d research: AI4Finance debunked + PEAD dies OOS (efficient-market wall confirmed again)
3 omnisearch researchers + clean PEAD test answer 'why does AI4Finance find what we cant':
they dont. FinRL flagship (Sharpe 1.30) = single-split, slippage-free, no-deflation, bull-market,
survivorship, hand-coded crash rule; their own people (Gort/Liu AAAI'23) published the overfitting
rebuttal; zero live track record. ML-trading decays 73%+ backtest->live, faster for complexity.
PEAD tested properly (real Nasdaq surprises x DBEQ, leak-free, 23bp cost, OOS): full-sample looked
good (20d +0.29% t=2.9) but pure in-sample bull-beta -> OOS NEGATIVE every horizon; surprise-size
signature fails. Strongest classic anomaly dies OOS. Untested real pulse left: prediction markets
(uncorrelated). Tooling: fetch_earnings.py, pead_real.py, dbeq_symbology resolved (17605 tickers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 17:15:22 +02:00
jgrusewski
f203998613 feat: 60/40 paper-forward harness (the ~0.7-Sharpe non-crypto baseline)
Local CLI paper-forward test of 60% SPY / 40% IEF (ETF analog of the ES/ZN 60/40 backtest,
+0.72 Sharpe), mirroring the funding harness. Free Yahoo adjusted closes (dividends+coupons =
true total return). Subcommands snapshot/run/status. Books each real trading day once with
catch-up (handles weekends/missed runs); forward-start (no history backfill). Idempotent via
last_date. Daytime cron 12/15/18 UTC. Always-invested baseline -> confirms forward Sharpe
tracks the ~0.7 backtest, the clean no-phantom option available regardless of crypto regime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 15:55:44 +02:00