# How can I simulate the Stochastic integral $\int X_sdW_s$ when X is a stochastic process and W is a Brownian motion?

How can I simulate the Stochastic integral $$\int_0^1 X_sdW_s$$ where $$X$$ is strong solution of of an SDE driven by a Brownian motion independent of $$W$$(the integrator above). I have already computed $$X$$ along $$10000$$ paths an over an equally spaced time grid(containing $$500$$ points) on the interval $$[0,1]$$

What recipe should I use to approximate $$\int_0^1 X_sdW_s$$. If $$X$$ were deterministic I could simply sample normally distributed random variables and approximate by $$\sum_{i=1}^{N-1} X_{t_i}N(0,t_{i+1}-t_i)$$ and repeat the procedure 1000 times to get the random variable $$\int_0^1 X_sdW_s$$

But how do I handle that $$X_{t_i}$$ can take a 1000 values in the case $$X$$ is a stochastic process instead of deterministic function? What would be the correct way to approximate the stochastic integral in a mathematically coherent way?

**Possible Solution: Could I approximate $$\int_0^1 X_sdW_s(\omega)= \sum_{i=1}^{N-1}X_{t_i}(\omega)N(0,t_{i+1}-t_i)(\omega_i)$$. In this sum we multiply $$X_{t_i}(\omega)$$ for every one of 10000 paths by the same sample from a normally distributed random variable(of course we multiply with a different independent Normal sample as $$i$$ varies). This would give me $$\int_0^1 X_sdW_s$$( as a random variable with 10000 possible values). **

I am not sure if this approximation converges in any sense to

• (Not a complete answer.) I'd simulate $W$ 10,000 times as well. By convergence I guess you mean that of the distribution. If you fix $W$, then in general you wouldn't get the full picture. – AddSup Apr 6 at 15:20
• Do you mean for each 10000 paths I simulate 10000 $W$? So the resulting random variable can take 100 million values ? – user3503589 Apr 6 at 15:22
• I thought that by "the same sample from a normally distributed random variable" you meant you simulate one path for $W$. Maybe I misinterpreted it. I meant to simulate a new path for $W$ for each of the 10,000 paths for $X$, which will result in 10,000 values for the integral. – AddSup Apr 7 at 5:36
• In the possible solution I did mean 1 Brownian math. But since at each time $t_i$ in the grid, $X$ can take 10000 values, so if I use 10000 possible Brownian paths, $X_{t_{i+1}}$ could take would 10000^2 values. How do you intend to update $X_{t_i}$ to $X_{t_{i+1}}$ so that you get only 10000 possible values? – user3503589 Apr 7 at 10:55