Rust
ferro_ta_core is the compute engine. Use it directly from any Rust project
— no PyO3, NumPy, or JavaScript runtime.
Installation
[dependencies]
ferro_ta_core = "1.2.0"
Or:
cargo add ferro_ta_core
Docs.rs: https://docs.rs/ferro_ta_core
Basic Usage
Functions take borrowed &[f64] slices and return owned Vec<f64> (or
tuples of vectors). Leading warmup bars are NaN.
use ferro_ta_core::{momentum, overlap};
fn main() {
let close: Vec<f64> = (0..40).map(|i| 44.0 + i as f64 * 0.1).collect();
let sma = overlap::sma(&close, 5);
let rsi = momentum::rsi(&close, 14);
let (macd, signal, hist) = overlap::macd(&close, 12, 26, 9);
let (upper, middle, lower) = overlap::bbands(&close, 5, 2.0, 2.0);
assert!(sma[0].is_nan());
assert!(rsi[13].is_nan());
}
API map
Module layout matches the crate README. Names are snake_case.
Module |
Count |
Highlights |
|---|---|---|
|
20 |
|
|
26 |
|
|
3 |
|
|
4 |
|
|
61 |
|
|
9 |
|
|
24+ |
rolling |
|
4 |
|
|
7 |
Hilbert |
|
10 |
VWAP, Supertrend, Ichimoku, Donchian, … |
|
9 |
Stateful |
|
8 |
Multi-column |
Other modules (backtest, options, futures, portfolio, …) are
available from the same crate. See
crates/ferro_ta_core/README.md
and Cross-language coverage.