skfolio.measures.evar#

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

Compute the EVaR (entropic value at risk).

The EVaR is a coherent risk measure which is an upper bound for the VaR and the CVaR, obtained from the Chernoff inequality. The EVaR can be represented by using the concept of relative entropy.

Parameters:
returnsndarray of shape (n_observations,)

Vector of returns.

betafloat, default=0.95

The EVaR confidence level. Must be between 0 and 1.

Returns:
valuefloat

EVaR.

Notes

The EVaR of the returns \(X\) at confidence level \(\beta\) is

\[\text{EVaR}_{\beta}(X) = \inf_{\theta > 0} \theta \log \left( \frac{\mathbb{E}\left[e^{-X / \theta}\right]}{1 - \beta} \right)\]

It lies between the CVaR and the largest loss. It equals the largest loss when \(n (1 - \beta) \le k\), where \(n\) is the number of observations and \(k\) the number tied at the largest loss, and the mean loss when beta=0.

NaN handling: NaN returns are excluded. The result is NaN if no observations remain.

References

[1]

“Entropic Value-at-Risk: A New Coherent Risk Measure”, Journal of Optimization Theory and Applications, Ahmadi-Javid (2012)