"""Annualize sample return dispersion.

Square-root scaling assumes a suitable stable return process. It is not a forecast.
All inputs are synthetic teaching examples. Run: python 07_sample-volatility.py
"""
from tv_math import *

v=annual_vol([-.01,0,.01],252)
assert abs(v-.01*math.sqrt(252))<1e-12
print(v)
