TulipRS
High-performance technical analysis in Rust.
TulipRS implements 100+ technical indicators and 77+ candlestick patterns with first-class SIMD acceleration. Process multiple assets or multiple parameter sets in a single CPU pass, stream live bars into stateful indicators without reprocessing history, and call everything from Rust or Python with the same universal API.
๐ Full documentation
Why TulipRS?
| TulipRS | Tulip C / TA-Lib | |
|---|---|---|
| SIMD โ multiple assets | โ N assets in one pass | โ one asset at a time |
| SIMD โ multiple options | โ N parameter sets in one pass | โ one parameter set at a time |
| Stateful streaming | โ
resume from IndicatorState |
โ full recompute each tick |
| Optional outputs | โ free in the same pass | โ separate call + full scan |
| Language bindings | Rust + Python (more planned) | C, various wrappers |
When optional intermediate outputs are needed (sub-EMAs, TR, AD line, etc.) TulipRS is 1.3ร โ 8.7ร faster than running the equivalent TA-Lib calls.
Installation
Rust
Add TulipRS to your Cargo.toml:
[]
= "0.1.6"
To get the very latest unreleased changes, use the Git source directly:
[]
= { = "https://github.com/me60732/tulip_rs" }
Nightly required. TulipRS uses
portable_simd. The correct nightly version is pinned automatically byrust-toolchain.tomlโ no manual toolchain management needed.
To disable the SIMD variants (reduces compile time):
= { = "0.1.6", = false }
Python
Build from source with native CPU optimisations:
RUSTFLAGS="-C target-cpu=native"
Quick Start
Every indicator follows the same signature โ learn it once, use it everywhere.
Rust
use indicator;
let close = vec!;
// inputs: &[&[f64]] | options: &[f64] | optional_outputs: Option<&[bool]>
let = indicator.unwrap;
println!; // EMA(5) values
// Streaming: feed new bars without reprocessing history
let new_bar = ;
let = state.batch_indicator.unwrap;
Python
=
, =
# EMA(5) values
# Streaming
, =
SIMD โ same indicator, N assets at once (Rust)
use indicator_by_assets;
// 4 assets processed simultaneously in one CPU pass
let inputs = ;
let results = .unwrap;
Benchmarks
Benchmarks compare TulipRS (Rust scalar, Rust SIMD) against the reference C implementation (Tulip Indicators) and TA-Lib across 8 real market symbols.
โ Benchmark results โ How to run the benchmarks
Indicators
| Category | Indicators |
|---|---|
| Moving Averages | SMA, EMA, WMA, DEMA, TEMA, TRIMA, HMA, ZLEMA, KAMA, VIDYA, VWMA, Wilders, SMA Envelope |
| Oscillators | RSI, MACD, Stochastic, StochRSI, Williams %R, CCI, CMO, Ultimate Oscillator, AO, Fisher Transform, FOSC, MSW, TRIX |
| Trend | ADX, ADXR, DI, DM, DX, Aroon, Aroon Osc, PSAR, PPO, APO, Vortex, Elder-Ray, Donchian Channel, Ichimoku, SuperTrend, Efficiency Ratio, MAMA |
| Volatility | BBands, ATR, NATR, TR, StdDev, Volatility, VHF, CVI, Chandelier Exit, Keltner Channel, TRVI |
| Volume | AD, ADOSC, OBV, MFI, NVI, PVI, VOSC, KVO, EMV, WAD, MarketFi, ChaikinMF, VWAP |
| Price & Statistical | AvgPrice, MedPrice, TypPrice, WCPrice, Max, Min, MOM, ROC, ROCR, BOP, LinReg, TSF, DPO, Mass, MD, QStick, PivotPoint |
| Cycle & Ehlers | CyberCycle, Adaptive MSW, Homodyne Discriminator, Instantaneous Trendline, TrendMode, High Pass Filter, Hilbert Transform, Roofing Filter, Super Smoother, CC Fisher |
| Candlestick | 77+ patterns via tulip_rs::indicators::candlestick |
Documentation
| Page | Description |
|---|---|
| Getting Started | Installation, feature flags, calling convention, first examples |
| Indicators โ Overview | Full indicator index with inputs, options, and output counts |
| Indicator API | info(), min_data(), optional outputs, state continuation |
| SIMD | By-assets and by-options modes, lane counts, when to use each |
| State Management | Streaming computation, chunked processing, JSON serialisation |
| Candlestick Patterns | 60+ patterns with bullish/bearish forecasting |
| Language Bindings | Python (PyO3/maturin) details and planned bindings |
Language Support
| Language | Status | Package |
|---|---|---|
| Rust | โ Native | tulip_rs (this repo) |
| Python | โ Supported | tulip_rs_python ยท pip install tulip-rs |
| Node.js | โ Supported | tulip-rs-node ยท npm install tulip-rs-node |
| WASM | โ Supported | tulip-rs-wasm |
| R | ๐ Planned | โ |
| Julia | ๐ Planned | โ |