skfolio.measures.cvar#

skfolio.measures.cvar(returns, beta=0.95)[source]#

Compute the historical CVaR (conditional value at risk).

The CVaR (or Tail VaR) represents the mean shortfall at a specified confidence level (beta).

Parameters:
returnsndarray of shape (n_observations,)

Vector of returns.

betafloat, default=0.95

The CVaR confidence level (expected VaR on the worst (1-beta)% observations).

Returns:
valuefloat

CVaR.