skfolio.measures.value_at_risk#

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

Compute the historical value at risk (VaR).

The VaR is the maximum loss at a given confidence level (beta).

Parameters:
returnsndarray of shape (n_observations,)

Vector of returns.

betafloat, default=0.95

The VaR confidence level (return on the worst (1-beta)% observation).

Returns:
valuefloat

Value at Risk.