def annualize_vol(r, periods_per_year):
    """
    :param r: DataSeries with return data
    :param periods_per_year: should be 260 for daily, 12 for monthly and 4 for quarterly data
    :return: Annualizes the vol of a set of returns
    """
    return r.std() * (periods_per_year ** 0.5)