- calculate_aggregate_returns(equity_curve, freq='BM')[source]#
Calculate strategy aggregatd results over different timespans.
Good to calculate
See Aggregate return for more information what this metric represents.
There are multiple ways to calculate aggregated returns and they give a bit different results. See this article for details: https://quantdare.com/calculate-monthly-returns-with-pandas/
The current simplicist method does not calculate returns for the first and last period.
equity_curve (Series) –
The equity curve of the portfolio.
freq (str) –
Pandas frequency string.
The default value is “month-end frequency”.
For valid values see https://stackoverflow.com/a/35339226/315168
Monthly returns for each month.
The array is keyed by the end date of the period e.g. July is 2021-07-31.
The first month can be incomplete, so its value is NaN.
- Return type: