4f708d410d
* 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
4.6 KiB
4.6 KiB
| 1 | hedge_ratio | intercept | spread |
|---|---|---|---|
| 2 | 0 | 0 | 100 |
| 3 | 1.008449973750648 | 0.00983109160282488 | 103.4552020666134 |
| 4 | 1.0049997664536972 | 0.009799693520450693 | -0.36612273503502024 |
| 5 | 1.0005581031693263 | 0.009761460750754965 | -0.48534963346541815 |
| 6 | 0.9961886417280781 | 0.009725012022283317 | -0.48826881311569537 |
| 7 | 0.9928419337093037 | 0.009697095634596278 | -0.3791328516671655 |
| 8 | 0.9912099923684018 | 0.009683032711546604 | -0.18561367338674017 |
| 9 | 0.9916321209566226 | 0.009686896076220222 | 0.04773370050111225 |
| 10 | 0.9940457156310357 | 0.009710787303330751 | 0.2689204562593517 |
| 11 | 0.9979762965545008 | 0.00975312966664966 | 0.4284186813611086 |
| 12 | 1.0025803966415856 | 0.009806748158881879 | 0.48867971989730563 |
| 13 | 1.0067704780669033 | 0.009858489939966577 | 0.4325302941445983 |
| 14 | 1.009444702704938 | 0.009892431752796065 | 0.2691026830397476 |
| 15 | 1.0097996151622775 | 0.009896874474320753 | 0.035015404729747956 |
| 16 | 1.007628734953161 | 0.009871344031348338 | -0.21175441898799363 |
| 17 | 1.0034588074474962 | 0.009827585907170668 | -0.40610746293197053 |
| 18 | 0.9984185019458207 | 0.009782622241579072 | -0.49492666496618654 |
| 19 | 0.9938728653450748 | 0.009749410171835109 | -0.45389164658156744 |
| 20 | 0.9909881730039212 | 0.009732424957276402 | -0.2947876975849226 |
| 21 | 0.9904095798481317 | 0.009729638674842205 | -0.06075001051739548 |
| 22 | 0.99214391603899 | 0.009736817822232699 | 0.18739497720882525 |
| 23 | 0.9956336675100396 | 0.00975020700049312 | 0.3878803040454528 |
| 24 | 0.999953160618924 | 0.00976683874240007 | 0.4929220050790093 |
| 25 | 1.0040540506178772 | 0.009783740241912073 | 0.47900881091034364 |
| 26 | 1.007003395708264 | 0.009797329838168656 | 0.3512618790128528 |
| 27 | 1.0081731949904238 | 0.00980351753030784 | 0.14141505822986744 |
| 28 | 1.0073530782255193 | 0.009798460898698813 | -0.10012392519114144 |
| 29 | 1.0047726263658792 | 0.009779771621941515 | -0.3163944345027261 |
| 30 | 1.0010374402908397 | 0.009747949220724944 | -0.45725617628146153 |
| 31 | 0.9969985611568529 | 0.009707671602497723 | -0.4907052519538837 |
| 32 | 0.993582351053496 | 0.009668265178457702 | -0.4095804763932449 |
| 33 | 0.9916066168910642 | 0.009642419151820885 | -0.2326168558421955 |
| 34 | 0.9916043312769942 | 0.009642386208610054 | -0.0002633705419157195 |
| 35 | 0.9936776025048746 | 0.009674023680909213 | 0.2335398575954457 |
| 36 | 0.997416510391237 | 0.009731281227542693 | 0.4123739774789783 |
| 37 | 1.0019324572301234 | 0.009795920011063577 | 0.4899749416012611 |
| 38 | 1.0060491490519257 | 0.009845978782587634 | 0.44272304197630774 |
| 39 | 1.0086386989728893 | 0.009869360196252877 | 0.2787000468929932 |
| 40 | 1.0089951379542212 | 0.00987128094160142 | 0.038789225690294415 |
| 41 | 1.00707524517666 | 0.009867674908218702 | -0.21327535665554365 |
| 42 | 1.003486190577041 | 0.009870909256725435 | -0.40996390415442363 |
| 43 | 0.9992416794979224 | 0.009881809558258705 | -0.5006210529208488 |
| 44 | 0.9954249968241402 | 0.009893342413667613 | -0.46518396424303887 |
| 45 | 0.9929037587082408 | 0.009899358850871712 | -0.3168060181433958 |
| 46 | 0.9921668101463591 | 0.009900027099551153 | -0.09500781911626177 |
| 47 | 0.9932790575023459 | 0.009901297375280197 | 0.14616381106964127 |
| 48 | 0.9959182793409985 | 0.009910552459890679 | 0.35094799288950185 |
| 49 | 0.999462096989776 | 0.009931715223056282 | 0.47331835281764256 |
| 50 | 1.0031089592811433 | 0.009962194819963757 | 0.4859134004653356 |
| 51 | 1.0060265459989859 | 0.009992873408831541 | 0.38559503826863306 |
| 52 | 1.007518028007402 | 0.010011248085731339 | 0.19467532210853733 |
| 53 | 1.0071833759706115 | 0.01000667187232971 | -0.043019029203236414 |
| 54 | 1.0050379051982563 | 0.009975538776389325 | -0.27128600709252737 |
| 55 | 1.0015452619086804 | 0.009923885484371082 | -0.4345018140025161 |
| 56 | 0.9975360488873702 | 0.009865789970133865 | -0.4914622305897609 |
| 57 | 0.9940155266608885 | 0.009817878142306122 | -0.42637558821022026 |
| 58 | 0.9919025634997535 | 0.009792210629689003 | -0.25376668039800165 |
| 59 | 0.9917712683040671 | 0.009790881348360193 | -0.01570880674589148 |
| 60 | 0.993675052617112 | 0.009805350770485546 | 0.22813026536945813 |
| 61 | 0.9971159274307868 | 0.009821561929342705 | 0.4153756157757016 |
| 62 | 1.0011805182491096 | 0.009828426590661866 | 0.4972554323981342 |
| 63 | 1.0048066025704907 | 0.009824249497470891 | 0.45205486791863336 |
| 64 | 1.00709102030362 | 0.009816335154822543 | 0.29152101691460075 |
| 65 | 1.0075312594045809 | 0.009814158092147399 | 0.05767289361065764 |
| 66 | 1.0061248827783897 | 0.009821751411023661 | -0.18929022432504894 |
| 67 | 1.0033160000096213 | 0.009835149218942461 | -0.38786068380409233 |
| 68 | 0.9998362002540815 | 0.009846029700415029 | -0.4911653446295361 |
| 69 | 0.996509112104391 | 0.0098481269567445 | -0.4773783925801638 |
| 70 | 0.9940736528817733 | 0.009842023320121749 | -0.3527755106966879 |
| 71 | 0.9930522895407304 | 0.009835855028440778 | -0.14821677028905356 |
| 72 | 0.9936678943714319 | 0.009841825601432623 | 0.08881985497336586 |
| 73 | 0.9958048163876181 | 0.009869985989086087 | 0.30445984845988505 |
| 74 | 0.9990146688024579 | 0.009921748967058155 | 0.4492422849891966 |
| 75 | 1.0025771909719787 | 0.009986443723443053 | 0.4883003822636738 |
| 76 | 1.00563029767585 | 0.010044183862920606 | 0.4096685187588207 |
| 77 | 1.0073693906146568 | 0.010075707107777731 | 0.22898095963250853 |
| 78 | 1.0072798672783694 | 0.010074295287103322 | -0.011622502484897268 |
| 79 | 1.00532409201906 | 0.010050604195846033 | -0.252030859015008 |
| 80 | 1.0019914030425519 | 0.01002492976776852 | -0.42949253851236335 |
| 81 | 0.9981661477823007 | 0.010012567175871 | -0.496622203074935 |