simFunctional | R Documentation |
Calculate the value of functional associated with sde by Euler scheme.
simFunctional(yuima, expand.var="e") Fnorm(yuima, expand.var="e") F0(yuima, expand.var="e")
yuima |
a |
expand.var |
default expand.var="e". |
Calculate the value of functional of interest. Fnorm returns normalized one, and F0 returns the value for the case small parameter epsilon = 0. In simFunctional and Fnorm, yuima MUST contains the 'data' slot (X in legacy version)
Fe |
a real value |
we need to fix this routine.
YUIMA Project Team
set.seed(123) # to the Black-Scholes economy: # dXt^e = Xt^e * dt + e * Xt^e * dWt diff.matrix <- matrix( c("x*e"), 1,1) model <- setModel(drift = c("x"), diffusion = diff.matrix) # call option is evaluated by averating # max{ (1/T)*int_0^T Xt^e dt, 0}, the first argument is the functional of interest: Terminal <- 1 xinit <- c(1) f <- list( c(expression(x/Terminal)), c(expression(0))) F <- 0 division <- 1000 e <- .3 samp <- setSampling(Terminal = Terminal, n = division) yuima <- setYuima(model = model,sampling = samp) yuima <- setFunctional( yuima, xinit=xinit, f=f,F=F,e=e) # evaluate the functional value yuima <- simulate(yuima,xinit=xinit,true.par=e) Fe <- simFunctional(yuima) Fe Fenorm <- Fnorm(yuima) Fenorm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.