Simulating an Exponential Brownian Time Integral with Euler Steps
Summary
The document describes a simple pathwise approximation for the time integral of an exponential function of standard Brownian motion. First, divide the time horizon into small intervals and simulate each Brownian increment from a normal distribution with variance equal to the interval length. Add each increment to the previous Brownian value, then approximate the integral over that interval by multiplying the interval length by the exponential evaluated at the current Brownian value. Accumulating these contributions produces a trajectory for the integral.
A short Python example illustrates cumulative sums for the Brownian path and integral. This is a left-endpoint, rectangular approximation, so its accuracy depends on the time step and it can have discretization error; the document gives no convergence analysis, error bounds, or comparison with more accurate schemes. Its procedure applies to the stated integral and is not a general treatment of stochastic integration or a trading strategy.
Key ideas
- Simulate Brownian increments as independent normal draws with variance equal to the time step.
- Construct the Brownian path by cumulatively adding the simulated increments.
- Approximate each integral increment using the exponential evaluated at the start of the time interval.
- Smaller time steps can improve the pathwise approximation, although the document gives no error analysis.
Tags
Full text
# How to numerically simulate exponential stochastic integral
# How to numerically simulate exponential stochastic integral
For example given an integral
$$ \int^t_0 \exp(aW(t'))\,dt', t\in\mathbb R_+ $$ where $W(t')$ is a standard Wiener process.
I've been very confused about stochastic integrals like $\int^t_0 W(t')\,dt'$, for example here Integral of Brownian motion w.r.t. time
My question is how to numerically simulate this integral (i.e. simulate trajectories with evolution of time)
## Answer by Tomas G. (score 5, accepted)
https://quant.stackexchange.com/a/44619
making use of this formula :
$$ y(t_{k+1}) = y({t_k}) + \int^{t_{k+1}}_{t_k} y(t) dt $$
Let's define $F$ as: $$ F(t)=\int^t_0 \exp(aW(t'))\,dt', \forall t\in\mathbb R_+\\ dF(t)=\exp(aW(t))dt $$
- Choose a small $\Delta t$.
- Simulate $\Delta W\sim \mathcal N(0,\Delta t)$
- Calculate $W(t+\Delta t)=W(t) + \Delta W$
- Calculate $F(t+\Delta t)=F(t)+ \exp(aW(t))\Delta t $
- Repeat 2, 3 and 4 as many times as you want.
## Answer by Attack68 (score 2)
https://quant.stackexchange.com/a/44624
@ThomasG's solution is implemented in python (give or take some care with the zero index) as:
```
import numpy as np
dt = 1e-2; j = 10; a = 1
dW = np.random.randn(j+1); dW[0] = 0
W = np.cumsum(dW)
F = np.cumsum(np.exp(a * W) * dt)
```Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.