Realized volatility estimators, from close-to-close to bipower.

FerroRisk computes realized volatility from OHLC bars with a named estimator, and splits realized variance into its diffusive and jump parts — the same reads the variance risk premium is built on.

Why this needs one shared risk path

!

Close-to-close vol throws away the intraday range that Parkinson, Garman-Klass, and Yang-Zhang recover.

!

A single realized number cannot tell diffusive volatility apart from jump contribution.

!

Annualization and bar-count conventions are where hand-rolled estimators silently disagree.

How FerroRisk handles it

01

Build typed bars

OhlcBar::new validates open/high/low/close so a malformed bar fails at construction, not deep in the estimator.

02

Choose the estimator

realized_vol(bars, method, periods_per_year) dispatches close-to-close, Parkinson, Garman-Klass, Yang-Zhang, or bipower variation and returns a typed RealizedVolRead.

03

Split diffusive vs jump

realized_jump_split returns an RvJumpSplit with total, diffusive, and jump variance plus the jump share — the jump-robust bipower leg against total realized variance.

What makes this FerroRisk-shaped

realized_vol, realized_vol_from_closes, and realized_jump_split are public crate-root exports.

Each estimator carries the correct sample-count convention on the RealizedVolRead.

The realized-vol hot paths are benchmarked, and degenerate inputs fail loud with typed errors.

Common concerns

Which estimators are available?

Close-to-close, Parkinson (1980), Garman-Klass (1980) practical form, Yang-Zhang (2000), and jump-robust bipower variation, selected by the RvMethod enum.

Can I compute realized vol from a bare close series?

Yes, via realized_vol_from_closes, which is the close-to-close estimator over a plain slice of closes. The range-based estimators need full OHLC bars.