Skip to contents

Is the value at risk exceeded as often as it should be? The likelihood ratio test of Kupiec (1995) compares the share of days with a loss beyond it with the share it promises, such as 5%.

Usage

kupiec_test(exceedances, days, p)

Arguments

exceedances

Number of days with a loss beyond the value at risk.

days

Number of days tested.

p

The share of days it should be exceeded on, such as 0.05.

Value

The p-value of the test.

Examples

golemstockindices:::kupiec_test(c(13, 30), days = 252, p = 0.05)
#> [1] 9.084112e-01 1.658095e-05