Skip to main content

Screamer

A fast C++ library for researching and trading time series: rolling statistics, technical indicators, filters, order-flow measures, costed backtests of single assets, portfolios, and pairs, and significance tests. One C++ core, two languages: a Python API and a JavaScript/WebAssembly build.

License Python Versions tests Docs PyPI npm

Screamer runs in Python and in JavaScript. Both bind the same C++ engine, so results agree to within floating-point rounding, and seeded randomization gives identical draws in both.

Why screamer

  • Fast. Every operator is implemented in C++ and routinely outruns equivalent NumPy and pandas code, often by a factor of two or more.
  • One API, batch or streaming. The same operator runs on a stored array or a live, event-driven stream, so code tested on historical data deploys to production unchanged.
  • Causal by construction. Output depends only on current and past inputs, never future ones, which eliminates look-ahead bias.
  • Broad coverage. 250+ operators: rolling and exponentially weighted statistics, technical indicators (MACD, RSI, Bollinger Bands, ATR, and more), OHLC volatility estimators, signal filters, market microstructure, stream operators, and composable pipelines.
  • Backtesting and validation. Costed backtests on prices, bars, trades, or quotes, with slippage, fill timing, stops, and funding; portfolios of many assets from one account; pairs and cross-sectional tools; and randomization tests, the deflated Sharpe ratio, and walk-forward evaluation to tell skill from luck.
  • Python and JavaScript. The same operators and the same pipeline model in both ecosystems, from one C++ source.

Python

Python 3.12 or newer.

pip install screamer

The wheel is self-contained (a single abi3 wheel per platform, no build step and no runtime dependencies). To build from source, see the Install screamer page.

Fit a quadratic to each sliding window of 50 values, take its slope at the latest value, then the sign of the slope to get the trend direction:

import numpy as np
from screamer import RollingPoly2, Sign

data = np.cumsum(np.random.normal(size=300))

slope = RollingPoly2(window_size=50, derivative_order=1)
sign = Sign()

trend = sign(slope(data))   # the same calls work on a live stream, one value at a time

JavaScript

Node 18 or newer, or Chrome 95, Firefox 100 or Safari 15.2 or newer. The WebAssembly module uses native WebAssembly exceptions, which older browsers lack.

npm install @screamer-labs/screamer

The package is self-contained: the WebAssembly module is embedded, so there is no separate asset to configure. The WASM loads once via await ready(), then you call operators directly:

import { ready, RollingPoly2, Sign } from "@screamer-labs/screamer";
await ready();

const data = Float64Array.from({ length: 300 }, () => Math.random());

const slope = RollingPoly2(50, 1);   // window_size, derivative_order
const sign = Sign();

const trend = sign(slope(data));     // a number, a Float64Array, an iterable, or an async stream

Operators compose into pipelines:

import { ready, Input, Pipeline, RollingMean, Diff } from "@screamer-labs/screamer";
await ready();

const x = Input("x");
const y = Diff(1)(RollingMean(3)(x));      // compose operators into a graph
const p = new Pipeline([x], [y]);
p(data);                                    // bind data at call time; p.live() streams

Documentation

  • Start here: the Guide goes from installing screamer to a costed backtest in short task pages.
  • Python: the Guide, runnable notebooks, and the full reference grouped by topic live at screamer.readthedocs.io.
  • JavaScript: see js/README.md for install and the API. JavaScript API reference and guide: screamer-labs.github.io/screamer.
  • AI agents: python -m screamer.docs search <keywords> and show <Name> describe every function of the installed version, and pip install "screamer[mcp]" adds an MCP server. See Using screamer with AI agents.

Contributing

Contributions are welcome. See CONTRIBUTING.md for how to set up a development environment, build the extension, run the tests, and open a pull request. By participating you agree to abide by our Code of Conduct.

License

Screamer is released under the MIT License. See LICENSE.

Metadata

Release files for screamer 3.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for screamer 3.9.1
File Size Uploaded Provenance Actions
screamer-3.9.1.tar.gz 10.7 MB With provenance Details for screamer-3.9.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for screamer 3.9.1
File Actions
screamer-3.9.1-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for screamer-3.9.1-cp312-abi3-win_amd64.whl
screamer-3.9.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for screamer-3.9.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
screamer-3.9.1-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for screamer-3.9.1-cp312-abi3-macosx_11_0_arm64.whl
screamer-3.9.1-cp312-abi3-macosx_10_13_x86_64.whl CPython 3.12 abi3 macOS 10.13+ x86-64 Details for screamer-3.9.1-cp312-abi3-macosx_10_13_x86_64.whl

Total release size: 18.9 MB

Release files / screamer-3.9.1.tar.gz

Download URL screamer-3.9.1.tar.gz
Size 10.7 MB
Tags Source
SHA-256 checksum
How to use checksums
a67ac2248d608a7c0301d77bf2480006df3fec37afd58787a9ad3865ed063097
BLAKE2b-256 checksum
How to use checksums
8a22a3798b31d7257951510b643a74a1e2ea6ac7249d25dc4c22fde9a5880aa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / screamer-3.9.1-cp312-abi3-win_amd64.whl

Download URL screamer-3.9.1-cp312-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
637be1c438432241648f4c639f7f144d8e10693d189731cebb1e0e4170ae7598
BLAKE2b-256 checksum
How to use checksums
118d9d4a7398819def6b33f68f01c2baaa1956fc0f5c06ae17b76718b41c7f0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / screamer-3.9.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL screamer-3.9.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.7 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
942fcae147bb3c3cde46a3173f05f614f6e2eca9d1c5f375d107922bea41e9c9
BLAKE2b-256 checksum
How to use checksums
ac25b361dc4bee7829eca505507468ce8bd2a8fb83efb20b71c2a9d388e5d418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / screamer-3.9.1-cp312-abi3-macosx_11_0_arm64.whl

Download URL screamer-3.9.1-cp312-abi3-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6ed8e0a1f15cb15c5c7e27e2bcad541b5db808114a07198aba3b0ecac23cca5a
BLAKE2b-256 checksum
How to use checksums
835da476bcd399a139bb4e3284480d35382ca0215399d405187978b7adb95998
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / screamer-3.9.1-cp312-abi3-macosx_10_13_x86_64.whl

Download URL screamer-3.9.1-cp312-abi3-macosx_10_13_x86_64.whl
Size 2.1 MB
Tags CPython 3.12 abi3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
3591ac3c5bdba4ad297d54c8e11ddf21d013c71a679b00e7c9f35100e38b63b1
BLAKE2b-256 checksum
How to use checksums
a19da658ad3ee76b33d7ac44b292420f033d04453433362decb31392d4f515d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for screamer 3.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for screamer-3.9.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.9.1 This release

5 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page