Files
wickra/testdata/golden/g_FibonacciPivots.csv
T
kingchencandGitHub 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

82 lines
10 KiB
CSV

pp,r1,r2,r3,s1,s2,s3
99.66666666666667,100.81266666666667,101.52066666666667,102.66666666666667,98.52066666666667,97.81266666666667,96.66666666666667
103.16267454598328,104.50800224115021,105.33914709994443,106.68447479511136,101.81734685081635,100.98620199202213,99.6408742968552
106.46632396532765,107.81316124302487,108.64523872348703,109.99207600118424,105.11948668763043,104.28740920716827,102.94057192947105
109.30969002905226,110.43045761814919,111.1228690082719,112.24363659736883,108.18892243995533,107.49651104983262,106.37574346073569
111.45910647185464,112.51004003677521,113.15930789363712,114.21024145855769,110.40817290693407,109.75890505007216,108.70797148515159
112.74199773788952,113.94603379200588,114.68988852700971,115.89392458112607,111.53796168377316,110.79410694876933,109.59007089465297
113.06847380764877,114.54359288641214,115.45492299789944,116.93004207666282,111.5933547288854,110.6820246173981,109.20690553863473
112.44424589558567,113.94126924815325,114.86613184293323,116.36315519550081,110.94722254301809,110.0223599482381,108.52533659567052
110.97251301246604,112.22734873130317,113.00258755236486,114.25742327120199,109.71767729362891,108.94243847256722,107.68760275373009
108.84406406881523,109.69501097418281,110.22072686336278,111.07167376873036,107.99311716344765,107.46740127426767,106.6164543689001
106.3166460187776,107.43997385433514,108.13396696740209,109.25729480295962,105.19331818322007,104.49932507015312,103.37599723459559
103.68631980047041,105.09851191959069,105.9709656895184,107.38315780863867,102.27412768135014,101.40167391142244,99.98948179230216
101.25473880483469,102.71198063722485,103.61226616718318,105.06950799957335,99.79749697244452,98.8972114424862,97.43996961009603
99.29680919958425,100.5557612470298,101.33354314021608,102.59249518766164,98.03785715213868,97.26007525895241,96.00112321150685
98.03294152441634,99.22492721294972,99.9613372194782,101.15332290801157,96.84095583588297,96.10454582935449,94.91256014082111
97.60915371740403,98.84161218912618,99.60302632348856,100.83548479521072,96.37669524568187,95.61528111131949,94.38282263959734
98.08685392291113,99.28048082836183,100.01790478042038,101.21153168587108,96.89322701746043,96.15580306540188,94.96217615995118
99.44252381095095,100.67262073465109,101.43257590217266,102.6626728258728,98.2124268872508,97.45247171972923,96.22237479602909
101.57606521173501,102.70096097581343,103.39592275676242,104.52081852084083,100.4511694476566,99.75620766670761,98.6313119026292
104.32553529275576,105.72623070558188,106.59158179832262,107.99227721114875,102.92483987992964,102.0594887871889,100.65879337436277
107.48553552770288,108.94847286168552,109.85227707849155,111.31521441247419,106.02259819372024,105.1187939769142,103.65585664293157
110.82665131417549,112.09538171016656,112.87920467732336,114.14793507331443,109.55792091818442,108.77409795102763,107.50536755503656
114.11393840247109,114.99542023137938,115.54000062829655,116.42148245720485,113.2324565735628,112.68787617664563,111.80639434773734
117.12329605763098,118.21786975683891,118.89409853436005,119.98867223356798,116.02872235842305,115.3524935809019,114.25791988169398
119.6553939855807,121.08079680464465,121.96141215883074,123.38681497789469,118.22999116651675,117.34937581233066,115.92397299326672
121.54740034135453,123.06524841808958,124.00297654926622,125.52082462600127,120.02955226461948,119.09182413344284,117.57397605670779
122.68295119326267,124.02464200193585,124.85353998844596,126.19523079711914,121.34126038458949,120.51236239807938,119.1706715894062
123.0005912206809,124.01111238080749,124.63541341167102,125.64593457179761,121.99007006055432,121.36576902969078,120.3552478695642
122.50041000814686,123.57715372836827,124.2423671262014,125.31911084642282,121.42366628792544,120.75845289009231,119.6817091698709
121.2480003897514,122.52681822669399,123.3168732254334,124.595691062376,119.9691825528088,119.1791275540694,117.90030971712679
119.37441415670385,120.74821739333669,121.59695447146589,122.97075770809873,118.00061092007101,117.1518738419418,115.77807060530897
117.0706953893436,118.31811872494761,119.08877816788622,120.33620150349023,115.82327205373959,115.05261261080098,113.80518927519697
114.57595201454465,115.85764420698057,116.64947498555355,117.93116717798947,113.29425982210874,112.50242904353576,111.22073685109984
112.1587734147477,113.53305066522086,114.38208058959694,115.7563578400701,110.78449616427454,109.93546623989846,108.5611889894253
110.09297423674845,111.33331363815832,112.09959661913405,113.33993602054392,108.85263483533858,108.08635185436285,106.84601245295298
108.62989574587948,109.70362038823474,110.3669685966008,111.44069323895606,107.55617110352422,106.89282289515816,105.8190982528029
107.97053212992039,109.01244659617436,109.65614244443599,110.69805691068996,106.92861766366642,106.28492181540479,105.24300734915082
108.24129915337737,109.62936856606156,110.48691930269366,111.87498871537785,106.85322974069318,105.99567900406107,104.60760959137689
109.47714653729103,110.99878600505967,111.93885646158691,113.46049592935555,107.9555070695224,107.01543661299516,105.49379714522652
111.61489250420503,112.99893308070139,113.853994798118,115.23803537461436,110.23085192770867,109.37579021029207,107.9917496337957
114.49824346605784,115.52161682480416,116.15385795743278,117.17723131617909,113.47487010731153,112.84262897468291,111.8192556159366
117.8942032754348,118.8463348819451,119.4345627854436,120.3866943919539,116.94207166892451,116.353843765426,115.40171215891571
121.51880689228612,122.83681533002809,123.65108232297861,124.96909076072058,120.20079845454416,119.38653146159363,118.06852302385167
125.06867496722403,126.53917932961993,127.44765846450325,128.91816282689916,123.59817060482813,122.6896914699448,121.2191871075489
128.2540554225371,129.6207276051981,130.46505911071645,131.83173129337746,126.88738323987609,126.04305173435776,124.67637955169674
130.82894581221407,131.95862642680405,132.65654429340938,133.78622490799935,129.6992651976241,129.00134733101876,127.87166671642879
132.61456770121885,133.8518666476291,134.61627123232233,135.85357017873258,131.3772687548086,130.61286417011536,129.3755652237051
133.51372898547731,134.68194122456754,135.40366396913635,136.57187620822657,132.3455167463871,131.62379400181828,130.45558176272806
133.51518476304713,134.75360785307896,135.5187069348787,136.75713002491054,132.2767616730153,131.51166259121555,130.27323950118372
132.68866514679192,133.85800222461282,134.5804198957273,135.7497569735482,131.51932806897102,130.79691039785655,129.62757332003565
131.17247746428333,132.4786827181627,133.2856576917636,134.59186294564296,129.86627221040396,129.05929723680308,127.7530919829237
129.1563006939515,130.62431973540032,131.5312634364001,132.99928247784894,127.68828165250267,126.78133795150288,125.31331891005405
126.86189674888487,128.24100825576338,129.09302478880875,130.47213629568728,125.48278524200636,124.630768708961,123.25165720208248
124.52403581279573,125.58066475206525,126.23345121716368,127.29008015643319,123.46740687352622,122.81462040842779,121.75799146915827
122.37315973892662,123.28723069491407,123.8519446886655,124.76601564465295,121.45908878293916,120.89437478918774,119.98030383320028
120.62044223256866,121.93179534908126,122.74195067760738,124.05330379411997,119.30908911605607,118.49893378752995,117.18758067101736
119.44519828628948,120.95798066124405,121.89257919655628,123.40536157151085,117.93241591133491,116.99781737602268,115.48503500106811
118.98423170775713,120.42919204328321,121.3218900516187,122.76685038714477,117.53927137223106,116.64657336389557,115.2016130283695
119.32275870519,120.46358046653928,121.16838134527862,122.3092031066279,118.18193694384071,117.47713606510138,116.33631430375209
120.48694857241185,121.54953350218761,122.20599958445744,123.26858451423321,119.42436364263608,118.76789756036625,117.70531263059048
122.4387103823207,123.61174566748154,124.33644809496309,125.50948338012392,121.26567509715987,120.54097266967833,119.36793738451749
125.07389544503057,126.43676751660486,127.27875130951465,128.64162338108895,123.71102337345629,122.8690395805465,121.50616750897221
128.2253492633656,129.54885944041897,130.36652541367707,131.69003559073047,126.90183908631221,126.08417311305409,124.76066293600071
131.67207090888238,132.86158039196914,133.59646059617984,134.7859700792666,130.4825614257956,129.7476812215849,128.55817173849815
135.15507483469676,136.51644647209432,137.35750329519857,138.71887493259612,133.7937031972992,132.95264637419496,131.5912747367974
138.3994880837803,139.723623360016,140.54167552020348,141.86581079643918,137.07535280754462,136.25730064735714,134.93316537112145
141.1411629574787,142.21505238350596,142.87850239539713,143.95239182142438,140.06727353145146,139.4038235195603,138.32993409353304
143.154923777789,144.1913122149881,144.8315940767132,145.8679825139123,142.11853534058991,141.47825347886481,140.44186504166572
144.28078575968826,145.54401992827184,146.32444732038107,147.58768148896465,143.01755159110468,142.23712419899545,140.97389003041187
144.44430932083742,145.94230838771023,146.86777377980968,148.3657728466825,142.9463102539646,142.02084486186516,140.52284579499235
143.66778712039107,145.14133105609014,146.051688042543,147.52523197824206,142.194243184692,141.28388619823914,139.81034226254008
142.07015356602253,143.26337107532478,144.00054210201415,145.1937596113164,140.87693605672027,140.1397650300309,138.94654752072864
139.85515947975856,140.71927248015686,141.25312239663327,142.11723539703158,138.99104647936025,138.45719656288384,137.59308356248553
137.28916235919314,138.47495072253432,139.20753201506972,140.3933203784109,136.10337399585197,135.37079270331657,134.1850043399754
134.6714977766173,136.10963458734548,136.99811701491578,138.43625382564397,133.2333609658891,132.3448785383188,130.9067417275906
132.3015073284582,133.7408634139556,134.63009911075505,136.06945519625245,130.8621512429608,129.97291554616135,128.53355946066395
130.44669455820846,131.65407127154833,132.3999898693185,133.60736658265836,129.2393178448686,128.49339924709844,127.28602253375857
129.31610321851522,130.52676585095463,131.27471449298525,132.4853771254247,128.10544058607582,127.35749194404518,126.14682931160577
129.04196344134022,130.26287172784006,131.0171501456777,132.23805843217755,127.82105515484035,127.06677673700274,125.84586845050288
129.6711671025228,130.88464000249573,131.63432483075127,132.8477977307242,128.45769420254985,127.7080093742943,126.49453647432136