Calibrates the Vasicek and Cox-Ingersoll-Ross (CIR) short-rate models to the history of a country’s short-term government bond yield and compares the zero-coupon curve each model implies with today’s. Short-rate models describe how the interest rate moves, pulled back to a long-run mean b at a speed a with a volatility σ:

\[\text{Vasicek (1977):}\;\; \text{dr} = a (b - r) \text{dt} + \sigma \;\text{dW}\] \[\text{CIR (1985):}\;\; \text{dr} = a (b - r) \text{dt} + \sigma \;\text{sqrt} (r) \text{dW}\]

In CIR the volatility shrinks as the rate approaches zero, so the rate stays positive when 2ab ≥ σ² (the Feller condition) and can otherwise touch zero; in Vasicek it can turn negative. The models describe a continuously compounded short rate, so the yields are converted to continuous compounding first (US bill yields from their bond-equivalent quote). Both give bond prices, and so a full zero-coupon curve, in closed form. The parameters are estimated by regressing the change of the rate on its level over the period (CIR on the changes scaled by the square root of the rate, which needs a rate above zero throughout). The half-life is the time it takes to close half the gap to the long-run mean, ln(2) / a.

A model calibrated to the history does not reproduce today’s curve, which is what the comparison with the market shows; the Hull-White model of get_short_rate_simulation adds a time-varying mean that does.

For more information, see the following papers:

  • Vasicek, O. (1977). “An Equilibrium Characterization of the Term Structure.” Journal of Financial Economics, 5(2), 177-188.
  • Cox, J.C., Ingersoll, J.E. and Ross, S.A. (1985). “A Theory of the Term Structure of Interest Rates.” Econometrica, 53(2), 385-407.

Also known as: short rate model, mean reversion of interest rates, Vasicek model, CIR model, equilibrium term structure model.

Short-Rate Model in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_short_rate_model as shown below.

from financetoolkit import FixedIncome

fixedincome = FixedIncome(start_date='2000-01-01', end_date='2026-10-23')

fixedincome.get_short_rate_model(short_rate='6M')

Or, after setting up the Finance Toolkit MCP, ask:

What do Vasicek and CIR models calibrated to the US 6-month Treasury yield from 2000 to October 2026 say about mean reversion, the long-run rate and the zero-coupon curve?

Which returns:

Parameter Vasicek CIR Market
Speed of Mean Reversion 0.0873 0.1481 nan
Long-Run Mean 0.0144 0.017 nan
Volatility 0.0059 0.0558 nan
Current Rate 0.0425 0.0425 0.0425
Half-Life 7.9398 4.6816 nan
Zero Rate 1M 0.0424 0.0424 0.041
Zero Rate 1.5M 0.0424 0.0423 0.041
Zero Rate 2M 0.0423 0.0422 0.0415
Zero Rate 3M 0.0422 0.0421 0.042
Zero Rate 4M 0.0421 0.0419 0.0427
Zero Rate 6M 0.0419 0.0416 0.0425
Zero Rate 1Y 0.0413 0.0407 0.0439
Zero Rate 2Y 0.0402 0.039 0.0464
Zero Rate 3Y 0.0391 0.0375 0.047
Zero Rate 5Y 0.0371 0.0347 0.0477
Zero Rate 7Y 0.0353 0.0324 0.0485
Zero Rate 10Y 0.0328 0.0297 0.0497
Zero Rate 20Y 0.0269 0.0242 0.0548
Zero Rate 30Y 0.0232 0.0216 0.0534

Parameters

get_short_rate_model accepts the following parameters.

ParameterTypeDescriptionExample
countrystrThe country, see get_government_bond_yield_curve. Defaults to “United States”."US"
short_ratestrThe maturity of the yield used as the short rate, such as “1M”, “3M” or “6M”. Defaults to “3M”."3M"
periodstrWhether to calibrate on daily, weekly or monthly rates. Defaults to “daily”."weekly"
roundingint | NoneThe number of decimals to round the results to. Defaults to None.2
Share