feat: expand rust parity, wasm exports, and api conformance

Move several hot Python analysis paths to Rust-backed helpers. This adds Rust implementations for backtest strategy signal generation and the core portfolio loop, options and futures payoff aggregation, Greeks aggregation, ratio calculation, trade extraction, chunked close-only indicator runs, and forward-fill helpers. Wire the Python analysis and data modules to prefer these paths, and add coverage for the new batch fast path.

Expand the WASM package to export WMA, ADX, and MFI from ferro_ta_core, refresh the Node examples, benchmarks, and README, and add a Node-vs-Python conformance test so the browser and node surface stays aligned with the main Python package.

Introduce a generated cross-surface API manifest in docs/, along with scripts to rebuild and verify it from source exports. Enforce manifest freshness in the Python and WASM CI workflows so release candidates catch surface drift before push.
This commit is contained in:
Pratik Bhadane
2026-03-24 14:28:51 +05:30
parent ba77fbd418
commit 53566b9d82
27 changed files with 7012 additions and 198 deletions
+7
View File
@@ -626,6 +626,13 @@ class TestBatchApply:
with pytest.raises(ValueError, match="1-D or 2-D"):
batch_apply(np.zeros((5, 5, 5)), SMA, timeperiod=3)
def test_sma_fastpath_matches_batch_sma(self):
from ferro_ta.data.batch import batch_sma
fast = batch_apply(self.C2D, SMA, timeperiod=10)
direct = batch_sma(self.C2D, timeperiod=10)
assert np.allclose(fast, direct, equal_nan=True)
class TestBatchShapeValidation:
def test_batch_atr_shape_mismatch_raises(self):