skfolio.measures.get_cumulative_returns#

skfolio.measures.get_cumulative_returns(returns, compounded=False)[source]#

Compute the cumulative returns from the returns. Non-compounded cumulative returns start at 0. Compounded cumulative returns are rescaled to start at 1000.

Parameters:
returnsndarray of shape (n_observations,)

Vector of returns.

compoundedbool, default=False

If this is set to True, the cumulative returns are compounded otherwise they are uncompounded.

Returns:
values: ndarray of shape (n_observations,)

Cumulative returns.