financial_indicators 1.0.0

A Rust library providing a comprehensive suite of financial technical indicators for cryptocurrency and stock analysis. Includes trend, momentum, volatility, volume, and other common indicators such as: - MA (Moving Average) - EMA (Exponential Moving Average) - MACD (Moving Average Convergence Divergence) - DMI/ADX (Directional Movement Index / Average Directional Index) - TRIX (Triple Exponential Average) - RSI (Relative Strength Index) - ROC (Rate of Change) - CCI (Commodity Channel Index) - Stochastic Oscillator (KDJ) - MOM (Momentum) - ATR (Average True Range) - Bollinger Bands - STD (Standard Deviation) - OBV (On-Balance Volume) - VOL (Volume) - MFI (Money Flow Index) - VWAP (Volume Weighted Average Price) - SAR (Parabolic SAR) - PSY (Psychological Line) - Williams %R - CR (Cumulative Resistance)
Documentation
# Standard Deviation (STD) Indicator

## Overview

Standard Deviation (STD) is a statistical measure of volatility. In financial analysis, it is used to quantify the amount of variation or dispersion of a set of prices. A higher standard deviation indicates higher volatility, while a lower standard deviation indicates lower volatility.

## Calculation

The n-period standard deviation of a price series is calculated as follows:

\[
STD*t = \sqrt{\frac{1}{n} \sum*{i=0}^{n-1} (P\_{t-i} - SMA_t)^2}
\]

Where:

- \( STD_t \) is the standard deviation at time \( t \)
- \( P\_{t-i} \) is the price at time \( t-i \)
- \( SMA_t \) is the n-period simple moving average at time \( t \)
- \( n \) is the lookback period

## Usage

- **Volatility Measurement:** Higher STD values indicate higher volatility, lower values indicate lower volatility.
- **Risk Assessment:** STD is used to assess the risk of a security or portfolio.
- **Other Indicators:** STD is a component of other indicators, such as Bollinger Bands.

## Example

If the closing prices for 20 days are given, calculate the 20-period STD as described above. The first STD value is calculated after 20 periods.

## References

- [Investopedia: Standard Deviation]https://www.investopedia.com/terms/s/standarddeviation.asp
- [Wikipedia: Standard Deviation]https://en.wikipedia.org/wiki/Standard_deviation