Iteration 06 ยท 2026-06-09 ยท driver: native Claude Code /loop (laptop run)
โ Dashboard ยท PR terrylica/mql5#95 ยท card 40 ยท cut off bootstrap #90
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).
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.
| Layer | Artifact | Result |
|---|---|---|
| Python SSoT | oracle_lziv_complexity_signs.py โ antropy.lziv_complexity(bits, normalize=True) (antropy 0.2.2 BSD-3), bit-faithful to the probe's k_lziv_signs | sha-pinned jsonl (12000 rows, 11200 finite) + .sha256 sidecar |
| Rust kernel | orthogonal_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 parity | vs the pinned oracle on the frozen fixture | 11200 == oracle, 12000 bars == rows, max|dev| 2.22e-16 (LZ76 count exact, norm โ1 ulp) |
| Producer column | BarOrthogonalExtV1 { lziv_complexity_signs } + BarRow + schema.sql Nullable(Float64) CODEC(Gorilla(8),ZSTD(1)) + feature_metadata.yaml | test_schema_contract 4/4 |
| Producer populate | LzivComplexitySignsRollingState โ 200-bar sign ring + prior close/close-time; read-before-push observe(close_mid, open_time_us, close_time_us) @ finalize | โ |
| batchโกstreaming | streaming observe() over the fixture per partition | 11200 == oracle, max|dev| 2.22e-16 (identical to batch) |
| 3-way FOSS | antropy vs independent clean-room substring-membership LZ76 | PASS โ self-validated on 6 vectors; 0 value-mismatches, 0 None/Some, max|dev| 0.000e+00 / 11200 |
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.
observe() forms this bar's sign from close_mid + the prior close/close-time (gap-null), reads the normalized LZ76 over the trailing 200 signs BEFORE this bar, then folds this bar's sign in. Residual: live bigblack producer-vs-oracle smoke (no CH/MT5 on laptop โ deferred to operator).np.diff(np.log) (two-log form, the #94 lesson); np.sign maps upโ+1 / downโโ1 / flatโ0 / gapโNaN; binarization (s>0) collapses down+flatโbit 0 and drops NaN โ a unit test pins flatโกdown and another pins the NaN-drop, so the producer's sign(logret) reconstruction matches the oracle exactly.mise run check:all-gates green on macOS except (a) worktree-context check:git-hook-installed and (b) the STANDING foreign research-orthogonality substrate-skip (see handoff). feature-metadata:verify-offline PASS.CompletedBar field required a 1-line Default::default() in 9 explicit literals (2 blocklisted test files) โ exact-match on the stripped literal opener, so -> CompletedBar { return-type lines are never touched. Same pattern as #91/#92/#93/#94.lziv_complexity_signs; field-unions with #91/#92/#93/#94 at operator merge. Merge order: #90 โ #91 โ #92 โ #93 โ #94 โ #95.research-orthogonality substrate-skip recurs as a STANDING foreign item (first surfaced #92; rust-enhancement loop follow-up; scripts/research/ untouched).Feature #6 โ mann_kendall_z (card 20, Mann-Kendall trend test: EXACT integer S statistic, ฮต on the Z standardization).
Presentation only โ never the SSoT.