jgrusewski 124edda582 fix(exec): stable data-derived rebalance_id + rate-limit signal + cover/drift invariant tests
Fix 1: derive rebalance_id from last panel day (reb<day_int>) instead of
wall-clock strftime so crash+re-run in a different minute reuses the same
deterministic clientOrderIds — Binance dedupes on clientOrderId → idempotent.

Fix 2: add rate_limited: bool field to RebalancePlan; set True whenever any
placed Fill has status == "REJECTED" (budget-exhausted leg); surface in CLI echo
so operators see exhaustion explicitly rather than learning via a drift halt.

Fix 3: test_reduce_only_at_exact_cover_boundary locks the boundary invariant
that an order sized to exactly cover an open position (qty == |current_qty|) is
always flagged reduce_only for both SELL-covers-long and BUY-covers-short cases.

Fix 4: test_reconcile_flags_unexpected_drift_on_untraded_symbol proves
reconciliation catches drift on holdings the orchestrator never touched this
cycle (the actual-union path in diff_positions covers untraded symbols too).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 17:39:29 +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%