CIR Interest Rate Model Calculator
Model short-term interest rates with the Cox-Ingersoll-Ross (CIR) process. Price zero-coupon bonds, build the yield curve, and check the Feller condition instantly.
Cox–Ingersoll–Ross Term Structure
A clear path from inputs to results.
Model how a single short-term interest rate drifts back toward a long-run average over time, and turn that process into zero-coupon bond prices and a full yield curve. It uses the Cox-Ingersoll-Ross (CIR) equilibrium model, which keeps rates from ever going negative, so it is useful for students and fixed-income analysts exploring term-structure dynamics.
How to use
- Set the mean-reversion speed kappa — how fast the rate is pulled back toward its long-run level. Higher values mean faster reversion and a flatter long-end curve.
- Set the long-run mean theta, the level the short rate gravitates toward over time (e.g. 0.04 for 4%).
- Set the volatility sigma, which scales the random shocks; CIR multiplies them by the square root of the rate, so volatility shrinks as the rate falls toward zero.
- Set the initial short rate r0, today's instantaneous rate that the simulation starts from.
- Choose the maximum maturity (years) and surface resolution to control how far out the bond-price and yield curves are drawn.
- Read the metrics: the Feller margin (2kappa*theta - sigma^2) tells you whether the rate stays strictly positive, and the 5-year bond price and yield summarize the resulting curve.
The formula
Reference: Cox, J. C., Ingersoll, J. E., & Ross, S. A. (1985), "A Theory of the Term Structure of Interest Rates," Econometrica 53(2), 385-407 (closed-form affine bond price).
Worked example
Default parameters: 5-year zero-coupon bond and yield
- Mean reversion kappa = 0.7; long-run mean theta = 0.04; volatility sigma = 0.12; initial short rate r0 = 0.035; maturity 5 years.
- 1
First gamma = sqrt(0.7^2 + 2*0.12^2) = 0.720278. For a 5-year horizon the denominator is (gamma+kappa)(e^{gamma*5}-1)+2*gamma, giving B(5) = 2(e^{gamma*5}-1)/den = 1.369219 and A(5) = [2*gamma*e^{(kappa+gamma)*5/2}/den]^{2*kappa*theta/sigma^2} = 0.866296. The bond price is then P(0,5) = A(5)*e^{-B(5)*0.035} = 0.825760. The continuously compounded yield is y = -ln(0.825760)/5 = 0.038290, or 3.829%. The Feller condition 2*kappa*theta - sigma^2 = 2*0.7*0.04 - 0.12^2 = 0.0416 is positive, so the modeled rate never reaches zero.
A 5-year zero-coupon bond is worth 0.825760 per unit of face value, implying a 3.829% yield; the positive Feller margin (0.0416) confirms rates stay strictly positive.
Interpreting the result
The bond price falls and the yield rises with maturity as the short rate (3.5%) is pulled toward its higher long-run mean (4%). A larger kappa makes the curve approach theta faster; a larger sigma lowers long-dated bond prices through a convexity/risk effect. The Feller margin is the key health check: when 2*kappa*theta exceeds sigma^2 the square-root diffusion keeps the rate strictly positive, which is the main reason CIR is preferred over the Gaussian Vasicek model.
Assumptions & limitations
- A single factor (the instantaneous short rate) drives the entire yield curve, so the tool cannot reproduce humped or independently-moving curve segments.
- The parameters kappa, theta, and sigma are constant through time; real markets re-estimate them as conditions change.
- The bond prices are the model's risk-neutral values and assume no credit, liquidity, or tax effects.
- The expected-path and variance bands use the model's analytic conditional mean and variance, not a Monte Carlo simulation of actual sample paths.
- Yields are continuously compounded and quoted per unit face value; converting to a market price-and-coupon quote requires your own day-count and compounding conventions.
Frequently asked questions
Why does the CIR model keep interest rates positive?
The diffusion term is sigma*sqrt(r), so volatility shrinks to zero exactly as the rate approaches zero, removing the downward push that could send it negative. When the Feller condition 2*kappa*theta >= sigma^2 holds, the rate is guaranteed to stay strictly above zero. With the default parameters the margin is 0.0416, comfortably positive.
How is the zero-coupon bond price computed?
CIR has a closed-form affine solution P(t,T) = A(t,T)*e^{-B(t,T)*r}, where A and B depend on kappa, theta, sigma and the time to maturity through gamma = sqrt(kappa^2 + 2*sigma^2). No simulation is needed. With the defaults, the 5-year factors are B = 1.369219 and A = 0.866296, giving P(0,5) = 0.825760.
Why does the yield curve slope upward with these inputs?
The short rate starts at 3.5% but is pulled toward its long-run mean of 4%, so expected future rates are higher than today's rate. Longer maturities average in those higher expected rates, lifting the yield from 3.829% at 5 years to 3.884% at 10 years. Setting r0 above theta would instead produce a downward-sloping curve.
What is the Feller margin shown in the results?
It is 2*kappa*theta - sigma^2. A positive value means the Feller condition is satisfied and the short rate never touches zero. If you raise sigma or lower kappa/theta enough to make it negative, the modeled rate can reach the zero boundary, which changes the behavior of long-dated bonds.
What is the difference between CIR and the Vasicek model?
Both are one-factor mean-reverting short-rate models, but Vasicek uses constant volatility (Gaussian), which allows negative rates, while CIR scales volatility by the square root of the rate, which keeps rates non-negative under the Feller condition. CIR also makes volatility rise with the level of rates, which many analysts consider more realistic.
Can I use this to price coupon bonds or swaps?
Indirectly. The tool prices zero-coupon bonds, which are the building blocks: a coupon bond is a sum of discounted cash flows, each priced with the P(0,T) for its maturity, and a swap can be valued from the same discount factors. You would combine the zero-coupon prices read off the curve rather than entering coupons directly here.
Methodology last reviewed 2026-10-06. Results are informational and not financial or engineering advice — see our disclaimer.