I am studying numerical methods from the textbook Monte Carlo Methods in Financial Engineering by Paul Glasserman and have encountered the following exercise:
I want to simulate from the stochastic processes satisfying the following SDEs
$$dX_i = X_i (\mu dt + \sigma_{(1)} dB^{(1)}_i) \tag{1}$$ $$\text{and}$$ $$dY_i = Y_i ( \mu dt + \sigma_{(2)} ( \alpha dB^{1}_i + \sqrt{1 - \alpha ^2} dB^{(2)}_i)) \tag{2}$$
Here we assume that $B^{(i)}$ are two independent Brownian Motions. $X_0, Y_0 > 0$, and $\sigma_{(i)}$ both represent volatility, and $\alpha$ is for correlation from $-1$ to $1$.
The first SDE for $X$ is a Geometric Brownian Motion. I am familiar with many simulation schemes for these SDEs including:
$$\hat{X}_{t_{i+1}} = \hat{X}_{t_i} \exp \Big{(} \big{(} \mu -\frac{\sigma_1^2}{2} \big{)} (t_{i+1}-t_i) + \sigma_1 \sqrt{t_{i+1} - t_i}Z_{i+1} \Big{)} \space , \quad i = 0,\cdots, n-1 \tag{3} $$
$$ \text{and} $$
$$ \hat{X}_{t_{i+1}} = \hat{X}_{t_i} (1+ \mu (t_{i+1} - t_i) + \sigma \sqrt{t_{i+1} - t_i} Z_{i+1} \tag{4} $$
However, if I want to generate sample paths from the second SDE, this doesn't seem to be in a canonical form (at least not one that I'm aware of). Does there exist a similar simulation scheme for equations in this form?
In isolation, the second equation is also just a GBM, the solution formula can be applied. $$ dB^{(3)}=\alpha\,dB^{(1)}+\sqrt{1-\alpha^2}\,dB^{(2)} $$ defines, in itself, a standard Brownian motion.
However, due to the mixing there is correlation between both processes, this has of course to be reflected in the numerical solution. Fortunately everything is linear, there are no higher-order coupling terms, so you draw $Z^{(1)}_{i}$ and $Z^{(2)}_{i}$ from the random number generator and use $$ Z^{(3)}_i=\alpha\,Z^{(1)}_i+\sqrt{1-\alpha^2}\,Z^{(2)}_i $$ in the second equation.