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.