RATE Interest Rate Models
Modeling the yield curve — where macro meets mathematics
Learning Objectives
- •Understand the term structure of interest rates
- •Know the main interest rate models (Vasicek, CIR, Hull-White)
- •See how interest rates affect FX trading
Explain Like I'm 5
Interest rate models describe how rates change over time. This matters for pricing bonds, swaps, and anything with future cash flows. For FOREX, interest rate differentials are THE fundamental driver. If US rates go up relative to EU rates, USD tends to strengthen. Understanding rate models helps you understand currency movements at a deep structural level.
Think of It This Way
Interest rate models are like weather models for the financial world. Just as weather models predict temperature at different times in the future (the "temperature curve"), rate models predict interest rates at different maturities (the "yield curve"). Both use mathematical equations with stochastic elements.
1The Yield Curve
2Classic Rate Models
Key Formulas
Vasicek Model
Mean-reverting rate model. Same structure as the OU process from spread modeling. Rates are pulled toward theta with speed kappa and disturbed by noise sigma.
Hands-On Code
Vasicek Rate Simulation
import numpy as np
def vasicek_sim(r0, kappa, theta, sigma, T, n_steps=252, n_paths=1000):
"""Simulate interest rate paths under Vasicek model."""
dt = T / n_steps
rates = np.zeros((n_paths, n_steps + 1))
rates[:, 0] = r0
for t in range(n_steps):
Z = np.random.standard_normal(n_paths)
rates[:, t+1] = rates[:, t] + kappa*(theta - rates[:, t])*dt + sigma*np.sqrt(dt)*Z
terminal_rates = rates[:, -1]
print(f"=== VASICEK SIMULATION ===")
print(f"Parameters: kappa={kappa}, theta={theta}, sigma={sigma}")
print(f"Initial rate: {r0:.2%}")
print(f"Mean terminal rate: {terminal_rates.mean():.2%}")
print(f"95% CI: [{np.percentile(terminal_rates, 2.5):.2%}, {np.percentile(terminal_rates, 97.5):.2%}]")
print(f"Prob negative: {(terminal_rates < 0).mean():.1%}")
return rates
# rates = vasicek_sim(r0=0.05, kappa=0.3, theta=0.04, sigma=0.01, T=5)Simulates interest rate paths under the Vasicek model, demonstrating the mean-reverting dynamics and computing confidence intervals for terminal rates.
Knowledge Check
Q1.The US yield curve is inverted (2-year yield > 10-year yield). What does this typically signal?
Assignment
Simulate Vasicek rate paths and compute the distribution of rates at 1, 2, and 5 years. How does the distribution change with different kappa? Also plot historical yield curve shapes and identify inversions.