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
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.
Causal and deployable#
Every function is causal: its output depends only on current and past inputs, which eliminates look-ahead bias. Code that runs on stored data can be deployed to production against a live feed without changes, because the same C++ implementation handles both.
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.