Skip to content
All library documents

CIR Process Simulation: Positivity and Discretization Choices

Article Quant Q&A · Author: SBF

Summary

The document surveys simulation methods for the Cox–Ingersoll–Ross short-rate process, whose square-root diffusion can produce negative values under a naive Euler–Maruyama step. Negative simulated rates break subsequent square-root updates, so preserving positivity is a central concern. Suggested alternatives include weighted Milstein, balanced implicit, pathwise adapted linearization, quadratic-exponential, and transformed-volatility schemes, alongside truncated and reflected Euler variants and higher-order methods.

When feasible, sampling from the known exact CIR transition distribution avoids discretization error but requires draws from a non-central chi-squared distribution, which may be costly to implement. The responses characterize Euler-style methods as cheaper but potentially biased enough to require fine time steps. They point to a consistent-domain Markov-chain approach for broader nonnegative diffusions. The discussion offers a method survey rather than a controlled comparison, and notes that reported practice in finance is difficult to establish; performance depends on the scheme and simulation requirements.

Key ideas

  • Naive Euler–Maruyama updates can make CIR paths negative and invalidate later square-root steps.
  • Positivity-preserving methods include implicit, truncated, reflected, and specialized higher-order schemes.
  • Exact transition sampling is available for CIR but can be computationally expensive.
  • Cheap Euler variants may introduce bias that requires finer time steps.
  • The document lists alternatives without presenting a systematic performance comparison.

Tags

Full text
# Monte Carlo simulating Cox-Ingersoll-Ross process


# Monte Carlo simulating Cox-Ingersoll-Ross process












The CIR process is given by the SDE $$ \mathrm dr_t = \theta(\mu-r_t)\mathrm dt + \sigma\sqrt{r_t}\mathrm dW_t $$ where $W_t$ is a Brownian motion. I am interested in finite-difference schemes of simulating trajectories of this process, for example I tried the Euler-Maryama scheme $$ r_{t+\Delta t} \approx r_t + \theta(\mu - r_t)\Delta t + \sigma\sqrt{r_t}\xi_t\sqrt{\Delta t}, \quad \xi_t\sim\mathscr N(0,1) $$ but when I am making $\Delta t$ smaller and smaller, results do not seem nice. In fact, I am also interested in a more general simulation techniques for similar kind of processes. Any suggestions?

## Answer by user16891 (score 7)

https://quant.stackexchange.com/a/19108

### 1. weighted Milstein Scheme

We assume $\{X_t\}_{t\geq0}$ described by the following stochastic differential equation $$dX_t=\mu(t,X_t)dt+\sigma(t,X_t)dW_t\,\,\,\,\,\,\,\,\,\,\,\,\,(1)$$ Under the Ito version of this scheme Equation $(1)$ becomes $$dX_{t+\Delta t}=X_t+[\alpha\,\mu(t,X_t)+(1-\alpha)\mu(t+\Delta t,X_{t+\Delta t})]\Delta t+\sigma\sqrt{\Delta t \,X_t}\,Z+\frac{1}{2}\sigma(t,X_t)\sigma'(t,X_t)\Delta t(Z^2-1)$$ where $0\leq\alpha\leq1$ is the weight and $Z$ is normal random variable.By application of the Weighted Milstein scheme to the CIR model, $$dr_t=\kappa(\theta-r_t)dt+\sigma\sqrt{r_t}dW_t$$ we have $${{r}_{t+\Delta t}}=\frac{{{r}_{t}}+\kappa (\theta -\alpha\,{{r}_{t}})\Delta t+\sigma \sqrt{{{r}_{t}}}\sqrt{\Delta t}\,{{Z}}+\frac{1}{4}{{\sigma }^{2}}\Delta t({{Z}}^{2}-1)}{1+(1-\alpha )\kappa \,\Delta t}$$

### 2. Balanced Implicit Scheme

This scheme is able to preserve positivity of the variance process. It is defined in Platen and Heath as $${{r}_{t+\Delta t}}=\frac{{{r}_{t}}(1+C(r_t))+\kappa (\theta -{{r}_{t}})\Delta t+\sigma \sqrt{{{r}_{t}}}\sqrt{\Delta t}\,{{Z}}}{1+C(t,r_t)}$$ where $$C(t,r_t)=\kappa dt+\frac{\sigma \sqrt{\Delta t}|Z|}{\sqrt{r_t}}$$

