ajout Heston Normal

This commit is contained in:
francois 2014-07-06 22:57:57 -04:00
parent 39fabc9ebb
commit af8c48a478
2 changed files with 6 additions and 10 deletions

View file

@ -20,8 +20,8 @@
#' @author Francois Pelletier
pnormapproxEsscherLM <- function(x,param,hEsscher=0,eval.time=1,type="mu",log=FALSE,start=0)
{
pnorm(x,start+eval.time*(mGAL(1,param,type,log)+hEsscher*cmGAL(2,param,type,log)),
sqrt(eval.time*cmGAL(2,param,type,log)))
pnorm(x,start+eval.time*(mGAL(param,1,type,log)+hEsscher*cmGAL(param,2,type,log)),
sqrt(eval.time*cmGAL(param,2,type,log)))
}

View file

@ -22,13 +22,9 @@ psaddleapproxEsscherGAL <- function(x,param,eval.time=1,type="mu",log=FALSE)
u <- s * sqrt(diffcgfEsscherGAL(s,2,param,eval.time,type,log))
w <- sign(s)*sqrt(2*(s*x-cgfEsscherGAL(s,param,type,log)))
if(x==mGAL(1,param,type,log))
{
return(1/2 + diffcgfEsscherGAL(0,3,param,eval.time,type,log)/
(x==round(mGAL(param,1,type,log),4))*
(1/2 + diffcgfEsscherGAL(0,3,param,eval.time,type,log)/
(6*sqrt(2*pi)*diffcgfEsscherGAL(0,2,param,eval.time,type,log)^(3/2)))
}
else
{
return(pnorm(w)+dnorm(w)*(1/w-1/u))
}
+(x!=round(mGAL(param,1,type,log),4)) * (pnorm(w)+dnorm(w)*(1/w-1/u))
}