1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//! Technical Indicators for Financial Analysis
//!
//! This module provides a comprehensive collection of technical indicators
//! used in financial market analysis. The indicators are organized into
//! basic and advanced categories based on their complexity and functionality.
//!
//! # Module Organization
//!
//! ## Basic Technical Indicators
//! [`basic`] - Fundamental indicators commonly used in technical analysis:
//! - Moving averages (SMA, EMA)
//! - Momentum oscillators (RSI, MACD)
//! - Volatility indicators (ATR, Bollinger Bands)
//! - Volume indicators (OBV)
//! - Price-based oscillators (Stochastic, Williams %R, CCI)
//!
//! ## Advanced Technical Indicators
//! [`advanced`] - Sophisticated indicators for complex analysis:
//! - Multi-dimensional trend analysis (Ichimoku Cloud)
//! - Adaptive indicators (KAMA)
//! - Advanced volume-price analysis (VWAP, Chaikin Oscillator, MFI)
//! - Trend strength indicators (ADX, Parabolic SAR)
//! - Market structure analysis (Aroon, Fibonacci levels)
//! - Enhanced oscillators with configuration options
//!
//! # Usage Guidelines
//!
//! ## Choosing the Right Indicator
//!
//! - **Trend Analysis**: Use SMA/EMA (basic) or Ichimoku/ADX (advanced)
//! - **Momentum**: Use RSI/MACD (basic) or enhanced Stochastic (advanced)
//! - **Volatility**: Use ATR (basic) or enhanced Bollinger Bands (advanced)
//! - **Volume Analysis**: Use OBV (basic) or VWAP/MFI (advanced)
//! - **Support/Resistance**: Use basic Bollinger Bands or Fibonacci levels
//!
//! ## Performance Considerations
//!
//! Basic indicators are optimized for speed and simplicity, while advanced
//! indicators provide more features but with increased computational cost.
//!
//! # Examples
//!
//! ## Using Basic Indicators
//! ```rust
//! use scirs2_series::financial::technical_indicators::basic::{sma, rsi, bollinger_bands};
//! use scirs2_core::ndarray::array;
//!
//! let prices = array![10.0, 11.0, 12.0, 11.5, 13.0, 14.0, 13.5, 15.0];
//!
//! // Simple moving average
//! let sma_values = sma(&prices, 3).expect("should succeed");
//!
//! // RSI momentum oscillator
//! let rsi_values = rsi(&prices, 6).expect("should succeed");
//!
//! // Basic Bollinger Bands
//! let (upper, middle, lower) = bollinger_bands(&prices, 5, 2.0).expect("should succeed");
//! ```
//!
//! ## Using Advanced Indicators
//! ```rust
//! use scirs2_series::financial::technical_indicators::advanced::{
//! BollingerBandsConfig, MovingAverageType, bollinger_bands, kama
//! };
//! use scirs2_core::ndarray::array;
//!
//! let prices = array![20.0, 21.0, 19.5, 22.0, 21.5, 20.0, 19.0, 23.0, 22.5, 21.0];
//!
//! // Enhanced Bollinger Bands with configuration
//! let config = BollingerBandsConfig {
//! period: 5,
//! std_dev_multiplier: 2.0,
//! ma_type: MovingAverageType::Exponential,
//! };
//! let bands = bollinger_bands(&prices, &config).expect("should succeed");
//!
//! // Adaptive moving average
//! let kama_values = kama(&prices, 5, 2, 30).expect("should succeed");
//! ```
//!
//! ## Combining Multiple Indicators
//! ```rust
//! use scirs2_series::financial::technical_indicators::{basic, advanced};
//! use scirs2_core::ndarray::array;
//!
//! let prices = array![10.0, 12.0, 11.0, 13.0, 15.0, 14.0, 16.0, 18.0];
//!
//! // Trend analysis with multiple indicators
//! let sma_trend = basic::sma(&prices, 3).expect("should succeed");
//! let kama_adaptive = advanced::kama(&prices, 5, 2, 30).expect("should succeed");
//!
//! // Momentum confirmation
//! let rsi_momentum = basic::rsi(&prices, 6).expect("should succeed");
//! ```
// Re-export commonly used types and functions for convenience
pub use ;
pub use ;