Skip to main content

Crate ferro_ta_core

Crate ferro_ta_core 

Source
Expand description

ferro_ta_core — Pure Rust indicator library.

This crate contains all indicator implementations as pure functions operating on &[f64] slices and returning Vec<f64>. It has no dependency on PyO3 or numpy so it can be used from any Rust project, or compiled to WASM / Node.js via napi-rs without dragging in Python bindings.

The Python wheel (ferro_ta PyPI package) is built from a thin binding crate that calls into this core and converts NumPy arrays to/from Rust slices.

§Two-layer architecture

The root crate (ferro_ta) contains PyO3 #[pyfunction] wrappers that convert numpy arrays to &[f64] and delegate to this core crate.

§Usage (Rust)

use ferro_ta_core::overlap;

let close = vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0];
let sma = overlap::sma(&close, 3);
assert!(sma[0].is_nan());
assert!((sma[2] - 2.0).abs() < 1e-10);

Modules§

aggregation
Tick / Trade Aggregation Pipeline — pure Rust, no PyO3.
alerts
Alerts — condition evaluation helpers.
attribution
Performance attribution and trade analysis — pure Rust, no PyO3.
backtest
Pure Rust backtest engine — no PyO3, no numpy dependency.
batch
Pure-Rust batch operations — apply indicators across multiple series (columns) sequentially. The PyO3 wrapper can add Rayon parallelism on top.
chunked
Chunked / out-of-core execution helpers.
commission
Commission, tax, and fee model for Indian and global markets.
crypto
Crypto and 24/7 market helpers.
currency
Currency metadata and Indian number formatting.
cycle
Cycle indicators — Hilbert Transform-based cycle analysis (Ehlers).
extended
Extended indicators — pure Rust implementations (no PyO3, no numpy).
futures
Futures analytics core.
math
Math utilities.
math_ops
Rolling math operators — O(n) sliding window implementations.
momentum
Momentum indicators.
options
Options analytics core.
overlap
Overlap studies — moving averages and trend indicators.
pattern
Candlestick pattern recognition — pure Rust implementations.
portfolio
Pure Rust portfolio analytics — no PyO3, no numpy, no ndarray.
price_transform
Price transformations — synthesize OHLC arrays into single price arrays.
regime
Regime detection and structural breaks.
resampling
Resampling — OHLCV resampling and multi-timeframe helpers, pure Rust.
signals
Signal processing helpers.
statistic
Statistic functions.
streaming
Streaming / Incremental Indicators — bar-by-bar stateful structs.
volatility
Volatility indicators.
volume
Volume indicators.