Navigation

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

Feature #7 — sevcik_fd (PR #97)

← Dashboard · PR terrylica/mql5#97 · card 10 · cut off bootstrap #90

Done. The seventh ξ-confirmed candidate — the FIRST fractal/curve-complexity 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 3-way FOSS corroboration. PR #97 open (base main; diff auto-cleans once #90–#96 land).

What it computes

Sevcik (1998) fractal dimension (arXiv:1003.5266) of the per-bar mid-close curve over the 200-bar strictly-trailing window — a parameter-free roughness / space-filling measure (≈1 for a smooth path, →2 for a maximally jagged one). Causal: the window is the 200 bars BEFORE bar i (current bar excluded). None on warmup (<200 trailing closes). Map the curve into the unit square (x normalized by index xs[k]=k/(n−1), y by min/max), measure the total point-to-point Euclidean curve length L, then FD = 1 + ln(L)/ln(2(N−1)); a flat window (rng=max−min≤0) returns 1.0. Substrate = RAW mid-close level (NO log-return, NO weekend/Ouroboros gap-null — gaps are part of the level path, like hvg_clustering / mann_kendall_z). No new dep (f64 sqrt/ln); card 10 tier ε 1e-9.

The chain — one SSoT, bit-exact to the column

LayerArtifactResult
Python SSoToracle_sevcik_fd.py — bit-faithful reproduction of probe k_sevcik over the "close" 200-bar windowsha-pinned jsonl (12000 rows, 11200 finite) + .sha256 sidecar
Rust kernelorthogonal_extension_kernels::sevcik_fd — unit-square normalize + Euclidean curve length + 1+ln(L)/ln(2(n−1)); no new depclippy clean; 6 unit tests pin probe-exact values
Differential parityvs the pinned oracle on the frozen fixture11200 == oracle, 12000 bars == rows, max|dev| 6.661e-16
Producer columnBarOrthogonalExtV1 { sevcik_fd } + BarRow + schema.sql Nullable(Float64) CODEC(Gorilla(8),ZSTD(1)) + feature_metadata.yamltest_schema_contract 4/4
Producer populateSevcikFdRollingState — 200-bar RAW close ring (no logret, no gap-null); read-before-push observe(close_mid) @ finalize
batch≡streamingstreaming observe() over the fixture per partition11200 == oracle, max|dev| 6.661e-16 (identical to batch)
3-way FOSSprobe-form vs clean-room explicit-loop vs neurokit2.fractal_sevcikPASS — 0 mismatches, max|dev| 4.441e-16 (clean-room) / 2.220e-16 (neurokit2) / 11200

3-way FOSS finding (the FOSS errata caught)

The Sevcik FD is corroborated THREE independent ways: the probe-form (SSoT), a from-scratch clean-room explicit-loop unit-square curve length (no shared np.diff/vectorized-sqrt code; agrees with the probe at 4.441e-16), and neurokit2.fractal_sevcik (the real FOSS reference; agrees at 2.220e-16). ERRATA carried through the whole chain: the candidate card labels antropy@BSD-3, but antropy has NO Sevcik FD — using it would have been impossible. The bootstrap errata correctly flagged neurokit2.fractal_sevcik (MIT) as the real FOSS reference; the oracle, kernel, schema COMMENT, metadata + this FOSS leg all carry the correction. neurokit2 uses np.linspace(0,1,N) for the x-axis vs the probe's np.arange(N)/(N−1) (multiply-by-reciprocal vs divide, ≤1 ulp) — hence the 2.2e-16, well inside 1e-9.

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

Gates / scope

Next

Feature #8 — sign_two_state_entropy_rate (card 83, 2-state sign-Markov entropy rate; EXACT+ε; ref impl Girardin–Sesboué + pyitlib).

Presentation only — never the SSoT.