Simulates the future path of a country’s short-term interest rate with the Hull-White, Vasicek or Cox-Ingersoll-Ross model and summarizes the distribution of the paths per step: the mean and the 5th, 25th, 50th, 75th and 95th percentiles. Simulated rate paths value interest rate derivatives and path-dependent products (such as mortgages with prepayment), and stress the interest income of a balance sheet.

The speed of mean reversion and the volatility are calibrated to the history of the rate, see get_short_rate_model. In the Vasicek and CIR models the rate is pulled to the long-run mean of that history. The Hull-White (1990) model replaces it with a mean that varies over time and follows from today’s zero-coupon curve, so that the model reproduces the discount factors of that curve (its expected short rate lies above the forward rate by the convexity term σ² (1 - e^(-at))² / (2a²)):

dr = [θ(t) - a r] dt + σ dW, θ(t) = ∂f/∂t + a f(t) + σ² (1 - e^(-2at)) / (2a)

with f the instantaneous forward rate. The paths are simulated with an Euler scheme starting at today’s rate (CIR’s are kept at or above zero).

For more information, see the following paper:

  • Hull, J. and White, A. (1990). “Pricing Interest-Rate-Derivative Securities.” The Review of Financial Studies, 3(4), 573-592.

Also known as: interest rate simulation, Hull-White model, Monte Carlo short rate, interest rate scenarios.

Short-Rate Simulation in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_short_rate_simulation as shown below.

from financetoolkit import FixedIncome

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

simulation = fixedincome.get_short_rate_simulation(
    short_rate='6M', years=5, steps_per_year=1
)

simulation

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

Where could the US 6-month rate be in each of the next five years according to a Hull-White simulation fitted from 2000 to October 2026, with its mean and 5th to 95th percentiles?

Which returns:

Years Mean 5% 25% 50% 75% 95%
0 0.0425 0.0425 0.0425 0.0425 0.0425 0.0425
1 0.0489 0.0393 0.0449 0.0489 0.0529 0.0587
2 0.0483 0.035 0.0429 0.0483 0.0537 0.0614
3 0.0485 0.0332 0.0421 0.0484 0.0547 0.0643
4 0.0493 0.0324 0.0423 0.0492 0.0563 0.0666
5 0.0503 0.0322 0.0427 0.0503 0.0579 0.0689

Parameters

get_short_rate_simulation accepts the following parameters.

ParameterTypeDescriptionExample
modelstr“hull_white”, “vasicek” or “cir”. Defaults to “hull_white”."hull_white"
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"
yearsfloatThe horizon in years. Defaults to 10.10
steps_per_yearintThe steps per year. Defaults to 12.12
pathsintThe number of simulated paths. Defaults to 10,000.10,000
seedint | NoneThe random seed, None for a different simulation every time. Defaults to 0.42
roundingint | NoneThe number of decimals to round the results to. Defaults to None.2
Share