ursatoro/volatility

Types

pub type BollingerBandsResult {
  BollingerBandsResult(upper: Float, middle: Float, lower: Float)
}

Constructors

  • BollingerBandsResult(upper: Float, middle: Float, lower: Float)
pub type HarResult {
  HarResult(
    predicted_vol: Float,
    daily_vol: Float,
    weekly_vol: Float,
    monthly_vol: Float,
  )
}

Constructors

  • HarResult(
      predicted_vol: Float,
      daily_vol: Float,
      weekly_vol: Float,
      monthly_vol: Float,
    )

Values

pub fn atr(
  candles: List(candle.Candle),
  period: Int,
) -> Result(List(Float), util.IndicatorError)
pub fn bollinger_bands(
  candles: List(candle.Candle),
  period: Int,
  num_std: Float,
) -> Result(List(BollingerBandsResult), util.IndicatorError)
pub fn har_volatility(
  candles: List(candle.Candle),
  daily daily: Int,
  weekly weekly: Int,
  monthly monthly: Int,
) -> Result(List(HarResult), util.IndicatorError)
Search Document