ajout Heston Normal
This commit is contained in:
parent
2dc91e644c
commit
99f62ae466
2 changed files with 10 additions and 3 deletions
1
.project
1
.project
|
@ -14,5 +14,6 @@
|
|||
<natures>
|
||||
<nature>de.walware.statet.base.StatetNature</nature>
|
||||
<nature>de.walware.statet.r.RNature</nature>
|
||||
<nature>de.walware.statet.r.RPkgNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue