Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like some assistance to solve the following:

$\sum\limits_{i=0}^{n-1} e^{-k(n\Delta t -i\Delta t)}\Delta z_i$

where $z$ is a Wiener process, $\Delta z_i = z((i+1)\Delta t)-z(i\Delta t)$.

The code I have so far is as follows. I am very new to Mathematica (and programming in general) so please let me know of any errors.

k = 0.5; t = 2; n = 100; M = 1000
Sum[
  Exp[-k (n (t/n) - i (t/n))][WienerProcess[][(i + 1) (t/n)]] - 
    Exp[-k (n (t/n) - i (t/n))][WienerProcess[][i (t/n)]], 
  {i, 0, n - 1}]

Note that $k$, $t$, $n$ and $M$ are user defined inputs.

Also, I would like some guidance on how to perform $M=1000$ simulations.

share|improve this question
    
Mathematica has WienerProcess did you look to see if it is what you want? reference.wolfram.com/mathematica/ref/WienerProcess.html –  Nasser Oct 18 '13 at 3:08
    
Hi Nasser, thank you for the reference. I have edited my main post with the code I have so far. Could you please have a look? –  user2530766 Oct 18 '13 at 4:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.