Screamer#
Screamer computes rolling statistics, technical indicators, and signal filters on time series. The same functions run on NumPy arrays and on live streams.
pip install screamer
Requires Python 3.11 or newer. See Installation for prerequisites and development setup.
A short example#
The example below fits a line to each sliding window of 50 values and returns its slope, then takes the sign of the slope to give the trend direction (up or down).
from screamer import RollingPoly2, Sign
slope = RollingPoly2(window_size=50, derivative_order=1)
sign = Sign()
result = sign(slope(data))
The plot shows the input data (top, blue), the slope over the previous 50 samples (middle, orange), and the sign of the slope (bottom, red).
Speed#
screamer runs batch operations as fast as or faster than NumPy and pandas, and many times faster for rolling-window statistics, because each function updates in constant time per sample. See the Performance page for the full breakdown.
Causality#
Every function is causal: its output depends only on current and past inputs, so there is no look-ahead bias. Moving from a stored dataset to a live feed requires no change to the operator logic, since the same C++ engine handles both; only the surrounding code changes, reading from a live source instead of an array.
For a step-by-step walkthrough see the User Guide.
Central tendency, dispersion, quantiles, moments, and correlation.
Moving averages and designed filters.
Trend, momentum, bands, volume, and returns.
Trade signing, imbalance, price impact, and arrivals.
Costed equity curves, drawdown, and performance.
Elementwise numeric, trigonometric, activation, and boolean operations.
Fill or drop missing values, and despike outliers.
Align and reshape event streams, and build a runnable pipeline.
Runnable notebooks grouped by task.