kand 0.0.9

Kand: A Pure Rust technical analysis library inspired by TA-Lib.
Documentation

Kand - Technical Analysis in Rust

Crates.io Docs.rs image image Actions status License

A high-performance Rust library for technical analysis of financial market data.

Features

  • Zero-cost abstractions and SIMD optimizations
  • Thread-safe and memory-safe by design
  • Comprehensive test coverage and documentation
  • Clean, ergonomic API with robust error handling

OHLCV Based Functions

  • AD - Chaikin A/D Line
  • ADOSC - Chaikin A/D Oscillator
  • ADR - Average Daily Range [Untested]
  • ADX - Average Directional Movement Index
  • ADXR - Average Directional Movement Index Rating
  • APO - Absolute Price Oscillator
  • AROON - Aroon
  • AROONOSC - Aroon Oscillator
  • ATR - Average True Range
  • BBANDS - Bollinger Bands
  • BOP - Balance Of Power
  • CCI - Commodity Channel Index
  • CDL_DOJI - Doji
  • CDL_DRAGONFLY_DOJI - Dragonfly Doji
  • CDL_GRAVESTONE_DOJI - Gravestone Doji
  • CDL_HAMMER - Hammer
  • CDL_INVERTED_HAMMER - Inverted Hammer
  • CDL_LONG_LOWER_SHADOW - Long Lower Shadow
  • CDL_LONG_UPPER_SHADOW - Long Upper Shadow
  • CDL_MARUBOZU - Marubozu
  • CMO - Chande Momentum Oscillator
  • DEMA - Double Exponential Moving Average
  • DX - Directional Movement Index
  • EMA - Exponential Moving Average
  • ECL - Expanded Camarilla Levels [Untested]
  • HA - Heikin Ashi Chart
  • HT_DCPERIOD - Hilbert Transform - Dominant Cycle Period
  • HT_DCPHASE - Hilbert Transform - Dominant Cycle Phase
  • HT_PHASOR - Hilbert Transform - Phasor Components
  • HT_SINE - Hilbert Transform - SineWave
  • HT_TRENDLINE - Hilbert Transform - Instantaneous Trendline
  • HT_TRENDMODE - Hilbert Transform - Trend vs Cycle Mode
  • KAMA - Kaufman Adaptive Moving Average
  • LINEARREG - Linear Regression
  • LINEARREG_ANGLE - Linear Regression Angle
  • LINEARREG_INTERCEPT - Linear Regression Intercept
  • LINEARREG_SLOPE - Linear Regression Slope
  • MACD - Moving Average Convergence/Divergence [Unstable]
  • MACDEXT - MACD with controllable MA type
  • MAMA - MESA Adaptive Moving Average
  • MEDPRICE - Median Price
  • MFI - Money Flow Index [No Incremental]
  • MIDPOINT - MidPoint over period
  • MIDPRICE - Midpoint Price over period
  • MINUS_DI - Minus Directional Indicator
  • MINUS_DM - Minus Directional Movement
  • MOM - Momentum
  • NATR - Normalized Average True Range
  • OBV - On Balance Volume
  • PLUS_DI - Plus Directional Indicator
  • PLUS_DM - Plus Directional Movement
  • PPO - Percentage Price Oscillator
  • RENKO - Renko Chart
  • RMA - Rolling Moving Average [Untested]
  • ROC - Rate of change : ((price/prevPrice)-1)*100
  • ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice
  • ROCR - Rate of change ratio: (price/prevPrice)
  • ROCR100 - Rate of change ratio 100 scale: (price/prevPrice)*100
  • RSI - Relative Strength Index
  • SAR - Parabolic SAR
  • SAREXT - Parabolic SAR - Extended
  • SMA - Simple Moving Average
  • STOCH - Stochastic [No Incremental]
  • STOCHF - Stochastic Fast
  • STOCHRSI - Stochastic Relative Strength Index
  • SUPERTREND - Super Trend Indicator
  • T3 - Triple Exponential Moving Average (T3)
  • TEMA - Triple Exponential Moving Average
  • TPO - Time Price Opportunity
  • TRANGE - True Range
  • TRIMA - Triangular Moving Average
  • TRIX - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA
  • TSF - Time Series Forecast
  • TYPPRICE - Typical Price
  • ULTOSC - Ultimate Oscillator
  • VEGAS - VEGAS Channel and Trend Boundary EMAs [Untested]
  • VWAP - Volume Weighted Average Price
  • WCLPRICE - Weighted Close Price
  • WILLR - Williams' %R
  • WMA - Weighted Moving Average

Statistical Analysis Functions

  • ALPHA - Alpha: Measures excess returns over market
  • BETA - Beta: Measures sensitivity to market volatility
  • CALMAR - Calmar Ratio: Annual return to maximum drawdown ratio
  • CORREL - Pearson's Correlation Coefficient
  • DRAWDOWN - Maximum Drawdown: Maximum potential loss
  • KELLY - Kelly Criterion: Optimal position sizing
  • MAX - Highest value over a specified period
  • MIN - Lowest value over a specified period
  • SHARPE - Sharpe Ratio: Risk-adjusted return measure
  • SORTINO - Sortino Ratio: Downside risk-adjusted returns
  • STDDEV - Standard Deviation
  • SUM - Summation
  • VAR - Variance
  • WINRATE - Win Rate: Strategy success probability

License

This project is licensed under either of the following licenses, at your option:

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in kand by you, as defined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.