R/jKernelHistVaR.R

jKernelHistVaR <-
function(s, alpha){
hh <- jOptWidthKernel(s)
h <- 0.01
x <- min(s)
cdf <- jSimsonKernel(1000,-10,x,s,hh,jKernelFitPdf)
while (cdf < alpha){
x <- x+h
cdf <- jSimsonKernel(1000,-10,x,s,hh,jKernelFitPdf)
}

return(-x)
}

Try the jvnVaR package in your browser

Any scripts or data that you put into this service are public.

jvnVaR documentation built on May 1, 2019, 8:29 p.m.