screamer.js is the JavaScript build of screamer, a
library of causal time-series functions for finance and signal processing. It compiles the same
C++ core that backs the Python screamer package to WebAssembly, so it runs in Node.js and the
browser with no native addon and no separate .wasm file to fetch.
The package holds about 250 functions, each the same C++ kernel the Python package calls. Results match Python to 1e-9; see Parity with Python.
resample.positionTest, strategyTest, and the randomizers they use.npm i @screamer-labs/screamer
import { ready, RollingMean } from "@screamer-labs/screamer";
await ready(); // load the WASM module once, before constructing any op
const sma = RollingMean(3);
sma(1); // NaN, window not yet full
sma(2); // NaN
sma(3); // 2
sma(4); // 3
sma.dispose(); // free the op's WASM-side state when done
RollingMean(3) returns a stateful, callable op. Call it with one number at a time (as above),
or hand it a whole array in one call:
RollingMean(3)(new Float64Array([1, 2, 3, 4])); // Float64Array [NaN, NaN, 2, 3]
Start with Getting started for the async load step and your first
Pipeline, or watch the operators run on a live trade feed in the
Live demo.
The documentation of every function ships with the package, in JavaScript names, for people and coding agents:
npx screamer-docs search "order flow imbalance"
npx screamer-docs show RollingRSI
See Built-in documentation for the commands and the
@screamer-labs/screamer/docs module.