EMA(close, fast) - EMA(close, slow). Like MACD without the signal EMA.
Defaults to (fast = 12, slow = 26); fast must be strictly less than
slow.
Touchpoints: apo.rs + mod.rs + lib.rs re-export, PyApo + __init__.py
+ test_new_indicators SCALAR + test_known_values flat reference,
ApoNode + index.d.ts/index.js + indicators.test.js factory + reference,
WasmApo via scalar macro, scalar-fuzz target, README + CHANGELOG.
The rolling-window VWAP indicator (`wickra_core::RollingVwap`) was only
available in the Rust crate, even though the README's Volume-family
table already advertised "VWAP (cumulative + rolling)" as a cross-
language feature. Users on Python, Node or in the browser had to fall
back to the cumulative `VWAP` or re-implement the rolling variant
themselves.
This commit closes the gap end-to-end:
- Python: `wickra.RollingVWAP(period)` — same constructor / `update` /
`batch` / `reset` / `is_ready` / `warmup_period` surface as `VWAP`,
plus a `period` property and a typed `__repr__`. The `__init__.py`
re-exports it and `__all__` lists it; the `.pyi` stub matches.
- Node: `RollingVWAP(period)` — napi class with the same lifecycle,
exported from `index.js` and declared in `index.d.ts`.
- WASM: `RollingVWAP(period)` — wasm-bindgen class with the same
`Float64Array` I/O as `VWAP`.
Tests added:
- Python: `test_rolling_vwap_streaming_matches_batch` — exercises
`update == batch` plus the full lifecycle on the shared OHLC fixture.
- Node: `RollingVWAP` row in the `candleScalar` parity table — covered
by the generic streaming-vs-batch + lifecycle harness.
- WASM: dedicated `wasm-bindgen-test` mirrors the Python test.
The wiki page `Indicator-Vwap.md` drops the "Rust-only" caveat and
gains Python / Node / WASM examples.
The original taxonomy was four classical families plus a statistics group,
with the F1-F12 expansion slotted in as sub-categories. This regroups the
whole 71-indicator catalogue into eight top-level families, each with at
least five members:
Moving Averages (12), Momentum Oscillators (13), Trend & Directional (9),
Price Oscillators (5), Volatility & Bands (12), Trailing Stops (5),
Volume (9), Price Statistics (7).
- Wiki: docs/wiki/indicators/ reorganised into eight family folders; all 71
indicator pages moved with `git mv`. Every internal cross-link is
normalised to `../<family>/Indicator-X.md`, each page's `Family` field is
set to its new family, and two pre-existing `../Indicator-Chaining.md`
links (should have been `../../`) are corrected. A link check confirms
every relative wiki link resolves.
- Indicators-Overview.md fully rewritten around the eight families;
Home.md indicator reference and the README family table follow suit.
- Warmup-Periods.md gains the eight F13 indicators; CHANGELOG records the
46-indicator expansion (25 -> 71) and the eight-family taxonomy.
- Tests: Node indicators.test.js and Python test_new_indicators.py cover
all eight new indicators (Node 91/91, Python 117/117 green).
cargo fmt + clippy (core/wickra/data/wasm/node) clean; 508 core tests,
25 data tests and 74 doctests green.
Finalises the F1-F12 indicator expansion (25 -> 63 indicators).
- Python `wickra/__init__.py`: import and re-export all 63 indicators,
grouped by family, with a matching `__all__`. The package previously
exposed only the original 25 even though the compiled module and the
`.pyi` stubs already carried the rest.
- Docs: `Home.md` and `README.md` indicator counts and family tables
updated to 63; `Indicators-Overview.md` already restructured per family
in F10-F12; `Warmup-Periods.md` gains all 38 new indicators across the
single- and multi-output tables (and the stale two-arg `Psar::new`
example is corrected to three args); `CHANGELOG.md` `[Unreleased]` lists
every new indicator by family.
- Tests: `bindings/node/__tests__/indicators.test.js` covers all 63
indicators (streaming==batch plus four new reference-value checks),
80/80 green; new `bindings/python/tests/test_new_indicators.py` covers
the 38 additions (streaming==batch, shapes, reference values,
lifecycle), Python suite 105/105 green.
- `bindings/node/index.js` regenerated by `napi build`.
cargo fmt + clippy (core/wickra/data/wasm/node) clean; 454 core tests,
25 data tests, 66 doctests, 80 Node tests and 105 Python tests green;
`cargo check -p wickra-wasm --tests` green.
Every Python batch() did prices.as_slice().expect("contiguous"), so a
non-contiguous NumPy input (e.g. a strided view) aborted with a Rust
panic instead of a catchable exception. as_slice() failures now map to a
PyValueError pointing at np.ascontiguousarray; the scalar / MACD /
Bollinger batch methods that returned a bare array were lifted to
PyResult so the error can propagate. Adds input-validation tests
(non-contiguous arrays, unequal-length candle batches, ROC/TRIX
defaults). All 60 Python tests pass against the freshly built wheel.
A multi-language technical analysis library: 25 indicators across trend,
momentum, volatility, and volume families, every one a state machine with
O(1) per-tick updates. Batch evaluation is provided by a blanket extension
trait over the streaming primitive, so live trading bots and historical
backtests run the same code path.
What ships in this initial drop:
crates/wickra-core - 25 indicators, Indicator/BatchExt/Chain traits,
OHLCV types with validation; 171 unit tests,
property tests, Wilder/Bollinger textbook tests.
crates/wickra - top-level facade + criterion benches for every
indicator at 1K/10K/100K series sizes.
crates/wickra-data - streaming CSV reader, tick-to-candle aggregator,
multi-timeframe resampler, Binance Spot kline
WebSocket adapter behind feature live-binance;
11 unit + 1 doctest.
bindings/python - PyO3 + maturin, NumPy I/O, type stubs (.pyi),
56 pytest tests including streaming==batch
equivalence, Wilder reference values, lifecycle.
bindings/node - napi-rs native module, TypeScript .d.ts
auto-generated, 7 node --test cases.
bindings/wasm - wasm-bindgen ES module for browser/bundler/Node;
interactive HTML demo at examples/index.html.
examples/ - Python and Rust scripts: backtest, live trading,
parallel multi-asset, multi-timeframe, Binance.
benchmarks/ - cross-library comparison against TA-Lib,
pandas-ta, finta, talipp; Wickra wins every
category by 11-1030x (batch) and 17x+ streaming.
.github/workflows/ - CI matrix (Rust + Python + Node + WASM on
Linux/macOS/Windows), release pipeline for
PyPI wheels and npm.
Indicators (25):
Trend SMA EMA WMA DEMA TEMA HMA KAMA
Momentum RSI MACD Stochastic CCI ROC WilliamsR ADX MFI TRIX
AwesomeOscillator Aroon
Volatility BollingerBands ATR Keltner Donchian PSAR
Volume OBV VWAP (cumulative + rolling)
cargo clippy --workspace --all-targets -D warnings is clean. License: Apache-2.0.