Skip to main content

RTTA

Purpose

The purpose of this package is to implement a very low latency incremental technical analysis toolkit. Most technical analysis tool-kits work in a "batch mode" where you hand them a blob of data and in a pandas series and they return a series with the computed data. Incremental updates for these require O(n) work. There is one tool, talipp that is designed to support incremental updates, but it is implemented in pure python and is a little more than an order of magnitude slower than rtta. On a 5995WX talipp's exponential moving average requires 465ns; rtta's requires 36ns. A bare python function call requires 35ns, so we're about as fast as fast can be.

Installation

pip install rtta

Usage

Each operator has a paramater fillna. If set to false, nan values will be returned until the operation is "populated". If set to true, best guesses will be returned until the operation is populated.

So for example, our simple moving average SMAIndicator works sort of like this:

>>> import rtta.trend as trend
>>> sma = trend.SMAIndicator(window=4, fillna=True)
>>> sma.update(1)
1
>>> sma.update(2)
1.5
>>> sma.update(3)
2
>>> sma.update(2)
2
>>> sma.update(2)
2.25 <- The 1 fell off the end of the sliding window

Performance

Indicator Latency
SMA 36ns
EMA 36ns
MACD 55ns

Metadata

Release files for rtta 0.1.10

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

Source distribution (sdist)

Source distribution for rtta 0.1.10
File Size Uploaded
rtta-0.1.10.tar.gz 33.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rtta 0.1.10
File Interpreter ABI Platform
rtta-0.1.10-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details

Total release size: 238.1 kB

Release files / rtta-0.1.10.tar.gz

Download URL rtta-0.1.10.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c4878942be620d882a2193b9aabbaab4d59928244c00110f4140a4561f875cdf
BLAKE2b-256 checksum
How to use checksums
a063a284d3b47d88ff5575bae2732c17bba6ca099cf18affabfd16914012cc74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Release files / rtta-0.1.10-cp313-cp313-macosx_15_0_arm64.whl

Download URL rtta-0.1.10-cp313-cp313-macosx_15_0_arm64.whl
Size 205.1 kB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
ce65992c1ab392147ac4350f84501ad18a98168c8d3d50c4b4d76160c98a9fce
BLAKE2b-256 checksum
How to use checksums
f14486d76d2274fd5c5198dc1fa15a86812353b3804585f04d850e505c09b8dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

2 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.2

2 release files

0.0.1

2 release files

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