Home   >   User Resources   >   Online Help   >   apaCVaR.Empirical
 

 

Function index Version 3.0.0

apaCVaR.Empirical(Returns, ConfidenceLevel, IsSmooth)

Excel=apaCVaR.Empirical(Returns, ConfidenceLevel, IsSmooth)

Result

Calculates the empirical (historical) conditional value at risk (CVaR) from a time series matrix of returns.

Syntax

Returns: r x c matrix of returns. Each column represents a different time series.

ConfidenceLevel: confidence level, e.g. 95%.

IsSmooth: TRUE for the smoothed estimate (see below), FALSE for the average of the returns below the VaR

Algorithm

General definition:

Formula

If IsSmooth = FALSE:

Formula

If IsSmooth = TRUE:

With the returns sorted in ascending order r(1) ≤ … ≤ r(n), m = (1 − ConfidenceLevel)·n and k = ⌊m⌋:

CVaR = (r(1) + … + r(k) + (m − k)·r(k+1)) / m

Remarks

Losses are reported as negative numbers. #N/A is returned if IsSmooth = FALSE and no return lies below the VaR.