Skip to content

util::volatility

Market Microstructure, Dependence and Regime Detection

Volatility is a foundational scaling target for barriers, sizing, and risk controls.

σP2=14ln21n(ln(Ht/Lt))2\sigma_P^2=\frac{1}{4\ln 2}\frac{1}{n}\sum (\ln(H_t/L_t))^2

σYZ2=σo2+kσc2+(1k)σrs2\sigma_{YZ}^2=\sigma_o^2+k\sigma_c^2+(1-k)\sigma_{rs}^2

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);
  • get_daily_vol
  • get_parksinson_vol
  • get_garman_class_vol
  • get_yang_zhang_vol
  • Choose estimator based on available fields and microstructure noise.
  • Daily-vol lookback should be matched to event horizon.