Skip to content

jesse-ai/jesse-rust

Repository files navigation

Jesse Rust

The native technical-indicator engine that powers the Jesse trading framework — written in Rust, exposed to Python via PyO3.

Why

jesse_rust is, to our knowledge, the fastest technical-indicator library available for Python. Indicators are implemented in native Rust, compiled with full LTO and opt-level = 3, and called from Python with zero-copy NumPy bindings. It is consistently faster than equivalent pure-Python or pandas-based implementations and is also faster than numba-accelerated versions of the same algorithms — without the cold-start JIT cost, without a runtime LLVM dependency, and without numba's per-call overhead.

  • Native speed — everything runs as compiled machine code, no JIT warm-up.
  • Memory-safe — no unsafe blocks in the indicator code.
  • Zero-copy NumPy — input arrays are read in place via PyO3's numpy bindings.
  • Drop-in for Jesse — every Jesse indicator that needs an inner loop is routed here; you don't have to call this library directly.
  • Cross-platform — pre-built wheels for Linux, macOS, and Windows.

Installation

pip install jesse-rust

Requirements: Python 3.10+, NumPy 1.26.4+.

Usage

You normally don't import jesse_rust yourself. Strategies call indicators through Jesse's standard interface and the Rust backend is used automatically:

from jesse.strategies import Strategy
import jesse.indicators as ta

class MyStrategy(Strategy):
    def update_indicators(self):
        rsi   = ta.rsi(self.candles, period=14)
        ema   = ta.ema(self.candles, period=200)
        macd  = ta.macd(self.candles)
        bands = ta.bollinger_bands(self.candles)

Direct use from Python is supported too if you need it:

import numpy as np
import jesse_rust as jr

source = np.asarray(prices, dtype=np.float64)
ema_50 = jr.ema(np.ascontiguousarray(source), 50)

Supported indicators

99 functions across 9 categories.

Moving averages and smoothers (29)

cwma, dema, ema, epma, frama, hma, hwma, jma, kama, maaq, mcginley_dynamic, mwdx, nma, rma, sma, smma, sqwma, srwma, t3, tema, trix, vidya, vlma_inner, vpwma, vwap, vwma, wilders, wma, zlema

Oscillators / momentum (20)

aroonosc, cci, cfo, cg, cmo, dpo, dti, fisher, fosc, lrsi, macd, mass, pfe, rsi, rsx, srsi, stoch, stochf, willr, wt

Trend / directional (11)

adx, adxr, alligator, di, dm, dx, ichimoku_cloud, safezonestop, sar, supertrend, vi

Volume (7)

adosc, cvi, efi, emv, nvi, pvi, wad

Bands / channels / volatility (7)

atr, bollinger_bands, bollinger_bands_width, chande, chop, donchian, keltner_inner

Ehlers filters (14)

bandpass, correlation_cycle, edcf, gauss, high_pass, high_pass_2_pole, itrend, mama, pma, reflex, supersmoother, supersmoother_3_pole, trendflex, voss

Candle transforms (3)

emd, heikin_ashi_candles, qstick

Statistical (3)

damiani_volatmeter, hurst_rs, linearreg

Utilities (5)

find_order_index, moving_std, shift, subtract_floats, sum_floats

Building from source

You only need this section if you're contributing.

Prerequisites

Build

git clone https://github.com/jesse-ai/jesse-rust.git
cd jesse-rust

pip install maturin

# Develop build (installs into your current Python env)
maturin develop --release

# Wheel build (outputs to ./target/wheels)
maturin build --release

Contributing

This package is part of the Jesse trading framework. Please refer to the main Jesse repository for contribution guidelines.

License

MIT — see the LICENSE file.

Support

Acknowledgments

Built with:

  • PyO3 — Rust bindings for Python
  • Maturin — Build and publish Rust-based Python extensions
  • NumPy — Numerical computing in Python

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors