← Back

Autonomous Equity Engine (quant_v4)

Live

Signature capability

Trades real money with zero daily human input — entry, rebalance, and trailing-stop passes run on their own, and every risk gate fails closed rather than open.

What it is

The engine runs a blended, backtest-validated long-only equity sleeve on a live brokerage account, executing entry, rebalance, and trailing-stop protection passes on scheduled jobs with no daily human step. Position sizing uses fractional Kelly, and a statistical circuit breaker sets a dynamic consecutive-loss threshold from the win rate via a binomial model rather than an arbitrary constant. Every gate fails closed: unknown or stale risk state, a missing protection heartbeat, or a two-source quote disagreement all block new orders and force paper mode. An independent dead-man's-heartbeat watcher runs on a separate host and emails alerts if the trading host goes silent, unprotected positions appear, or drawdown limits trip.

Highlights

  • Statistical circuit breaker derives its loss threshold from the win rate using a binomial-probability model, replacing arbitrary fixed-loss rules.
  • Concurrency-safe shared state: all writes route through one atomic adapter using fcntl LOCK_EX plus tempfile and os.replace, with shared locks for readers.
  • Strict-TDD build: from 663 execution tests at first baseline to ~2,765 unit tests, with core risk modules at 100% coverage.
  • Multi-agent alpha hunt (36 agents) with a placebo / fee-fragility / lookahead gate produced a de-correlated 3-edge blend: out-of-sample Sharpe 1.58, ~20% CAGR, max drawdown -11.2% vs SPY -18.8%.
  • Adversarial review fixed 10 criticals pre-build and 2 P0 + 5 P1 at wiring, including capital-lock enforcement and a no-silent-naked-position guarantee.
  • Independent cross-host dead-man's switch with edge-triggered, deduplicated email alerts.

Tech · Python 3.10, pandas / numpy, robin_stocks (Robinhood API), fcntl file locking with atomic tempfile+os.replace writes, SQLite (WAL), systemd / launchd / cron schedulers, n8n webhook alerting, Tailscale/LAN cross-host sync, pytest.

Download brief (PDF)