RTTA

Incremental, causal technical analysis documentation

pyrtta is a low-latency C++23/nanobind library for tick-by-tick technical analysis, online change detection, market regime monitoring, and research signals. The Python import package is rtta.

The design goal is to make accidental crystal-balling hard. Algorithms are stateful, causal objects: callers feed one tick at a time through update(...) or advance(...), and the object can only react to data it has already seen. That surface is meant to fit live systems, interactive research modes, and market simulators where orders must be decided before the next observation is available.

Scope

The current benchmark registry covers 188 algorithms:

Installation

pip install pyrtta

Usage

import rtta

rsi = rtta.RSI()

for close in close_stream:
    value = rsi.update(close)
    if value > 70.0:
        reduce_position()

Use advance(...) when the caller only needs to update state and does not need a Python result object for that tick:

ema = rtta.EMA(window=30.0)

for close in warmup_ticks:
    ema.advance(close)

current = ema.update(next_close)

Most indicators expose:

Multi-output indicators return immutable C++ result structs with read-only fields. Scalar convenience methods such as update_upper(...) and last_upper() are available where an indicator has named fields.

Benchmarks

Latency results are maintained on the standalone benchmark page. The benchmark page records CPU and runtime metadata for current Intel, Apple Silicon, and Loongson runs.

Development

This project is built as a C++23 nanobind extension with CMake through scikit-build-core.

poetry install --with build,dev,docs --no-root
poetry run python -m pip install --no-build-isolation -e .
poetry run pytest

Build the static HTML documentation with:

poetry run python tools/build_html_docs.py

To build a wheel:

poetry run python -m build --wheel

Citation

If you use RTTA in research, benchmarks, or published work, cite it with:

@misc{deprince2026pyrtta,
  author       = {DePrince, Adam},
  title        = {{pyrtta}: Low Latency Incremental Technical Analysis},
  year         = {2026},
  version      = {0.2.2},
  howpublished = {\url{https://github.com/adamdeprince/rtta}},
  note         = {Python package name: pyrtta; import package name: rtta}
}

The same entry is available in CITATION.bib.