MDL/DCC Trading Engine

How 8Z compression principles detect market regimes and control trading aggression — the technical bridge from DNA analysis to financial markets.

1. The Core Transfer: Compression → Trading

8Z Audio / DNA (Original)

Multiple mathematical generators compete to describe data. MDL picks the one with the shortest total description. DCC adapts search depth based on signal complexity.

DNA: CA rules, L-systems, logistic maps → Z-scores 28-74
Audio: LPC, periodic, harmonic models → beats FLAC

8Z Trading (New Application)

Multiple market regime models compete to describe price action. MDL picks the one with the lowest prediction error. DCC adapts trading aggression based on regime stability.

Crypto: BTC/ETH sync + MDL regime → captures momentum
Stocks: SPY/QQQ sync + MDL regime → same framework

The principle is identical: find the mathematical generator that compresses the data best (shortest description length), then use that generator's predictions. In DNA, the generator reveals biological structure. In audio, it enables better compression. In trading, it reveals the current market regime and optimal trade direction.

2. MDL Regime Detection — The 4 Generators

Each bar, 4 generators make predictions about the next price. The one whose total description is shortest (model complexity + prediction errors) wins = current regime.

📈
TREND
Price follows linear regression slope. Next = last + slope.
2 params intercept + slope
🔄
REVERSION
Price reverts to EMA mean. Next = last + k×(mean − last).
2 params mean + speed
🚀
MOMENTUM
Price continues recent velocity. Next = last + avg_delta.
1 param velocity only
📊
RANGE
Price oscillates around midpoint. Next = (high + low) / 2.
2 params midpoint + width

MDL Cost Formula

// For each generator G:
total_cost_G = params_G × model_penalty + log₂(prediction_error_variance_G)
               ↑ complexity costdata cost (how well it fits)

// Winner = generator with LOWEST total cost
regime = argmin(total_cost_TREND, total_cost_REVERSION,
                total_cost_MOMENTUM, total_cost_RANGE)

Why this works: MOMENTUM has only 1 parameter, so its model cost is lowest. But if the market is ranging, MOMENTUM's prediction errors will be huge → high data cost → it loses. RANGE has higher model cost but low prediction errors in sideways markets → it wins. MDL automatically selects the regime without any human judgment.

Regime → Trade Filter

RegimeDirectionLongs?Shorts?Logic
TREND ▲Up✓ Yes✗ NoTrade with the trend, not against it
TREND ▼Down✗ No✓ YesShort with the trend
REVERT ▲Below mean✓ Yes✗ NoBuy: price should revert up to mean
REVERT ▼Above mean✗ No✓ YesSell: price should revert down
MOMENTUM ▲Up✓ Yes✗ NoRide the velocity
MOMENTUM ▼Down✗ No✓ YesRide downward velocity
RANGE ◆None✗ No✗ NoNo clear direction → sit out

3. DCC — Digital Claustrum Controller

Ported from 8Z-Audio and the TSP solver. DCC monitors the complexity of the regime-change stream and adjusts trading parameters in real-time.

The Control Loop

Track MDL winner
each bar
Count regime
changes over 64 bars
Compute
change rate
Map to coupling
parameter u
Adjust SL,
size, impulse
Seizure (u → 1.0)

Same regime winning repeatedly. Market has clear structure.

→ Tighter SL (×0.8–1.0)
→ Full position size (100%)
→ Lower impulse bar (easy entry)
EXPLOIT the stable regime

Balanced (u ≈ 0.5)

Moderate regime changes. Normal market conditions.

→ Standard SL (×1.0)
→ Normal size (75%)
→ Standard impulse bar
BALANCED approach

Noise (u → 0.0)

Regimes flipping chaotically. No stable structure to exploit.

→ Wider SL (×1.2)
→ Half position size (50%)
→ Higher impulse bar (strict entry)
EXPLORE / reduce exposure

