util::volatility
Subject
Section titled “Subject”Market Microstructure, Dependence and Regime Detection
Why This Module Exists
Section titled “Why This Module Exists”Volatility is a foundational scaling target for barriers, sizing, and risk controls.
Mathematical Foundations
Section titled “Mathematical Foundations”Parkinson
Section titled “Parkinson”
Yang-Zhang
Section titled “Yang-Zhang”
Usage Examples
Section titled “Usage Examples”Compute daily and range-based volatility
Section titled “Compute daily and range-based volatility”use openquant::util::volatility::{get_daily_vol, get_parksinson_vol};
let dv = get_daily_vol(&close, 100);let pv = get_parksinson_vol(&high, &low, 20);API Reference
Section titled “API Reference”Rust API
Section titled “Rust API”get_daily_volget_parksinson_volget_garman_class_volget_yang_zhang_vol
Implementation Notes
Section titled “Implementation Notes”- Choose estimator based on available fields and microstructure noise.
- Daily-vol lookback should be matched to event horizon.