jgrusewski c39d78fd7b feat(surfer): cross-asset futures curve loader + CTA harness + opt-in allocator quality gate
Reusable infra from the diversifier research (the strategies themselves found no
deployable edge on our 22-market panel, but the construction is validated):

- dbn_local.load_curve: front + 2nd-nearby CONTINUOUS series + annualized carry
  (log(F1/F2)/gap_years) from parent-symbology outright expiries. Unlocks carry +
  basis-momentum without re-reading raw .dbn.
- cta_trend.py / cta_runner.py: literature-grounded managed-futures trend
  (vol-normalized risk-adj momentum -> tanh(x/0.89) response -> 1/3/12mo blend ->
  inverse-vol -> equal-risk-per-sector budget -> portfolio vol-target -> long/short).
  Construction validated (reproduces SG Trend +29% in 2022); premium absent for us
  (Sharpe ~0 over 2010-26 on 22 markets, ends mid-historic-drawdown).
- book_allocator: OPTIONAL edge-quality gate (min_sleeve_sharpe, default None=OFF) to
  bench dead/decaying sleeves so they can't be levered up by the vol-target. Off by
  default because a naive Sharpe floor also benches legitimate anticorrelated hedges;
  a correct quality/decay layer is future work. Suite green, mypy clean.

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

fxhnt

Agentic strategy-research & multi-strategy execution platform. It systematically discovers, backtests and out-of-sample-validates trading strategies across many markets, keeps only what survives a rigorous statistical gauntlet, and runs the survivors live (multiple strategies at once).

The bet is not a secret edge — it's breadth + discipline + automation. The hard part (and the moat) is refusing to fool yourself at scale; the validation gauntlet is the core, built and proven first.

Architecture (hexagonal / ports-and-adapters)

src/fxhnt/
  domain/        pure logic: gauntlet (Deflated Sharpe), strategies, backtest, models   ← no I/O
  ports/         contracts: DataProvider, repositories (the only seams)
  adapters/      infra: yahoo data, SQLAlchemy (Postgres/SQLite) + DuckDB stores
  application/   use-case services (ResearchService) — orchestrate via ports
  cli.py         composition root (wires concrete adapters)

See docs/architecture/0001-architecture.md.

Quickstart

pip install -e ".[dev]"

pytest                                   # unit (gauntlet falsification) + integration (vertical slice)
fxhnt strategies                         # list strategy kinds
fxhnt research SPY --kind trend --window 200    # data → backtest → gauntlet → persist
fxhnt list --passed-only                 # the survivor library

Config via FXHNT_* env vars (e.g. FXHNT_OPERATIONAL_DSN=postgresql+psycopg://...). Defaults to SQLite + a local DuckDB file under ~/.fxhnt/.

Status

Vertical slice working: data (Yahoo) → strategy (trend) → backtest (net of costs) → IS/OOS gauntlet → persistence (operational + analytical). Next: the multi-strategy execution layer, more strategy templates + data adapters, and the agentic discovery search on top of the proven gauntlet.

Description
No description provided
Readme 10 MiB
Languages
Python 96.9%
HTML 2.3%
HCL 0.5%
Shell 0.3%