### 3.Pathwise Adapted Linearization Quadratic

Its convergence is fast,especially for small values of $\sigma$. The discretization scheme is given by $${{r}_{t+\Delta t}}=r_t+(\kappa (\tilde{\theta} -r_t)+\sigma\beta_n\sqrt{r_t}\,)\left(1+\frac{\sigma\beta_n-2\kappa\sqrt{r_t}}{4\sqrt{r_t}}\Delta t\right)\Delta t$$ where $\beta_n=\frac{Z}{\sqrt{\Delta t}}$ and $\tilde{\theta}=\theta-\frac{\sigma^2}{4\kappa} $ This scheme presented in Kahl and Jackel.

### 4. Quadratic-exponential scheme

Another scheme for discretization of the CIR process is Quadratic-exponential scheme.For more details,please download it. Also,Transformed volatility scheme is useful.

## Answer by TheBridge (score 4)

https://quant.stackexchange.com/a/8117

There are a lot of methods for simulating such a process, the real problem here is to preserve positivity of the next simulated step as the Gaussian increment might result in negative value and then a non definite value for the next "square-root" step.

An approach that might be suitable to your more general needs is the following where a "consistent-domain" Markov Chain approach is used "Labbé, Remillard, Renaud - A Simple Discretization Scheme for Non negative Diffusion Processes, with Applications to Option Pricing"

There are many other methods to sample from this process, search for "Heston model simulation" and you should find all you need.

Best regards

## Answer by user2952092 (score 1)

https://quant.stackexchange.com/a/30853

You can find some implementations in the open-source python Library : https://github.com/AlexandreMoulti/bachelier

Your contributions would be very welcome.

## Answer by oliversm (score 0)

https://quant.stackexchange.com/a/57803

Adding a few comments taken from another answer of mine to a related question:

## Discretisation schemes

If you want to simulate the path, then common practice is to sample from the exact distribution, as for the CIR process this is known. The distribution can be found from the original CIR paper (1985). However, this requires sampling from a non-central $\chi^2$-distribution, which can be very expensive, and a bit more difficult to implement than a an Euler-Maruyama scheme.

For the Euler-Mayuama scheme, or variants thereof which are appropriate for the CIR process, some popular choices in the academic/scientific setting include

- The truncated scheme by Deelstra and Delbaen.

- The fully truncated scheme by Lord et al.

- The reflected scheme by Berkaoui et al.

- The reflected scheme by Higham et al.

- Higher order schemes by Alfonsi.

- etc.

For some more discussion on these see Dereich et al. and Lord et al. Of course most people in finance are quiet about what they use, so it's only possible to comment on how popular these are in a scientific setting.

It is worth noting that while the Euler-Maruyama scheme is much cheaper compared the exact CIR simulation (using non-central $\chi^2$ samples), it is very biased, and thus can require some very fine path simulations, which can eat into some of the saving.

## References

- John C. Cox, Jonathan E. Ingersoll Jr, and Stephen A. Ross. A theory of the term structure of interest rates. Econometrica, 53(2):385–408–164, March 1985.

- Aurélien Alfonsi. On the discretization schemes for the CIR (and Bessel squared) processes. Monte Carlo Methods and Applications, 11(4):355–384, 2005. (cf. the 2008 and 2010 papers also).

- Griselda Deelstra and Freddy Delbaen. Convergence of discretized stochastic (interest rate) processes with stochastic drift term. Applied stochastic models and data analysis, 14(1):77–84, 1998.

- Steffen Dereich, Andreas Neuenkirch, and Lukasz Szpruch. An Euler-type method for the strong approximation of the Cox-Ingersoll-Ross process. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 468(2140):1105–1115, 2012.

- Abdel Berkaoui, Mireille Bossy, and Awa Diop. Euler scheme for SDEs with non-Lipschitz diffusion coefficient: strong convergence. ESAIM: Probability and Statistics, 12:1–11, 2008.

- Desmond J Higham, Xuerong Mao, and Andrew M Stuart. Strong convergence of Euler-type methods for nonlinear stochastic differential equations. SIAM Journal on Numerical Analysis, 40 (3):1041–1063, 2002.

- Roger Lord, Remmert Koekkoek, and Dick van Dijk. A comparison of biased simulation schemes for stochastic volatility models. Quantitative Finance, 10(2):177–194, 2010.

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.