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//! - [`distributions`] - Probability distributions (Normal, Cauchy, Student-t, Laplace, Log-normal)
41//! - [`momentum_indicators`] - Momentum and oscillator indicators
42//! - [`moving_average`] - Moving averages: simple, smoothed, exponential, McGinley, etc.
43//! - [`other_indicators`] - ROI, true range, internal bar strength, etc.
44//! - [`strength_indicators`] - Volume and vigor metrics
45//! - [`trend_indicators`] - Trend direction and strength
46//! - [`volatility_indicators`] - Volatility measures
47//!
48//! ## API Reference
49//!
50//! See each module for detailed function docs and examples.
51//!
52//! ## Types
53//! All shared enums and types are re-exported at the crate root for convenience.
54//!
55//! ## More docs
56//!
57//! This repository is part of a structured documentation suite:
58//!
59//! - **Tutorials:** [See here](https://github.com/ChironMind/RustTI-tutorials)
60//! - **How-To Guides:** [See here](https://github.com/ChironMind/RustTI-how-to-guides)
61//! - **Benchmarks:** [See here](github.com/ChironMind/RustTI-benchmarks)
62//! - **Explanations:** Coming soon
63//! - **Reference:** You're here!
64//!
65//! ---
66
67#![allow(unreachable_patterns)]
68
69pub mod basic_indicators;
70pub mod candle_indicators;
71pub mod chart_trends;
72pub mod correlation_indicators;
73pub mod distributions;
74pub mod momentum_indicators;
75pub mod moving_average;
76pub mod other_indicators;
77pub mod standard_indicators;
78pub mod strength_indicators;
79pub mod trend_indicators;
80pub mod volatility_indicators;
81
82mod types;
83pub use types::*;