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>
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>
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>
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>
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>
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>
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>
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>
(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>
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>
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>
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>
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>
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>
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>
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>
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>
'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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
(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>
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>
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>
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>
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>