Simulate approximate solution of diagonal-drift GBM processes

The `simBySolution`

function simulates `NTRIALS`

sample paths of `NVARS`

correlated state variables, driven by
`NBROWNS`

Brownian motion sources of risk over
`NPERIODS`

consecutive observation periods, approximating
continuous-time GBM short-rate models by an approximation of the closed-form
solution.

Consider a separable, vector-valued GBM model of the form:

$$d{X}_{t}=\mu (t){X}_{t}dt+D(t,{X}_{t})V(t)d{W}_{t}$$

where:

*X*is an_{t}`NVARS`

-by-`1`

state vector of process variables.*μ*is an`NVARS`

-by-`NVARS`

generalized expected instantaneous rate of return matrix.*V*is an`NVARS`

-by-`NBROWNS`

instantaneous volatility rate matrix.*dW*is an_{t}`NBROWNS`

-by-`1`

Brownian motion vector.

The `simBySolution`

function simulates the state vector
*X _{t}* using an approximation of the
closed-form solution of diagonal-drift models.

When evaluating the expressions, `simBySolution`

assumes that all
model parameters are piecewise-constant over each simulation period.

In general, this is *not* the exact solution to the models, because
the probability distributions of the simulated and true state vectors are identical
*only* for piecewise-constant parameters.

When parameters are piecewise-constant over each observation period, the simulated
process is exact for the observation times at which
*X _{t}* is sampled.

Gaussian diffusion models, such as `hwv`

, allow negative states. By default, `simBySolution`

does nothing to prevent negative states, nor does it guarantee that the model be
strictly mean-reverting. Thus, the model may exhibit erratic or explosive growth.

[1] Ait-Sahalia, Y. “Testing Continuous-Time Models of the Spot Interest
Rate.” *The Review of Financial Studies*, Spring 1996, Vol.
9, No. 2, pp. 385–426.

[2] Ait-Sahalia, Y. “Transition Densities for Interest Rate and Other
Nonlinear Diffusions.” *The Journal of Finance*, Vol. 54,
No. 4, August 1999.

[3] Glasserman, P. *Monte Carlo Methods in Financial
Engineering.* New York, Springer-Verlag, 2004.

[4] Hull, J. C. *Options, Futures, and Other Derivatives*, 5th
ed. Englewood Cliffs, NJ: Prentice Hall, 2002.

[5] Johnson, N. L., S. Kotz, and N. Balakrishnan. *Continuous Univariate
Distributions.* Vol. 2, 2nd ed. New York, John Wiley & Sons,
1995.

[6] Shreve, S. E. *Stochastic Calculus for Finance II: Continuous-Time
Models.* New York: Springer-Verlag, 2004.

`gbm`

| `simByEuler`

| `simBySolution`

| `simulate`