The Digital Claustrum of Markets
The Core Transfer
The claustrum has reciprocal connections to every cortical area. DCC has connections to every solver subsystem. The architecture is isomorphic.
In the TSP solver (8zrp v2.2–v2.4), DCC evolved from a single-knob intensity dial to a full governor controlling kick selection, intensity, restarts, worker coordination, and convergence detection. The human went from configuring 15 command-line flags to typing auto qa194.tsp --max-hours 2.
The trading system has traveled the same path from the opposite direction. SM and ZZ already contain MDL generators and DCC modules. The 8Z-DCC Trader Book promoted MDL to engine and DCC to core governor. But in practice, the current trading DCC is a v1 sensor — it measures u but controls nothing. The actuator half is missing entirely.
The Isomorphism, Fully Mapped
| Component | TSP DCC v2.4 | Trading DCC v2.4 |
|---|---|---|
| Core loop | kick → 2opt → accept/reject → repeat | predict → observe → score → repeat |
| Competing generators | Kick operators: double-bridge, or-opt-1/2/3, 3-opt, segment-inversion | Market models: TREND-S/M/L, REVERT-MU, MOM-1/5, VOL-REGIME, CYCLE, PATTERN, COMPRESS |
| MDL scoring | Tour length (lower = better compression of the distance matrix) | Prediction error (lower = better compression of price dynamics) |
| DCC sensor | 8-bit symbols, 128-slot ring buffer, LZ76 complexity | 8-bit symbols, 128-slot ring buffer, LZ76 complexity |
| Actuator 1: Operator selection | KickGovernor: Thompson sampling across 9 kick types | GeneratorGovernor: Thompson sampling across N generators |
| Actuator 2: Intensity | u controls p_greedy and kick_n | u controls window size, blend width, trade threshold |
| Actuator 3: Restart | Nuclear escalation → new tour from different strategy | Nuclear escalation → buffer flush, window shrink, generator rebalance |
| Actuator 4: Worker coordination | WorkerGovernor: inject global best into stuck workers | Multi-TF Governor: inject regime consensus across timeframes |
| Actuator 5: Stop control | ConvergenceDetector: stop when search has converged | SignalQualityMonitor: stop trading when no edge exists |
| S-metric | Worker coherence × strategy diversity | Cross-TF coherence × generator diversity |
| Human input (v2.4 auto) | Instance + time budget | Asset + time budget |
The Gap: Where Trading DCC Must Go Beyond TSP
Markets have structure that TSP instances lack: multi-scale temporal organization. A TSP instance is one problem at one scale. A market is the same problem at 1s, 1m, 5m, 15m, 1h, 4h, 1d simultaneously, with information flowing across scales. A 1h trend contains 4× 15m swings, each containing 3× 5m oscillations. When all scales agree, the signal is strong. When they disagree, structure is breaking down.
This means the trading DCC governor has a capability TSP DCC cannot have: cross-scale coherence measurement. The Multi-TF Governor (Chapter 6) is architecturally novel — not a port from TSP but an extension that only makes sense in temporal data.
DCC worked in TSP with one scale. Markets have many scales. The generalization is not "run the same DCC on each scale independently" — it is "run DCC on each scale AND add a cross-scale coupling metric that doesn't exist in TSP." The transfer creates something the source domain never had.
DCC Sensing: The Ring Buffer Architecture
The sensing mechanism is the foundation. It must be upgraded from the current 6-bit/64-slot implementation to match the TSP v2.4 standard before actuators can use it.
Ring Buffer Specification
| Parameter | Current v0.2 | Target v2.4 | Rationale |
|---|---|---|---|
| Buffer size | 64 symbols | 128 symbols | Match TSP. 128 is the sweet spot: long enough for LZ76 stability, short enough to adapt. |
| Bits per symbol | 6 | 8 | Need room for richer outcome encoding (see below). |
| Total bits for LZ76 | 384 | 1024 | 2.7× more signal for complexity measurement. |
| Update interval | Every 8 symbols | Time-based: every 30s | Prevents cost-coupling death spiral (expensive bars = fewer updates). |
| u adjustment | ±0.05 float | ±1 integer [3..18], then normalize | Match TSP. Integer arithmetic with floor/ceiling is more stable. |
8-Bit Symbol Design
Each prediction outcome encodes 8 bits of information into the ring buffer:
Bit 0 : hit (1=correct direction, 0=wrong) Bit 1 : winner changed from previous bar (1=regime change, 0=stable) Bits 2-4 : winner generator index (0-7, covers up to 8 generators) Bits 5-6 : MDL margin bucket (0=RW wins, 1=marginal, 2=clear, 3=dominant) Bit 7 : confidence direction agreement (1=top-3 generators agree on direction)
This is richer than TSP's 8-bit symbol (accept/improve/kick/magnitude/cost) because markets have more observable state per time step. The regime-change bit (bit 1) is particularly important — it lets LZ76 directly measure how often the winning generator switches, which is the core DCC signal.
LZ76 Complexity → Coupling Parameter u
The LZ76 algorithm runs on the 1024-bit string and produces a complexity ratio in [0, 1]. Low complexity means the buffer is repetitive (same generator keeps winning with same outcomes) → high u (trust the prediction). High complexity means the buffer is chaotic (winners keep changing, predictions keep missing) → low u (don't trust).
lz_ratio = lz76_complexity(buffer_bits) / n_bits if lz_ratio < band_low: u += 1 (stable → increase trust) elif lz_ratio > band_high: u -= 1 (chaotic → decrease trust) else: hold (neutral band) u = clamp(u, u_floor, u_ceiling) // Normalize to [0, 1] for actuator consumption: u_norm = (u - u_floor) / (u_ceiling - u_floor)
TSP DCC v2.2 had a death spiral: u dropped → more kicks per move → each move took longer → fewer updates per second → u never recovered. The fix in v2.4: time-based updates. Trading DCC must use the same fix: update u every 30 seconds of wall-clock, not every N bars. This decouples the sensing rate from the prediction speed.
Actuator 1: Generator Governor
The current MDL arena is winner-take-all: the generator with the lowest MDL cost gets 100% of the prediction weight. This is equivalent to TSP v1 using only double-bridge kicks. The Governor replaces this with adaptive selection and blending.
Thompson Sampling with Decay
Each generator maintains a success/failure count (Beta posterior). To select the active generator, sample from each posterior and pick the highest. Exponential decay (factor 0.995 per update) forgets old data so generators that were good 500 bars ago but fail now lose weight automatically.
for each generator g:
score[g] = sample(Beta(successes[g], failures[g]))
// Time-cost adjustment: prefer generators that are cheap to evaluate
score[g] *= (1 + 0.3 * min(improvements_per_second[g], 1.0))
selected = argmax(score)
// After observing outcome:
for each generator g:
successes[g] *= 0.995 // decay
failures[g] *= 0.995
if hit:
successes[selected] += 1.0
else:
failures[selected] += 1.0
The cost adjustment is critical: VOL-REGIME requires ATR computation over 50 bars while MOM-1 is a single subtraction. If both achieve 52% accuracy, MOM-1 is better because it produces more predictions per second — the trading equivalent of TSP's "prefer cheaper kicks when they work equally well."
Prediction Blending: u Controls the Blend Width
When u is high (stable regime), the top generator gets 80%+ weight — nearly winner-take-all. When u is low (chaotic), the top 3-4 generators share weight and their predictions are blended. When generators disagree on direction, the blend produces a near-zero net prediction — which maps to "don't trade" or "minimum size."
if u_norm >= 0.7:
// Exploit: top generator dominates
weights = softmax(thompson_scores, temperature=0.5)
elif u_norm >= 0.3:
// Mixed: broader blend
weights = softmax(thompson_scores, temperature=2.0)
else:
// Explore: nearly uniform
weights = softmax(thompson_scores, temperature=5.0)
net_direction = sum(weight[g] * direction[g] for g in generators)
confidence = abs(net_direction) // 0 = disagreement, 1 = unanimity
Current: MDL picks one winner, its prediction is the signal. If it's wrong, tough luck.
Governor: Thompson sampling learns which generators work on this data, blending width adapts to regime stability, and disagreement between generators is a signal in itself (reduce size). DCC doesn't just measure confidence — it controls how predictions are made.
Actuator 2: Window Governor
Dynamic MDL Window
The current system uses a fixed MDL window (200 or 500 bars). This is equivalent to TSP's fixed move budget. The Window Governor adapts the window to the current regime.
// Base window from configuration
base_window = 200
// DCC-controlled adaptation
if u_norm >= 0.7:
// Stable regime: expand window for better statistical power
window = base_window * 2.0 // 400 bars
elif u_norm <= 0.3:
// Chaotic regime: shrink window for faster adaptation
window = base_window * 0.25 // 50 bars
else:
// Transition: linear interpolation
window = base_window * (0.25 + 1.75 * u_norm)
// Momentum damping: change by at most 10% per update
window = current_window + clamp(window - current_window,
-current_window * 0.1,
current_window * 0.1)
When a regime change hits (u drops sharply), the window contracts so MDL can score the new pattern quickly. As the new regime stabilizes (u climbs back), the window expands for robust scoring. This is the trading analog of TSP's intensity governor controlling how far back to look for the base solution.
The human should not pick the window size. DCC should. "Window=200" is a human guess. DCC measures regime stability and adapts the window to what the data needs right now. Put the window inside the cost function.
Actuator 3: Regime Reset Governor
The Escalation Ladder
Ported directly from TSP v2.4's escalation system, adapted for market dynamics. The trigger is time-since-last-edge, not moves-since-improvement.
| Level | Name | Trigger | Actions |
|---|---|---|---|
| 0 | NORMAL | Recent edge detected | All systems nominal. Generator Governor active. Window Governor adapting. |
| 1 | CAUTION | 60s no edge | Shrink window 20%. Increase Thompson decay to 0.99 (faster forgetting). |
| 2 | DEFENSIVE | 120s no edge | Reduce position sizing by 50%. Push u toward midpoint. Try wider generator set. |
| 3 | WITHDRAW | 300s no edge | Enter observe-only mode. Record data, no predictions to trading system. Continue MDL scoring. |
| 4 | NUCLEAR | 600s no edge | Full reset: flush DCC buffer, reset u to midpoint, shrink window to minimum (50 bars), recompute all MDL scores from scratch on most recent data. |
The nuclear reset is the trading equivalent of TSP's strategy restart — abandon the current search and start fresh. In markets, "starting fresh" means flushing all accumulated DCC state (which may be poisoned by a dead regime) and letting the arena re-learn the current market from scratch.
After a nuclear reset, the system re-enters Level 0 with a fresh DCC buffer. The patience timer increases by 1.5× after each reset (same as TSP: diminishing returns on restarts). Maximum 5 resets before the system stays in observe-only permanently until the session ends or the human intervenes.
Actuator 4: Multi-Timeframe Governor
This is where trading DCC goes beyond TSP DCC. Markets have natural multi-scale structure that TSP instances don't. The Multi-TF Governor exploits this.
Cross-Scale Coherence
Run the MDL arena simultaneously on 4 timeframes of the same asset:
Each timeframe has its own DCC governor with its own u. The Multi-TF Governor computes cross-scale coherence: the degree to which all timeframes agree on direction.
// Direction agreement score
directions = [arena_5m.direction, arena_15m.direction,
arena_1h.direction, arena_4h.direction]
agreement = abs(sum(directions)) / len(directions)
// agreement = 1.0 when all agree, = 0.0 when split 50/50
// u-weighted agreement (trust high-u TFs more)
weighted_dirs = [d * u_norm[tf] for d, tf in zip(directions, timeframes)]
coherence = abs(sum(weighted_dirs)) / sum(u_norm[tf] for tf in timeframes)
High coherence (all TFs agree, especially the high-u ones) is the strongest possible trading signal. Low coherence (TFs disagree or only low-u TFs have signal) means the market structure is ambiguous — reduce size or abstain.
Regime Injection Across Scales
When a lower timeframe loses signal (u drops below 0.3, accuracy degrades), the Multi-TF Governor can inject regime information from a higher timeframe where structure is still visible. This is the direct analog of TSP v2.4's WorkerGovernor injecting the global best tour into a stuck worker.
// 5m arena is stuck (u_5m = 0.15, no edge for 2 minutes)
// 1h arena is clear (u_1h = 0.85, TREND-M winning consistently)
// Injection: bias the 5m arena's generator weights toward
// generators consistent with the 1h regime
if u_5m < 0.3 and u_1h > 0.6:
// Boost generators on 5m that agree with 1h's winner direction
for g in generators_5m:
if direction[g] == direction_1h:
thompson_bonus[g] += 0.2 * u_1h
The injection is soft (a Thompson bonus, not a hard override) so the 5m arena can still disagree with 1h if its own data supports it. But when 5m is lost and 1h is clear, the injection provides a prior that speeds up 5m's re-learning.
No published trading system uses LZ76 complexity-governed cross-timeframe regime injection. Multi-timeframe analysis exists everywhere (RSI on 4h + MACD on 1h is standard). But measuring the compressibility of prediction outcomes on each TF, using that to compute coupling parameters, and injecting regime information from high-coupling TFs into low-coupling TFs — this architecture has no prior art we could find.
Actuator 5: Position Governor
DCC's coupling parameter u and the Multi-TF coherence score together control five position management decisions:
DCC-Controlled Sizing
| Signal | u × coherence | Action |
|---|---|---|
| Strong | > 0.7 | Full size. Predicted direction gets 85-95% of budget. Hedge gets 5-15%. |
| Moderate | 0.4 – 0.7 | Reduced size. 65/35 split. Wider stop spacing. |
| Weak | 0.2 – 0.4 | Minimum size. Near 50/50 split. Effectively hedged. |
| None | < 0.2 | No new entries. Manage existing positions only. Observe. |
No-Trade Zones: When DCC Says "Stop"
The Position Governor can output exactly zero — "do not trade right now." This is the most important capability that the current system lacks. When the MDL arena can't beat random walk on any timeframe, when all DCC couplings are below 0.3, when the escalation ladder has reached WITHDRAW — the correct position is no position.
In the dual-direction framework from the DCC Trader Book, "no trade" means reducing both sides to minimum size and widening add spacing to maximum. The system is still watching, still scoring, still measuring. The moment structure returns (u climbs back, a generator starts beating RW), the governor re-engages automatically.
The one thing that kills this system is human override. When DCC says "no trade," the human must not trade. When DCC says "minimum size," the human must not increase size because "it feels like a breakout." The DCC controls the sizing, not the human's fear or greed. This rule was already in the DCC Trader Book Chapter 9. It applies triply when DCC is a full governor.
The Market S-Metric
The CCH Bridge: Coherence × Complexity
The Claustrum-Consciousness Hypothesis (CCH) proposes that consciousness arises when neural systems maintain the optimal balance between coherence (agreement across brain regions) and complexity (diversity of processing). The S-metric quantifies this balance: S = coherence × complexity.
Applied to markets:
// Coherence: cross-TF direction agreement, u-weighted
coherence = abs(sum(u[tf] * direction[tf] for tf in TFs))
/ sum(u[tf] for tf in TFs)
// Complexity: Shannon entropy of which generators are winning across TFs
winner_distribution = count(winner[tf] for tf in TFs)
H = -sum(p * log2(p) for p in normalized(winner_distribution))
complexity = H / log2(n_generators) // normalized to [0, 1]
// Market S-metric
S = coherence * complexity
High S (high coherence + high complexity): All timeframes agree on direction, but different generators explain the structure at different scales. TREND-S wins on 5m, REVERT-MU on 15m, VOL-REGIME on 1h, TREND-L on 4h — all pointing UP. This is the richest possible signal: multiple independent models confirm the same direction from different angles. Maximum confidence. Full size.
Low coherence, high complexity: Generators are diverse but TFs disagree. Rich structure exists but it points in conflicting directions. Reduce size. Wait for resolution.
High coherence, low complexity: All TFs agree and all use the same generator. Possible overfitting to one pattern. Moderate confidence. The lack of diversity is a warning — if that one pattern breaks, all TFs fail simultaneously.
Both low: No structure. Observe only. The market is genuinely random right now.
In v2.4, S is logged but not directly controlling decisions. The five actuators handle control. S is a research signal: we measure it, correlate it with profitability after the fact, and in v3.0 we promote it to a control signal if the correlation holds. This is the TSP approach: build the metric, observe it, then decide if it governs. Never skip the observation phase.
Signal Quality Monitor
The TSP ConvergenceDetector asks "has the search converged?" The trading equivalent asks "is there any edge right now?"
The SignalQualityMonitor tracks rolling accuracy across all timeframes. Its output is a single bit: ACTIVE or DARK.
// Compute best-TF accuracy over last 200 bars
best_tf_accuracy = max(rolling_accuracy_200[tf] for tf in timeframes)
best_tf_u = max(u[tf] for tf in timeframes)
// ACTIVE conditions (all must hold):
// - At least one TF has accuracy > 50.5%
// - At least one TF has u > 0.4
// - Escalation level < WITHDRAW
active = (best_tf_accuracy > 0.505
and best_tf_u > 0.4
and escalation_level < 3)
// DARK: DCC is still running, still measuring, still logging.
// But output to trading system is "no signal."
// When conditions improve, automatically re-enter ACTIVE.
DARK mode is not failure. It is intelligent capital preservation. The system is still learning during DARK mode — the MDL arena is scoring generators, the DCC is measuring stability, the window is adapting. The moment structure returns, the system re-engages at the correct scale and regime. No human intervention needed.
Full Auto Mode
The endgame. DCC decides everything.
# Current human workflow (v0.2): python BD_MDL_DCC_Predictor.py --file data/BTCUSDT_15m.csv --window 200 # Full auto (v2.4): python BD_MDL_DCC_Governor.py auto BTCUSDT --max-hours 24
In auto mode, the DCCGovernor class runs the full pipeline:
The human says "here's the asset, here's the time." DCC figures out which timeframes have structure, which generators work, what window size to use, when to trade, how much to trade, and when to stop. The human reads the report.
Implementation Phases
| Phase | What | Validates | Depends On |
|---|---|---|---|
| P0 (done) | MDL arena + DCC sensor on single TF. Direction prediction, u measurement, accuracy analysis. | Does MDL find structure? Does DCC separate signal from noise? | Nothing |
| P1 | Generator Governor (Thompson sampling + blend) + Window Governor (dynamic window) | Does adaptive generator selection + window sizing beat fixed config? | P0 results |
| P2 | Regime Reset Governor (escalation ladder) + 8-bit symbols + 128-slot buffer | Does the system survive regime changes without human intervention? | P1 |
| P3 | Multi-TF Governor (4 timeframes + cross-scale coherence + injection) | Does cross-TF agreement predict accuracy? Does injection help stuck TFs? | P2 |
| P4 | Position Governor (DCC-controlled sizing + no-trade zones) + S-metric logging | Does DCC-governed sizing beat fixed sizing? Does S correlate with profit? | P3 |
| P5 | Full auto mode. Single CLI command. DCC decides everything. | Does auto match or beat human-configured runs? | P4 |
| P6 | Live paper trader (HTML). Dual-direction engine. Real-time WebSocket. Production deployment. | Does it work on live data, in real time, reliably? | P5 |
Do not exclude any phase based on current test results. The v0.2 test might show 49% accuracy. That means the current generators are weak, not that the architecture is wrong. The correct response is: improve the generators, expand the catalogue, tune the MDL scoring — not abandon the governor design. The architecture is proven in 7 domains. The generators are what need work.
Connection to 8Z-OS
The DCC Trading Governor is the eighth domain where the MDL + DCC architecture produces results — and the first where DCC achieves full governor status on live, non-deterministic data.
The progression across domains tells a story:
Image/Audio/FASTA: MDL selects generators. DCC governs search budget. Result: beat established codecs.
TSP: DCC promoted from budget knob to multi-actuator governor. Result: exact optimal, outperforming hand-tuned configs.
Trading: DCC promoted from sizing multiplier to full governor with cross-scale coherence. Result: TBD — but the architecture is the same one that worked in every prior domain.
DCC-7 Consciousness Testbed: DCC governs 7 parallel LLM threads. The coupling matrix IS the experiment. Trading's Multi-TF Governor and DCC-7's coupling matrix are the same structure applied to different substrates.
Every domain is the same problem. The generators change. The DCC is the same everywhere. The architecture is universal. The only question is: does this domain have compressible structure? Markets do. We've measured it across 7 other domains. The eighth will not be the exception.