Skip to contents

The VaR is defined as the empirical \(\alpha\) level quantile of the empirical distribution based on a return sample.

Usage

est_var(sample, alpha)

Arguments

sample

Numeric vector representing the sample upon which the Value at Risk is calculated.

alpha

Numeric vector with entries in (0,1) specifying the levels at which the VaR is calculated.

Value

Numeric vector with VaR estimates (same length as alpha).

See also

Examples

est_var(0:100, c(0.1, 0.2, 0.3))
#> [1] 10 20 30