Skip to main content

Crate polars_ta

Crate polars_ta 

Source
Expand description

§polars-ta

Native Polars Series interface for technical analysis indicators. Numerically identical to ta-lib’s C implementation.

§Quick Start

use polars::prelude::*;
use polars_ta::trend::sma_series;

let close = Series::new("close".into(), &[1.0f64, 2.0, 3.0, 4.0, 5.0]);
let result = sma_series(&close, 3).unwrap();
// result: Series of length 3 = [2.0, 3.0, 4.0]

§Output Convention

Output Series are shorter than input Series by lookback elements, matching ta-lib’s C API. The caller is responsible for index alignment.

§Modules

Modules§

math_ops
Math operator indicators: arithmetic operations and rolling window statistics (wraps polars_ta_core::math_ops).
math_transform
Element-wise mathematical transformations (wraps polars_ta_core::math_transform). All functions have lookback = 0, so output length equals input length.
oscillator
Oscillator indicators: Polars Series wrappers.
price_transform
Price transform indicators (wraps polars_ta_core::price_transform). All functions have lookback = 0, so output length equals input length.
trend
Trend indicators: Polars Series wrappers.
volatility
Volatility indicators: Polars Series wrappers.
volume
Volume indicators: Polars Series wrappers.