F3: add MOM, CMO, TSI and PMO momentum indicators

Completes the F3 family (Momentum) end to end:

- Rust core: mom.rs (raw price-difference momentum), cmo.rs (Chande
  Momentum Oscillator — unsmoothed gain/loss sum, bounded [-100,100]),
  tsi.rs (True Strength Index — double-EMA-smoothed momentum ratio),
  pmo.rs (DecisionPoint Price Momentum Oscillator — doubly-smoothed ROC
  with the 2/period custom smoothing). Each with a full Indicator impl,
  runnable doctest and reference-value / saturation / warmup / reset /
  batch==streaming / non-finite tests.
- Python: PyMom / PyCmo / PyTsi / PyPmo PyO3 classes + module
  registration + .pyi stubs (defaults MOM=10, CMO=14, TSI=(25,13),
  PMO=(35,20)).
- Node: MomNode / CmoNode via the scalar macro, explicit TsiNode and
  PmoNode; index.d.ts and index.js updated.
- WASM: WasmMom / WasmCmo / WasmTsi / WasmPmo via the scalar macro.
- Wiki: Indicator-Mom/Cmo/Tsi/Pmo.md plus rows in Indicators-Overview.md
  and entries in Home.md.

cargo fmt + clippy (core/wickra/data/wasm/node) clean; 262 core tests,
25 data tests and 37 doctests green.
This commit is contained in:
kingchenc
2026-05-22 17:53:46 +02:00
parent 780a176072
commit 7728151c87
17 changed files with 1826 additions and 5 deletions
+8
View File
@@ -10,6 +10,7 @@ mod atr;
mod awesome_oscillator;
mod bollinger;
mod cci;
mod cmo;
mod dema;
mod donchian;
mod ema;
@@ -18,7 +19,9 @@ mod kama;
mod keltner;
mod macd;
mod mfi;
mod mom;
mod obv;
mod pmo;
mod psar;
mod roc;
mod rsi;
@@ -29,6 +32,7 @@ mod t3;
mod tema;
mod trima;
mod trix;
mod tsi;
mod vwap;
mod vwma;
mod williams_r;
@@ -41,6 +45,7 @@ pub use atr::Atr;
pub use awesome_oscillator::AwesomeOscillator;
pub use bollinger::{BollingerBands, BollingerOutput};
pub use cci::Cci;
pub use cmo::Cmo;
pub use dema::Dema;
pub use donchian::{Donchian, DonchianOutput};
pub use ema::Ema;
@@ -49,7 +54,9 @@ pub use kama::Kama;
pub use keltner::{Keltner, KeltnerOutput};
pub use macd::{MacdIndicator, MacdOutput};
pub use mfi::Mfi;
pub use mom::Mom;
pub use obv::Obv;
pub use pmo::Pmo;
pub use psar::Psar;
pub use roc::Roc;
pub use rsi::Rsi;
@@ -60,6 +67,7 @@ pub use t3::T3;
pub use tema::Tema;
pub use trima::Trima;
pub use trix::Trix;
pub use tsi::Tsi;
pub use vwap::{RollingVwap, Vwap};
pub use vwma::Vwma;
pub use williams_r::WilliamsR;