← Back to Learn
IV ExpertWeek 24 • Lesson 69Duration: 35 min

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

The yield curve plots interest rates against maturity: 1-month, 3-month, 6-month, 1-year, 2-year, 5-year, 10-year, 30-year. Normal curve: Upward sloping (longer maturities have higher yields). - Long-term lending is riskier, so investors demand higher compensation - This is the "normal" state of affairs Inverted curve: Shorter maturities have HIGHER yields. - Market expects rate CUTS (economy slowing) - Historically precedes recessions with roughly 70% accuracy - One of the most important signals for macro trading For FOREX trading specifically: - Interest rate DIFFERENTIALS drive long-term FX trends - Higher US rates vs EU leads EUR/USD to decline - Yield curve shape serves as a risk sentiment indicator - Could be added as an L1 feature for macro-aware signals

2Classic Rate Models

Vasicek (1977): dr=κ(θr)dt+σdWdr = \kappa(\theta - r)dt + \sigma dW - Mean-reverting (Ornstein-Uhlenbeck for rates) - κ\kappa = reversion speed, θ\theta = long-run rate, σ\sigma = volatility - Flaw: rates can go negative (seemed impossible pre-2014, then Europe did it) CIR (1985): dr=κ(θr)dt+σrdWdr = \kappa(\theta - r)dt + \sigma\sqrt{r}\,dW - Volatility proportional to r\sqrt{r} - Rates can't go negative (σr0\sigma\sqrt{r} \to 0 as r0r \to 0) - More realistic for positive rate environments Hull-White (1990): dr=[θ(t)ar]dt+σdWdr = [\theta(t) - ar]dt + \sigma dW - Time-dependent θ(t)\theta(t) fits today's yield curve exactly - Most popular for practical pricing HJM framework: Models the entire forward curve simultaneously. - Most general framework - Computationally intensive For practical use: you don't need to implement these models unless you're pricing interest rate derivatives. But understanding mean-reversion of rates helps explain why currencies trend (rate differentials persist), why carry trades work, and why central bank decisions move markets so dramatically.

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

python
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.