changed years to any period in return calc
This commit is contained in:
parent
0fbca4ae4c
commit
308a4f1abb
@ -203,7 +203,8 @@ class TimeSeries(TimeSeriesCore):
|
|||||||
prior_match: str = "closest",
|
prior_match: str = "closest",
|
||||||
closest: str = "previous",
|
closest: str = "previous",
|
||||||
compounding: bool = True,
|
compounding: bool = True,
|
||||||
years: int = 1,
|
interval_type: Literal['years', 'months', 'days'] = 'years',
|
||||||
|
interval_value: int = 1,
|
||||||
date_format: str = None
|
date_format: str = None
|
||||||
) -> List[tuple]:
|
) -> List[tuple]:
|
||||||
"""Calculates the rolling return"""
|
"""Calculates the rolling return"""
|
||||||
@ -228,7 +229,8 @@ class TimeSeries(TimeSeriesCore):
|
|||||||
returns = self.calculate_returns(
|
returns = self.calculate_returns(
|
||||||
as_on=i,
|
as_on=i,
|
||||||
compounding=compounding,
|
compounding=compounding,
|
||||||
years=years,
|
interval_type=interval_type,
|
||||||
|
interval_value=interval_value,
|
||||||
as_on_match=as_on_match,
|
as_on_match=as_on_match,
|
||||||
prior_match=prior_match,
|
prior_match=prior_match,
|
||||||
closest=closest,
|
closest=closest,
|
||||||
|
Loading…
Reference in New Issue
Block a user