rust_ti/
lib.rs

1//! # RustTI
2//!
3//! **RustTI** is an comprehensive, highly configurable Technical Indicators library for Rust.
4//! It empowers you to design, compute, and experiment with a wide variety of
5//! technical indicators for financial data analysis.
6//!
7//! ## Why RustTI?
8//! - **Configurable**: Nearly every parameter (from periods to models) is customizable.
9//! - **Modern**: Suitable for stocks, crypto, and any asset with arbitrary trading calendars.
10//! - **Powerful**: Use industry standards or create your own quant-style indicators.
11//! - **Powered by Rust**: Written in pure Rust through and through
12//!
13//! ## Philosophy
14//! Prefer customizing your indicators to fit your market and strategy, just like the best quants do.
15//! RustTI gives you the flexibility to do just that.
16//!
17//! ## Library Structure
18//!
19//! - Indicators are grouped into modules by type (e.g., `momentum_indicators`, `trend_indicators`).
20//! - Each module is split into:
21//!   - **single**: Calculate the indicator for a single period or the whole slice.
22//!   - **bulk**: Compute the indicator value over a rolling window or for each element in a series.
23//!
24//! ## Quick Start
25//!
26//! ```rust
27//! use rust_ti::standard_indicators::bulk::rsi;
28//! let prices = vec![100.0, 102.0, 103.0, 102.5, 102.8, 103.1, 103.8, 103.9, 104.4, 103.6, 103.1,
29//! 102.9, 103.3, 103.7];
30//! let my_rsi = rsi(&prices);
31//! println!("Your RSI: {:?}", my_rsi);
32//! ```
33//!
34//! ## Modules
35//! - [`standard_indicators`] - Industry-standard indicators (RSI, MACD, Bollinger, etc.)
36//! - [`basic_indicators`] - Fundamental stats (mean, median, std, etc.)
37//! - [`candle_indicators`] - Candle chart tools (Ichimoku, bands, envelopes, etc.)
38//! - [`chart_trends`] - Trend and peak/valley analysis
39//! - [`correlation_indicators`] - Asset correlation metrics
40//! - [`momentum_indicators`] - Momentum and oscillator indicators
41//! - [`moving_average`] - Moving averages: simple, smoothed, exponential, McGinley, etc.
42//! - [`other_indicators`] - ROI, true range, internal bar strength, etc.
43//! - [`strength_indicators`] - Volume and vigor metrics
44//! - [`trend_indicators`] - Trend direction and strength
45//! - [`volatility_indicators`] - Volatility measures
46//!
47//! ## API Reference
48//!
49//! See each module for detailed function docs and examples.
50//!
51//! ## Types
52//! All shared enums and types are re-exported at the crate root for convenience.
53
54#![allow(unreachable_patterns)]
55
56pub mod basic_indicators;
57pub mod candle_indicators;
58pub mod chart_trends;
59pub mod correlation_indicators;
60pub mod momentum_indicators;
61pub mod moving_average;
62pub mod other_indicators;
63pub mod standard_indicators;
64pub mod strength_indicators;
65pub mod trend_indicators;
66pub mod volatility_indicators;
67
68mod types;
69pub use types::*;