Learn R Programming

jvnVaR (version 1.0)

jTestVaR: VaR Back-testing

Description

Provide some kinds of test for Value at risk.

The null hypothesis is the equation of the probability of loss cross over VaR and the given ruin level.

It will show how the calculated VaR can be accepted.

See the report: Value at Risk.

Usage

jTestVaR(Ret, VaR, p, test_significant, type)

Arguments

Ret
Return series use to back-test.
VaR
Value at Risk that has been calculated.
p
Given probability used to calculate VaR
test_significant
Significant level of the test.
type
Kinds of test.

. p_value

. pof

. tuff

. mixkup

Value

Statistic,Quantile and test result.

Details

See the report.

See Also

https://www.researchgate.net/profile/Vu_Hung4

Examples

Run this code
y <- c(11, 12, 10, 13, 12, 14, 13, 15, 13, 14, 12)
s <- jReturn(y)
alpha <- 0.2
h <- 0
v <- jVaR('non_adjust_hist',s,alpha,h)
jTestVaR(s, v, alpha, 0.05, 'p_value')

Run the code above in your browser using DataLab