diff --git a/.project b/.project index e65c65b..ecb64bd 100644 --- a/.project +++ b/.project @@ -14,5 +14,6 @@ de.walware.statet.base.StatetNature de.walware.statet.r.RNature + de.walware.statet.r.RPkgNature diff --git a/R/putHeston.R b/R/putHeston.R index 6ef3a7f..da5d442 100644 --- a/R/putHeston.R +++ b/R/putHeston.R @@ -16,10 +16,16 @@ #' @return European put option price #' @export putHeston #' @author Francois Pelletier -putHeston <- function(strikeprice,dist.fn,ess.dist.fn,eval.time,expiry.time,rate,...) +putHeston <- function(param,strikeprice,dist.fn,eval.time,expiry.time,rate) { - exp(-rate*(expiry.time-eval.time)) * strikeprice*dist.fn(log(strikeprice),...) - - ess.dist.fn(log(strikeprice),...) + exp(-rate*(expiry.time-eval.time)) * strikeprice*dist.fn(log(strikeprice),param,hEsscher=0) - + dist.fn(log(strikeprice),param,hEsscher=1) +} + +putHestonSaddle <- function(param,strikeprice,dist.fn1,dist.fn2,eval.time,expiry.time,rate) +{ + exp(-rate*(expiry.time-eval.time)) * strikeprice*dist.fn1(log(strikeprice),param) - + dist.fn2(log(strikeprice),param) }