0

I'm using the Sim.DiffProc package in R to simulate a Stratonovich stochastic integral. Using the following code I can simulate 5 paths of the stochastic integral from t=0 to t=5:

fun=expression(w) strat=st.int(fun, type="str", M=5, lower=0, upper=5)

How can I get the values of the stochastic integral in t=5 given that the st.int() function doesn't give the values in the various t as output?

Egodym
  • 453
  • 1
  • 8
  • 23

1 Answers1

1

I'm not sure what you mean by t=5. The $X matrix is a of times series:

> str(strat)
List of 8
 $ X           : mts [1:1001, 1:5] 0.0187 0.0177 0.0506 0.0357 0.0357 ...
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : NULL
  .. ..$ : chr [1:5] "X1" "X2" "X3" "X4" ...
  ..- attr(*, "tsp")= num [1:3] 0 5 200
  ..- attr(*, "class")= chr [1:3] "mts" "ts" "matrix"
 $ fun         : symbol w
 $ type        : chr "str"
 $ subdivisions: int 1000
 $ M           : num 5
 $ Dt          : num 0.005
 $ t0          : num 0
 $ T           : num 5
 - attr(*, "class")= chr "st.int"

If it is the fifth row of the values matrix is what you mean, it would be:

> (strat$X[5 , ])
          X1           X2           X3           X4           X5 
0.0031517578 0.0161278426 0.0003616453 0.0097594992 0.0012617410 
IRTFM
  • 258,963
  • 21
  • 364
  • 487
  • Great, the output X is what I was looking for. For t=5 I meant to say the last value of the simulation for the different paths, therefore `(strat$X[1001 , ])`. Thanks! – Egodym Nov 06 '14 at 15:13