<a id="skfolio-measures-get-cumulative-returns"></a>

# skfolio.measures.get_cumulative_returns

<a id="skfolio.measures.get_cumulative_returns"></a>

### skfolio.measures.get_cumulative_returns(returns, compounded=False, base=1.0)

Compute the cumulative returns from a series of returns.

* **Parameters:**
  **returns** *ndarray of shape (n_observations,) or (n_observations, n_assets)*
  : Array of return values.

  **compounded** *bool, default=False*
  : If True, compute compounded (geometric) cumulative returns as a wealth index
    starting at `base`. If False, compute non-compounded (arithmetic) cumulative
    returns starting at 0. Default is False.

  **base** *float, default=1.0*
  : Starting value for compounded cumulative returns, expressed as a wealth index.
    For example, use 1.0 for a “wealth index” representing $1 invested, or 100.0
    for index-style rebasing.
* **Returns:**
  values: ndarray of shape (n_observations,) or (n_observations, n_assets)
  : Cumulative returns.

### Notes

NaN handling:
Missing values (NaNs) remain at their original locations in the output and are
treated as neutral elements during accumulation, so they do not propagate to
subsequent values.

