← Works

MARA

Markov Adaptive Regime Algorithm

No.
AD-01
Type
Instrument
Status
PAUSED
Begun
2026

Markets

It tries to read the market's mood before it trades, and sits on its hands when it can't tell.

Simulated prices, real filter. A three-state hidden Markov model runs on every tick.

Status

PAUSED. Built and working in paper trading. Not currently progressing.

Purpose

Most retail trading strategies apply the same logic regardless of market conditions. MARA tests whether identifying the active market regime (bull, bear, sideways) on Johannesburg Stock Exchange equities, and refusing to trade when price structure is too chaotic, performs better than regime-agnostic logic.

JSE stocks have lower liquidity, wider spreads and thinner order books than US equities. Parameters calibrated on US market data do not transfer.

Architecture

Three layers and two quality gates.

  • Layer 1: removes microstructure noise from raw price data.
  • Layer 2: extracts regime-relevant signals from cleaned prices.
  • Layer 3: Hidden Markov Models cluster market states into regimes. Bayesian model selection sets the state count per stock.
  • Gate 1, model confidence: the maximum state probability must clear a pre-set threshold. Below that, the regime is labelled uncertain and no new entries are allowed.
  • Gate 2, entropy: blocks entries when price dynamics are structurally chaotic, even when the HMM is confident.

Risk management: fixed-risk position sizing, fractional-Kelly allocation, caps on open positions and capital deployed, and a drawdown circuit breaker.

Feature engineering, gate thresholds, risk limits, HMM hyperparameters and labelling weights are not disclosed.

Validation

Walk-forward out-of-sample Sharpe is the only deployment criterion. Protocol: train on years 1–3, test on year 4, retrain on years 1–4, test on year 5, aggregate across all out-of-sample windows.

Backtests use a one-day execution delay (execute at the next day's close) and a conservative commission as a stress test.

Sample sizes are a handful of out-of-sample trades per stock. Under those conditions three stocks cleared a walk-forward Sharpe above 1.0: MTN.JO, above 2 across multiple windows; a technology holding company; and a gold miner, from a single window and borderline.

MTN.JO is the only result treated as fully trusted.

Limitations

  • Out-of-sample trade counts are small. The gold miner's result comes from one window and has a wide confidence interval.
  • A bank stock failed walk-forward: a labelling formula tuned for a telecom stock is wrong for a rate-sensitive bank.
  • Commodity stocks failed: out of sample, "bear" states returned more than "bull" states. The economic meaning of HMM states inverted between training and testing.
  • A per-bar confidence check bypassed the persistence filter and caused premature exits on most of the bank stock's trades.
  • A cluster architecture with separate labelling weights per stock group is planned, not implemented.
  • At retail commission rates, higher-frequency variants of the strategy are unprofitable.
  • No live capital has been deployed.

Current state

Paused. The last documented state (note dated 24 April 2026) was paper trading on three validated stocks. Go-live criteria were a sustained period of consistent signal quality within a drawdown limit. Neither has been reported as met.

Source: MARA: When the JSE Speaks, Listen.