2026In progress
Murphy Trading Engine
A rule-based trading system built on John Murphy's technical analysis: 17 rule modules, regime detection, and confluence scoring, running in backtest, paper, or live mode with a Next.js dashboard to manage it.
Overview
Murphy is a trading system built around the chart patterns and indicators from John Murphy's Technical Analysis of the Financial Markets. Computing RSI is easy; the hard part is formalizing confluence: which rules matter right now, and how much independent agreement is enough to act.
Rule evaluation is kept separate from judgment. Rule modules emit typed signals, a regime classifier decides which families of rules count, a confluence scorer turns agreement into one conviction number, and an independent risk manager can veto any trade.
The Python engine talks over NATS to a Quarkus control plane that owns order state, broker adapters, guardrails, and a kill switch. A Next.js dashboard shows positions, equity, signal breakdowns, and risk decisions. The same engine runs in backtest, paper, or live mode from one config switch.
Highlights
- 17 rule modules across six families, including flags and double tops/bottoms.
- Regime classification with hysteresis and two-level confluence scoring.
- Risk manager with ATR sizing, exposure caps, drawdown halts, and correlation limits.
- Order state machine with idempotency keys and reconciliation on both sides.
- Walk-forward optimization and an experiment registry, tested against 22 years of real ETF data.
- Backtest, paper, and live modes; live trading refuses to start without an explicit flag.