Files
wickra/testdata/golden/g_KalmanHedgeRatio.csv
T
kingchenc 4f708d410d test: golden-pin the four de-duplicated indicators across all bindings (#305)
* test: golden-pin the four de-duplicated indicators across all C-ABI bindings

Extend gen_golden to emit reference fixtures for AdOscillator (ADOSC),
IntradayIntensity, AwesomeOscillatorHistogram and AverageDrawdown, and replay
them through the Go / C# / Java / R golden harnesses so their corrected
definitions stay bit-identical to the Rust core in every binding. Go suite
verified locally (gcc 13 + cgo): all 9 golden tests pass; C#/Java/R use the
same fixtures and harness pattern (CI-verified). First step of extending the
golden coverage beyond the seven archetype representatives.

* test: golden-pin the scalar-output tranche (308 indicators) against Rust

Extend gen_golden with a generated emit_scalar that writes reference fixtures
for every single-f64-output indicator (scalar / candle / pairwise input) using
valid constructor params, and add a manifest-driven generic Python golden
replay that reconstructs each by its native name and checks it bit-for-bit
against the Rust output. 308 indicators now value-tied to the Rust core in
Python (pytest: 308/308). Takes golden coverage from the 7 archetype
representatives to 308+ of the catalogue.

22 scalar indicators with non-default constructor constraints are skipped by
gen_golden for now (logged), as are non-f64-output ones; multi-output, exotic
inputs and the per-indicator arg arities of the C-ABI/Node replays follow.
Generated + verified locally with the full toolchain.

* test: golden-pin the multi-output tranche (70 indicators) in Python

Add a generated emit_multi to gen_golden (per-indicator Output-field access,
one CSV column per field) and a manifest-driven generic Python replay that
checks every field of each multi-output indicator against the Rust reference.
70 multi-output indicators now value-tied to Rust in Python; combined with the
scalar tranche, 378 indicators are golden-pinned. 8 multi with non-default
param constraints and 5 with non-f64 Output fields (Option/Vec/i64) are
deferred. pytest green.

* test(golden): add 30 constraint-tuned indicators to scalar/multi golden suite

Emit golden fixtures for 22 scalar-output and 8 multi-output indicators
whose constructors need non-default parameters (Alma, Jma, Psar, T3, Mama,
DoubleBollinger, ZigZag, ...). All 408 fixtures replay bit-for-bit through
the Python binding.

* test(golden): cover 36 missed scalar/multi indicators

Add 26 single-output (LinearRegression family, HT cycle, Candle
volatility estimators, DrawdownDuration) and 10 multi-output
(BollingerBands, MACD/MACDEXT/MACDFIX, Camarilla, VWAP bands, ...)
indicators to the golden suite. 444 fixtures replay bit-for-bit
through the Python binding.

* test(golden): cover 50 exotic-input indicators

Add deterministic synthetic feeders for the DerivativesTick (17),
CrossSection (15), Trade (8), TradeQuote (3) and OrderBook (7)
families, derived from the shared OHLCV input series in both
gen_golden and a new Python replay harness (test_golden_exotic).
All 494 fixtures replay bit-for-bit through the Python binding.

* test(golden): complete 514-indicator golden coverage

Add the final tranches: 3 mixed multi-output indicators (Ichimoku,
WilliamsFractals, LeadLagCrossCorrelation), 6 histogram profiles
(time/volume seasonality + TPO/volume price profiles), 10 alt-chart
bar builders and the footprint. Every one of the 514 distinct
indicators now has a Rust-generated g_<Canonical>.csv fixture and a
generic Python replay (scalar/multi/exotic/profile/bars), all passing
bit-for-bit.

* test(golden): add generic Node replay for all 514 indicators

A manifest-driven node:test harness reconstructs every indicator by its
native class, feeds the same synthetic stream derived from the shared
golden input, and checks output bit-for-bit against the Rust reference
fixtures (scalar/multi/exotic/profile/bars). node_manifest.json is
generated from index.d.ts plus the Python-side manifests. 514/514 pass.

* test(golden): add generated Go replay for all 514 indicators

golden_all_test.go (generated by gen_golden_test.py) reconstructs every
Go indicator, feeds the shared synthetic stream and checks output
bit-for-bit against the Rust reference fixtures. A reflection-based
comparator flattens multi-output structs, profiles and bar slices so one
path covers all archetypes. This is the first C-ABI binding verified
across the full catalogue. 514/514 pass.

* test(golden): add generated C# replay for all 514 indicators

GoldenAllTests.g.cs (generated by gen_golden_test.py) reconstructs every
C# indicator, feeds the shared synthetic stream and checks output
bit-for-bit against the Rust reference fixtures via a reflection-based
flatten covering scalar/multi/profile/bar archetypes. 514/514 pass.

Also add the '#nullable enable' directive the compiler requires to the
generated Indicators.g.cs, clearing the four CS8669 warnings on the
nullable double[] profile return types.

* fix(java): marshal C ABI bool params correctly; add 514 golden replay

The Java FFM binding marshalled the cross-section state flags (newHigh,
newLow, aboveMa, onBuySignal) as JAVA_DOUBLE arrays, but the C ABI takes
them as const bool* (one byte each), so the native side read the low byte
of each 8-byte double and saw every flag as false. Add WickraNative.
boolSegment and use it across the 15 cross-section indicators. Also pass
the MacdExt MaType arguments as byte to match the uint8_t downcall
descriptor (was int, throwing WrongMethodTypeException).

Add GoldenAllTest.java (generated by gen_golden_test.py): a reflection
runner replaying all 514 indicators against the Rust reference fixtures.
The bugs above were found by this test; 514/514 now pass.

* fix(r): marshal C ABI bool flags correctly; add 514 golden replay

The R wrapper passed the cross-section state flags as (bool *)REAL(x),
reinterpreting the 8-byte doubles as 1-byte bools so the native side read
every flag as false. Add wk_bool_vec to convert each flag vector into a
real C bool buffer and use it for all 15 cross-section update wrappers.

Add test-golden-all.R + generated golden_specs.R: a reflective runner
replaying all 514 indicators against the Rust reference fixtures. The bug
above was found by this test; verified 514/514 pass locally.

* test(golden): add WASM replay for all 514 indicators

A manifest-driven node:test harness loads the nodejs-target wasm-pack
build, reconstructs every indicator by its JS class, feeds the shared
synthetic stream and checks output bit-for-bit against the Rust
reference fixtures. wasm_manifest.json is generated from the wasm .d.ts
plus the shared manifests; a recursive flattener covers scalar, multi
(Reflect objects), profile and bar shapes. 514/514 pass locally
(wasm-pack build --target nodejs, then node --test).

* test(golden): add C and C++ replay for all 514 indicators

golden_test.c (generated by gen_golden_test.py) drives every indicator
through the C ABI (wickra.h) and checks output bit-for-bit against the
Rust reference fixtures. golden_test.cpp #includes the same source so the
identical runner is compiled and run under both gcc (C) and g++ (C++) via
the CMake targets golden_test / golden_test_cpp — proving the extern "C"
header is consumable from each language. Both 514/514 (verified via ctest).

* test(golden): gofmt the generated Go golden replay

* test(golden): make the Node fixture reader CRLF-safe and pin fixtures to LF
2026-06-15 04:48:51 +02:00

4.6 KiB

1hedge_ratiointerceptspread
200100
31.0084499737506480.00983109160282488103.4552020666134
41.00499976645369720.009799693520450693-0.36612273503502024
51.00055810316932630.009761460750754965-0.48534963346541815
60.99618864172807810.009725012022283317-0.48826881311569537
70.99284193370930370.009697095634596278-0.3791328516671655
80.99120999236840180.009683032711546604-0.18561367338674017
90.99163212095662260.0096868960762202220.04773370050111225
100.99404571563103570.0097107873033307510.2689204562593517
110.99797629655450080.009753129666649660.4284186813611086
121.00258039664158560.0098067481588818790.48867971989730563
131.00677047806690330.0098584899399665770.4325302941445983
141.0094447027049380.0098924317527960650.2691026830397476
151.00979961516227750.0098968744743207530.035015404729747956
161.0076287349531610.009871344031348338-0.21175441898799363
171.00345880744749620.009827585907170668-0.40610746293197053
180.99841850194582070.009782622241579072-0.49492666496618654
190.99387286534507480.009749410171835109-0.45389164658156744
200.99098817300392120.009732424957276402-0.2947876975849226
210.99040957984813170.009729638674842205-0.06075001051739548
220.992143916038990.0097368178222326990.18739497720882525
230.99563366751003960.009750207000493120.3878803040454528
240.9999531606189240.009766838742400070.4929220050790093
251.00405405061787720.0097837402419120730.47900881091034364
261.0070033957082640.0097973298381686560.3512618790128528
271.00817319499042380.009803517530307840.14141505822986744
281.00735307822551930.009798460898698813-0.10012392519114144
291.00477262636587920.009779771621941515-0.3163944345027261
301.00103744029083970.009747949220724944-0.45725617628146153
310.99699856115685290.009707671602497723-0.4907052519538837
320.9935823510534960.009668265178457702-0.4095804763932449
330.99160661689106420.009642419151820885-0.2326168558421955
340.99160433127699420.009642386208610054-0.0002633705419157195
350.99367760250487460.0096740236809092130.2335398575954457
360.9974165103912370.0097312812275426930.4123739774789783
371.00193245723012340.0097959200110635770.4899749416012611
381.00604914905192570.0098459787825876340.44272304197630774
391.00863869897288930.0098693601962528770.2787000468929932
401.00899513795422120.009871280941601420.038789225690294415
411.007075245176660.009867674908218702-0.21327535665554365
421.0034861905770410.009870909256725435-0.40996390415442363
430.99924167949792240.009881809558258705-0.5006210529208488
440.99542499682414020.009893342413667613-0.46518396424303887
450.99290375870824080.009899358850871712-0.3168060181433958
460.99216681014635910.009900027099551153-0.09500781911626177
470.99327905750234590.0099012973752801970.14616381106964127
480.99591827934099850.0099105524598906790.35094799288950185
490.9994620969897760.0099317152230562820.47331835281764256
501.00310895928114330.0099621948199637570.4859134004653356
511.00602654599898590.0099928734088315410.38559503826863306
521.0075180280074020.0100112480857313390.19467532210853733
531.00718337597061150.01000667187232971-0.043019029203236414
541.00503790519825630.009975538776389325-0.27128600709252737
551.00154526190868040.009923885484371082-0.4345018140025161
560.99753604888737020.009865789970133865-0.4914622305897609
570.99401552666088850.009817878142306122-0.42637558821022026
580.99190256349975350.009792210629689003-0.25376668039800165
590.99177126830406710.009790881348360193-0.01570880674589148
600.9936750526171120.0098053507704855460.22813026536945813
610.99711592743078680.0098215619293427050.4153756157757016
621.00118051824910960.0098284265906618660.4972554323981342
631.00480660257049070.0098242494974708910.45205486791863336
641.007091020303620.0098163351548225430.29152101691460075
651.00753125940458090.0098141580921473990.05767289361065764
661.00612488277838970.009821751411023661-0.18929022432504894
671.00331600000962130.009835149218942461-0.38786068380409233
680.99983620025408150.009846029700415029-0.4911653446295361
690.9965091121043910.0098481269567445-0.4773783925801638
700.99407365288177330.009842023320121749-0.3527755106966879
710.99305228954073040.009835855028440778-0.14821677028905356
720.99366789437143190.0098418256014326230.08881985497336586
730.99580481638761810.0098699859890860870.30445984845988505
740.99901466880245790.0099217489670581550.4492422849891966
751.00257719097197870.0099864437234430530.4883003822636738
761.005630297675850.0100441838629206060.4096685187588207
771.00736939061465680.0100757071077777310.22898095963250853
781.00727986727836940.010074295287103322-0.011622502484897268
791.005324092019060.010050604195846033-0.252030859015008
801.00199140304255190.01002492976776852-0.42949253851236335
810.99816614778230070.010012567175871-0.496622203074935