F7: add NATR, StdDev, Ulcer Index and Historical Volatility

Completes the F7 family (Volatility) end to end:

- Rust core: natr.rs (ATR as a percentage of close), std_dev.rs
  (rolling population standard deviation), ulcer_index.rs (RMS of
  trailing-high drawdowns — downside-only risk), historical_volatility.rs
  (annualised sample stddev of log returns). Each with a full Indicator
  impl, runnable doctest and reference / constant-series / warmup /
  reset / batch==streaming tests.
- Python: PyNatr / PyStdDev / PyUlcerIndex / PyHistoricalVolatility
  PyO3 classes + module registration + .pyi stubs.
- Node: StdDevNode / UlcerIndexNode via the scalar macro, explicit
  NatrNode and HistoricalVolatilityNode; index.d.ts and index.js updated.
- WASM: WasmStdDev / WasmUlcerIndex / WasmHistoricalVolatility via the
  scalar macro, explicit WasmNatr.
- Wiki: Indicator-Natr/StdDev/UlcerIndex/HistoricalVolatility.md plus
  rows in Indicators-Overview.md and entries in Home.md.

cargo fmt + clippy (core/wickra/data/wasm/node) clean; 350 core tests,
25 data tests and 49 doctests green.
This commit is contained in:
kingchenc
2026-05-22 18:26:29 +02:00
parent 16c0639f0c
commit 6c58d3827c
17 changed files with 1943 additions and 6 deletions
+4
View File
@@ -118,6 +118,10 @@ Rust / Python / Node examples. They are grouped by family, mirroring the
- [Indicator-Keltner.md](indicators/volatility/Indicator-Keltner.md)
- [Indicator-Donchian.md](indicators/volatility/Indicator-Donchian.md)
- [Indicator-Psar.md](indicators/volatility/Indicator-Psar.md)
- [Indicator-Natr.md](indicators/volatility/Indicator-Natr.md)
- [Indicator-StdDev.md](indicators/volatility/Indicator-StdDev.md)
- [Indicator-UlcerIndex.md](indicators/volatility/Indicator-UlcerIndex.md)
- [Indicator-HistoricalVolatility.md](indicators/volatility/Indicator-HistoricalVolatility.md)
**Volume** — price moves weighted or confirmed by traded volume.