| trftest | R Documentation |
The Traffic Light Test, is applied to previously calculated Value-at-Risk series.
trftest(obj)
obj |
A list returned by the |
This function uses an object returned by the rollcast function
of the quarks package as an input for the
function argument obj. A list with different elements, such as
the cumulative probabilities for the VaR series within obj,
is returned. Instead of the list, only the traffic light backtesting results
are printed to the R console.
A list of class quarks is returned with the following elements.
selected model for estimation
selected method for estimation
cumulative probability of observing the number of
breaches or fewer for (1 - p)100%-VaR
number of exceedances for (1 - p)100%-VaR
coverage level for (1-p)100% VaR
prices <- DAX$price_close
returns <- diff(log(prices))
n <- length(returns)
nout <- 250 # number of obs. for out-of-sample forecasting
nwin <- 500 # window size for rolling forecasts
results <- rollcast(x = returns, p = 0.975, method = 'age', nout = nout,
nwin = nwin)
trftest(results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.