DCC in 8Z Audio vs Trading

Concept8Z Audio CodecTrading Strategy
SignalAudio frame (4096 samples)Price bar (1s / 1m / 1h)
GeneratorsLPC, Periodic, Harmonic, DeltaTrend, Reversion, Momentum, Range
MDL decidesWhich predictor compresses bestWhich regime fits price action best
DCC monitorsPredictor-change complexityRegime-change complexity
Seizure =Same LPC order winning → narrow searchSame regime winning → trade aggressively
Noise =Winners jumping → widen searchRegimes chaotic → reduce size
u controlsSearch depth (candidates tested)Position size + SL tightness

4. The Complete Signal Pipeline

SYNC
BTC↔ETH or SPY↔QQQ
both move same direction
IMPULSE
Current move exceeds
average × factor
MDL REGIME
Direction matches
winning generator
VWAP TILT
Not overextended
vs VWAP z-score
ENTRY
DCC-adjusted size
+ cooldown OK

Each gate is independent. A signal must pass ALL gates to trigger an entry. This is the same principle as the DNA Scanner: multiple null models must fail before declaring structure is real.

5. Universal Asset Class Support

The strategy auto-detects asset class from syminfo.type and configures appropriate sync pairs and parameter scales.

Asset ClassSync Leader 1Sync Leader 2Typical CorrelationDefault Leverage
Crypto (BTC)ETH/USDTSOL/USDT0.82–0.90100x (MEXC)
Crypto (ETH)BTC/USDTETH/USDT0.82–0.90100x
US StocksSPYQQQ0.90–0.961x–4x
ForexDXYEUR/USD-0.85–0.9530x–50x
CommoditiesSPY (risk)DXY (dollar)varies1x–10x

Cross-asset considerations: Crypto correlations break during idiosyncratic events (ETH merge, regulatory news). Stock correlations are highest during crashes (correlation→1). Forex correlation structure is fundamentally different (currency pairs share components). The sync concept works across all classes, but threshold calibration must differ. The MDL regime detection handles this automatically — if the market structure changes, the winning generator changes, and the DCC adjusts.

6. V3.0 Changes Summary

FeatureV2.2V3.0Impact
Pine versionv5v6Strict bools, dynamic requests, future-proof
Sync feedsLookahead ON (default)Lookahead OFF (strict)Removes potential bias, measures real edge
MDL regimeNone4 generatorsStructural market awareness
DCC adaptiveNoneCoupling u ∈ [0,1]Auto-scales aggression to market clarity
VWAP tiltNonez-score filterBridges manual reversal edge
CooldownNone8 barsBreaks whipsaw loss chains
Circuit breakerNone5 losses → pausePrevents drawdown spirals
Stop-loss0.033%0.045% (DCC-adjusted)Fewer noise stops
Asset classesCrypto onlyCrypto, stocks, forex, commoditiesUniversal framework
New presetsS1-S6, TF1-TF5+ STK1-2, FX1-2Stock and forex presets

7. Dream Team Plan — AI Collaboration

Claude — MDL/DCC Depth

Extend generator library: Fourier harmonics, CA patterns, chaotic attractors. Refine MDL cost calibration. DCC threshold adaptation per asset class.

GPT — Statistical Rigor

Monte Carlo validation framework. Permutation tests. Walk-forward optimization. Decompose the 70K% return into its real components.

Gemini — Feature Engineering

Order book imbalance signals. Microstructure regime classifier. Options/funding rate as MDL generators. Continuous volume-weighted sync score.

Grok — Real-Time Intel

News as MDL generator. Social sentiment regime detector. X/Twitter volume spikes. Narrative momentum indicator.


Sync Momentum v3.0 — MDL/DCC Universal Engine

Bojan Dobrečevič · AIM³ Institute · March 2026

Part of the 8Z-LO cross-domain compression research program.
Not financial advice. Past performance does not guarantee future results.