jgrusewski c4fb3f73eb fix(vrp): exec-twin ladder cap + per-rung sizing + combo BUY-credit sign + backfill master branch + P&L helper tests
The VRP exec twin previously opened a NEW full-envelope spread every run, overwriting the
single-slot book-state and never closing the prior one -- armed weekly it would stack N x
notional. plan_and_record_vrp now maintains a 5-rung ladder (mirrors VrpStrategy.advance):
closes rungs at 50% profit-take or DTE<=1 first, then opens at most one new rung sized at
envelope/ladder (never the full envelope) only when a slot is free. Ladder decisions are
factored into a pure, unit-tested plan_vrp_ladder helper.

Also: IbkrBroker.place_combo used the wrong parent-order action for a net-credit combo (SELL
with a negative limit); switched to BUY with a negative limit per IBKR's combo convention.
fxhnt-opra-backfill.yaml's git-sync cloned the feature branch instead of master (this Job is
applied manually post-merge). Added tests/unit/test_vrp_exec_helpers.py for the previously
untested pure P&L helpers (compute_spread_exec_return/compute_ladder_exec_return/build_pos_state).
Removed the dead --live flag from execute-vrp (plan_and_record_vrp never consulted allow_live;
the paper-envelope refusal guard is the real safety mechanism).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 00:36:11 +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 11 MiB
Languages
Python 97.3%
HTML 2.3%
Shell 0.3%
HCL 0.1%