returns are not compounded during voloatility calculations

This commit is contained in:
Gourav Kumar 2022-05-01 13:03:00 +05:30
parent 3189e50bd8
commit 41562f7e70

View File

@ -449,7 +449,7 @@ class TimeSeries(TimeSeriesCore):
prior_match: str = "closest",
closest: Literal["previous", "next", "exact"] = "previous",
if_not_found: Literal["fail", "nan"] = "fail",
annual_compounded_returns: bool = None,
annual_compounded_returns: bool = False,
date_format: str = None,
) -> float:
"""Calculates the volatility of the time series.add()
@ -504,9 +504,6 @@ class TimeSeries(TimeSeriesCore):
if to_date is None:
to_date = self.end_date
if annual_compounded_returns is None:
annual_compounded_returns = False if frequency.days <= 366 else True
rolling_returns = self.calculate_rolling_returns(
from_date=from_date,
to_date=to_date,