aggregate_returns
- qf_lib.common.utils.returns.custom_returns_aggregating.aggregate_returns(returns: ReturnsSeries, start_dates: Sequence[datetime], end_dates: Sequence[datetime]) Sequence[float] [source]
Aggregates returns using custom start dates and end dates.
- Parameters:
returns (ReturnsSeries) – returns to be aggregated
start_dates (Sequence[datetime]) – list of start dates for aggregations
end_dates (Sequence[datetime]) – list of end dates for aggregations (of the same length as start_dates)
- Returns:
list of aggregated returns corresponding to given start dates and end dates (it has the same length)
- Return type:
Sequence[float]