Skip to content

util::fast_ewma

Market Microstructure, Dependence and Regime Detection

Provides performant smoothing for repeated rolling computations.

mt=αxt+(1α)mt1m_t=\alpha x_t + (1-\alpha)m_{t-1}

α=2w+1\alpha=\frac{2}{w+1}

use openquant::util::fast_ewma::ewma;
let x = vec![1.0, 2.0, 3.0, 4.0];
let y = ewma(&x, 3);
  • ewma
  • Window length controls responsiveness vs smoothness.
  • Prefer this helper over ad-hoc loops for consistency.