Iteration 04 ยท 2026-06-09 ยท driver: native Claude Code /loop (laptop run)
โ Dashboard ยท PR terrylica/mql5#93 ยท card 54 ยท 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 #93 open (base main; diff auto-cleans once #90 + #91 + #92 land).
Mean local clustering coefficient of the Horizontal Visibility Graph (Luque-Lacasa PRE 2009) of the raw 200-bar strictly-trailing close window. Causal: the window is the 200 bars BEFORE bar i (current bar excluded). Value โ [0,1]. None on warmup (<200 bars). Substrate distinction from #1: the HVG consumes raw closes DIRECTLY โ NO log-return, NO gap-NULL; weekend/Ouroboros gaps are part of the shape the graph sees.
| Layer | Artifact | Result |
|---|---|---|
| Python SSoT | oracle_hvg_clustering.py โ networkx.average_clustering(ts2vg.HorizontalVG().build(closes)) (ts2vg 1.2.4 MIT + networkx 3.6.1 BSD) | sha-pinned jsonl (12000 rows, 11200 finite) + .sha256 sidecar |
| Rust kernel | orthogonal_extension_kernels::hvg_clustering โ O(nยฒ) running-max HVG (strict visibility, ties block) + 2e_i/(k_i(k_i-1)) clustering, node-order average; no transcendentals, no new dep | clippy clean |
| Differential parity | vs the pinned oracle on the frozen fixture | 11200 == oracle, 12000 bars == rows, max|dev| 9.99e-16 (1 ulp) |
| Producer column | BarOrthogonalExtV1 { hvg_clustering } + BarRow + schema.sql Nullable(Float64) CODEC(Gorilla(8),ZSTD(1)) + feature_metadata.yaml | test_schema_contract 4/4 |
| Producer populate | HvgClusteringRollingState (200-bar close ring, read-before-push, NO gap-NULL, persists across gaps) @ finalize | โ |
| batchโกstreaming | streaming observe() over the fixture per partition | 11200 == oracle, max|dev| 9.99e-16 (identical to batch) |
| 3-way FOSS | ts2vg+networkx vs clean-room numpy HVG+clustering | PASS โ 0 edge-set mismatches / 11200, clustering 9.99e-16 |
No second mainstream Python HVG-clustering library exists โ ts2vg+networkx is canonical. So the independent leg is a from-scratch clean-room numpy implementation sharing NO code with the SSoT: HVG built via a cumulative-max formulation (distinct from ts2vg's internal algorithm AND the Rust kernel's sequential scan), clustering via explicit neighbour-pair adjacency lookups (distinct from networkx's triangle iterator). The HVG edge set is uniquely determined by the rule, so the strongest check is edge-set equality: 0 mismatches across all 11200 windows โ the bug-prone graph construction corroborated by two independent algorithms โ and the clustering matched to 9.99e-16. Triangulates with Rust==SSoT at 9.99e-16: ts2vg+networkx == clean-room numpy == Rust.
observe() at the once-per-emitted-bar finalize point. Residual: live bigblack producer-vs-oracle smoke (no CH/MT5 on laptop โ deferred to operator).2e/(k(k-1)) (0 for deg<2), node-order sum /n; integer operands <200 โ exact intโf64, residual 9.99e-16 = last ulp of the sum.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) โ mechanical, behavior-identical. Same pattern as #91/#92.hvg_clustering; field-unions with #91/#92 at operator merge. Merge order: #90 โ #91 โ #92 โ #93.research-orthogonality substrate-skip recurs as a STANDING foreign item (first surfaced #92; rust-enhancement loop follow-up; scripts/research/ untouched).Feature #4 โ kendall_taub_ret_spread (card 79, scipy.kendalltau(variant='b') over the returnรspread window, EXACT+ฮต).
Presentation only โ never the SSoT.