Rs
Module 9Returns & VolatilityLesson 2 of 824 min

Realized Volatility

Sample std of returns and annualization conventions.

Realized vol

sigma_ann = std(returns) * sqrt(252)

Sample vs population

Sample uses n-1 — default for historical estimation.

Conventions

Equities often 252; some markets use 260/365. Be consistent.

Worked path

prices → log returns → sample std → annualize

Challenge

Compute rolling 3-period realized vol series.

Tips
  • 252 equity convention
  • n-1 sample
  • Clean prices first in prod

Try it live

Realized VolatilityRust 2021
Loading editor…
Output
Press Run to compile and execute.