Learn R Programming

RMOPI (version 1.1)

V_k: V_k Series

Description

Calculate the V_k Series for Option Pricing with the COS Method, an option pricing method based on the Fourier-cosine series.

Usage

V_k(ValueOption, N, a, b, method = "integrate")

Value

The V_k series

Arguments

ValueOption

the value function of the option

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"

References

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.

Examples

Run this code
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
ValueOption <- function(x){EuroCallOption(x,K)}
V_k(ValueOption, N, a, b)

Run the code above in your browser using DataLab