backtest_lr | R Documentation |
Exact finite‑sample back‑test for a VaR exception series
backtest_lr(
x,
alpha = 0.05,
type = c("uc", "ind", "cc"),
sig = 0.05,
prune_threshold = 1e-15
)
x |
0/1 exception series. |
alpha |
Exception probability. |
type |
|
sig |
Significance level (default |
prune_threshold |
Passed to the dynamic‑programming engine. |
An object of class "ExactVaRBacktest"
(a named list) with components:
stat
(numeric LR statistic),
pval
(numeric exact p
-value in [0,1]
),
reject
(logical; TRUE
if p < sig),
type
(character; one of "uc"
, "ind"
, "cc"
),
alpha
(numeric model exception probability),
sig
(numeric significance level),
n
(integer sample size).
set.seed(123)
x <- rbinom(250, 1, 0.01)
backtest_lr(x, alpha = 0.01, type = "uc")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.