st.int {Sim.DiffProc} | R Documentation |
Stochastic Integrals
Description
The (S3) generic function st.int
of simulation of stochastic integrals of Itô or Stratonovich type.
Usage
st.int(expr, ...)
## Default S3 method:
st.int(expr, lower = 0, upper = 1, M = 1, subdivisions = 1000L,
type = c("ito", "str"), ...)
## S3 method for class 'st.int'
summary(object, at ,digits=NULL, ...)
## S3 method for class 'st.int'
time(x, ...)
## S3 method for class 'st.int'
mean(x, at, ...)
## S3 method for class 'st.int'
Median(x, at, ...)
## S3 method for class 'st.int'
Mode(x, at, ...)
## S3 method for class 'st.int'
quantile(x, at, ...)
## S3 method for class 'st.int'
kurtosis(x, at, ...)
## S3 method for class 'st.int'
min(x, at, ...)
## S3 method for class 'st.int'
max(x, at, ...)
## S3 method for class 'st.int'
skewness(x, at, ...)
## S3 method for class 'st.int'
moment(x, at, ...)
## S3 method for class 'st.int'
cv(x, at, ...)
## S3 method for class 'st.int'
bconfint(x, at, ...)
## S3 method for class 'st.int'
plot(x, ...)
## S3 method for class 'st.int'
lines(x, ...)
## S3 method for class 'st.int'
points(x, ...)
Arguments
expr |
an |
lower , upper |
the lower and upper end points of the interval to be integrate. |
M |
number of trajectories (Monte-Carlo). |
subdivisions |
the maximum number of subintervals. |
type |
Itô or Stratonovich integration. |
x , object |
an object inheriting from class |
at |
time between |
digits |
integer, used for number formatting. |
... |
potentially further arguments for (non-default) methods. |
Details
The function st.int
returns a ts
x of length N+1
; i.e. simulation of stochastic integrals
of Itô or Stratonovich type.
The Itô interpretation is:
\int_{t_{0}}^{t} f(s) dW_{s} = \lim_{N \rightarrow \infty} \sum_{i=1}^{N} f(t_{i-1})(W_{t_{i}}-W_{t_{i-1}})
The Stratonovich interpretation is:
\int_{t_{0}}^{t} f(s) \circ dW_{s} = \lim_{N \rightarrow \infty} \sum_{i=1}^{N} f\left(\frac{t_{i}+t_{i-1}}{2}\right)(W_{t_{i}}-W_{t_{i-1}})
An overview of this package, see browseVignettes('Sim.DiffProc')
for more informations.
Value
st.int
returns an object inheriting from class
"st.int"
.
X |
the final simulation of the integral, an invisible |
fun |
function to be integrated. |
type |
type of stochastic integral. |
subdivisions |
the number of subintervals produced in the subdivision process. |
Author(s)
A.C. Guidoum, K. Boukhetala.
References
Ito, K. (1944). Stochastic integral. Proc. Jap. Acad, Tokyo, 20, 19–529.
Stratonovich RL (1966). New Representation for Stochastic Integrals and Equations. SIAM Journal on Control, 4(2), 362–371.
Kloeden, P.E, and Platen, E. (1995). Numerical Solution of Stochastic Differential Equations. Springer-Verlag, New York.
Oksendal, B. (2000). Stochastic Differential Equations: An Introduction with Applications. 5th edn. Springer-Verlag, Berlin.
See Also
snssde1d
, snssde2d
and snssde3d
for 1,2 and 3-dim sde.
Examples
## Example 1: Ito integral
## f(t,w(t)) = int(exp(w(t) - 0.5*t) * dw(s)) with t in [0,1]
set.seed(1234)
f <- expression( exp(w-0.5*t) )
mod1 <- st.int(expr=f,type="ito",M=50,lower=0,upper=1)
mod1
summary(mod1)
## Display
plot(mod1)
lines(time(mod1),apply(mod1$X,1,mean),col=2,lwd=2)
lines(time(mod1),apply(mod1$X,1,bconfint,level=0.95)[1,],col=4,lwd=2)
lines(time(mod1),apply(mod1$X,1,bconfint,level=0.95)[2,],col=4,lwd=2)
legend("topleft",c("mean path",paste("bound of", 95," percent confidence")),
inset = .01,col=c(2,4),lwd=2,cex=0.8)
## Example 2: Stratonovich integral
## f(t,w(t)) = int(w(s) o dw(s)) with t in [0,1]
set.seed(1234)
g <- expression( w )
mod2 <- st.int(expr=g,type="str",M=50,lower=0,upper=1)
mod2
summary(mod2)
## Display
plot(mod2)
lines(time(mod2),apply(mod2$X,1,mean),col=2,lwd=2)
lines(time(mod2),apply(mod2$X,1,bconfint,level=0.95)[1,],col=4,lwd=2)
lines(time(mod2),apply(mod2$X,1,bconfint,level=0.95)[2,],col=4,lwd=2)
legend("topleft",c("mean path",paste("bound of", 95," percent confidence")),
inset = .01,col=c(2,4),lwd=2,cex=0.8)