โ€บNavigation

Iteration 06 ยท 2026-06-09 ยท driver: native Claude Code /loop (laptop run)

Feature #5 โ€” lziv_complexity_signs (PR #95)

โ† Dashboard ยท PR terrylica/mql5#95 ยท card 40 ยท cut off bootstrap #90

Done. The fifth ฮพ-confirmed candidate โ€” the FIRST information/complexity (Lempel-Ziv-76) feature โ€” is a REAL continuous-float production column on fxview_cache.forex_bars: bit-exact Rust verified against a pinned Python SSoT, populated through the wired producer, with batchโ‰กstreaming parity and an independent FOSS corroboration. PR #95 open (base main; diff auto-cleans once #90 + #91 + #92 + #93 + #94 land).

What it computes

Normalized Lempel-Ziv 1976 complexity (DOI:10.1109/TIT.1976.1055501) of the binary up/down sign sequence of the per-bar mid log-return over the 200-bar strictly-trailing window โ€” an entropy-rate / predictability proxy for the bar's directional sequence. Causal: the window is the 200 bars BEFORE bar i (current bar excluded). Value โ‰ˆ 1 for a near-random sign sequence. None on warmup (<16 finite trailing signs). Substrate "signs": np.sign(logret), logret = ln(close)โˆ’diff (8 h weekend/Ouroboros gap-nulled, like #1); binarization (s>0) โ†’ bit 1 iff up-bar, else 0 (a flat bar logret==0โ†’sign 0 and a down barโ†’sign โˆ’1 BOTH map to bit 0); the finite-sign filter drops gap-null / first-bar signs.

The chain โ€” one SSoT, bit-exact to the column

LayerArtifactResult
Python SSoToracle_lziv_complexity_signs.py โ€” antropy.lziv_complexity(bits, normalize=True) (antropy 0.2.2 BSD-3), bit-faithful to the probe's k_lziv_signssha-pinned jsonl (12000 rows, 11200 finite) + .sha256 sidecar
Rust kernelorthogonal_extension_kernels::lziv_complexity_signs โ€” EXACT integer port of antropy's _lz_complexity (the LZ76 exhaustive-production / Kaspar-Schuster state machine) + c/(n/(ln(n)/ln(base))) normalization (base=max(2,#distinct)); no new dep (f64::ln)clippy clean
Differential parityvs the pinned oracle on the frozen fixture11200 == oracle, 12000 bars == rows, max|dev| 2.22e-16 (LZ76 count exact, norm โ‰ˆ1 ulp)
Producer columnBarOrthogonalExtV1 { lziv_complexity_signs } + BarRow + schema.sql Nullable(Float64) CODEC(Gorilla(8),ZSTD(1)) + feature_metadata.yamltest_schema_contract 4/4
Producer populateLzivComplexitySignsRollingState โ€” 200-bar sign ring + prior close/close-time; read-before-push observe(close_mid, open_time_us, close_time_us) @ finalizeโ€”
batchโ‰กstreamingstreaming observe() over the fixture per partition11200 == oracle, max|dev| 2.22e-16 (identical to batch)
3-way FOSSantropy vs independent clean-room substring-membership LZ76PASS โ€” self-validated on 6 vectors; 0 value-mismatches, 0 None/Some, max|dev| 0.000e+00 / 11200

3-way FOSS finding (it earned its keep)

antropy is the canonical Python LZ76 and there is no second mainstream independent implementation. So the independent leg is a from-scratch clean-room estimator sharing NO code with antropy: the textbook "exhaustive history" substring-membership formulation (each phrase is the shortest prefix of the remainder not yet a substring of the consumed history) vs antropy's Kaspar-Schuster exhaustive-production state machine โ€” a different algorithm computing the same LZ76 production complexity. It is first self-validated against antropy's raw counts on 6 pinned vectors (all-upโ†’2, altโ†’3, n16โ†’6, rand32โ†’9, docโ†’6, [1,0,โ€ฆ]โ†’3), then agrees bit-for-bit (max|dev| 0.000e+00) across all 11200 windows. Triangulates with Rust==antropy at 2.22e-16 โ‡’ antropy == clean-room LZ76 == Rust.

Challenge-and-Held (inline; sub-agent dispatch skipped per the tick-3 signal)

Gates / scope

Next

Feature #6 โ€” mann_kendall_z (card 20, Mann-Kendall trend test: EXACT integer S statistic, ฮต on the Z standardization).

Presentation only โ€” never the SSoT.