CosValueOption | R Documentation |
Approximate the standard European call option price with the COS method, an option pricing method based on the Fourier-cosine series.
CosValueOption(ValueOption, GBMChf, r, tau, N, a, b, method = "integrate")
ValueOption |
the value function of the option |
GBMChf |
the characteristic function for GBM |
r |
the |
tau |
the |
N |
the number of cos term for summation |
a |
the lower limit of the truncation interval |
b |
the upper limit of the truncation interval |
method |
how to calculate the integral, one of "integrate" and "jiahe" |
The approximated euro call option price
Fang F. and Oosterlee C.W. 2008. "A Novel Pricing Method for European Options Based on Fourier-Cosine Series Expansions", Siam Journal on Scientific Computing. 31(2): 826-848. doi: 10.1137/080718061.
r <- 0.1 sigmaS0 <- 0.2 tau <- 10 S0 <- 1 K <- 1 mu <- log(S0) + (r - 0.5 * sigmaS0^2) * tau sigma <- sigmaS0 * sqrt(tau) a <- -10 b <- 10 N <- 64 GBMChf <- function(u){NormChf(u,mu,sigma)} ValueOption <- function(x){EuroCallOption(x,K)} CosValueOption(ValueOption, GBMChf,r,tau, N, a, b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.