# simBySolution

Simulate approximate solution of diagonal-drift `HWV`

processes

## Description

`[`

adds optional name-value pair arguments. `Paths`

,`Times`

,`Z`

] = simBySolution(___,`Name,Value`

)

You can perform quasi-Monte Carlo simulations using the name-value arguments for
`MonteCarloMethod`

, `QuasiSequence`

, and
`BrownianMotionMethod`

. For more information, see Quasi-Monte Carlo Simulation.

## Examples

## Input Arguments

## Output Arguments

## More About

## Algorithms

The `simBySolution`

method 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 Hull-White/Vasicek (HWV) by an
approximation of the closed-form solution.

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

$$d{X}_{t}=S(t)[L(t)-{X}_{t}]dt+V(t)d{W}_{t}$$

where:

*X*is an*NVars*-by-`1`

state vector of process variables.*S*is an*NVars*-by-*NVars*matrix of mean reversion speeds (the rate of mean reversion).*L*is an*NVars*-by-`1`

vector of mean reversion levels (long-run mean or level).*V*is an*NVars*-by-*NBrowns*instantaneous volatility rate matrix.*W*is an*NBrowns*-by-`1`

Brownian motion vector.

The `simBySolution`

method 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.

## References

[1] Aït-Sahalia, Yacine. “Testing
Continuous-Time Models of the Spot Interest Rate.” *Review of Financial
Studies*, Vol. 9, No. 2 ( Apr. 1996): 385–426.

[2] Aït-Sahalia, Yacine. “Transition
Densities for Interest Rate and Other Nonlinear Diffusions.” *The Journal of
Finance*, Vol. 54, No. 4 (Aug. 1999): 1361–95.

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

[4] Hull, John C. *Options,
Futures and Other Derivatives*, 7th ed, Prentice Hall, 2009.

[5] Johnson, Norman Lloyd, Samuel
Kotz, and Narayanaswamy Balakrishnan. *Continuous Univariate
Distributions*, 2nd ed. Wiley Series in Probability and Mathematical Statistics.
New York: Wiley, 1995.

[6] Shreve, Steven E.
*Stochastic Calculus for Finance*, New York: Springer-Verlag,
2004.

## Version History

**Introduced in R2008a**

## See Also

`simByEuler`

| `simulate`

| `hwv`

| `simBySolution`

### Topics

- Creating Hull-White/Vasicek (HWV) Gaussian Diffusion Models
- Simulating Equity Prices
- Simulating Interest Rates
- Stratified Sampling
- Price American Basket Options Using Standard Monte Carlo and Quasi-Monte Carlo Simulation
- Base SDE Models
- Drift and Diffusion Models
- Linear Drift Models
- Parametric Models
- SDEs
- SDE Models
- SDE Class Hierarchy
- Quasi-Monte Carlo Simulation
- Performance Considerations