XVA Foundations

Interest Rate
Modeling

Prerequisites

To follow this series, you should be comfortable with: basic calculus (derivatives and integrals), probability (expectation and distributions), and interest rate basics (what a swap, coupon, and par rate are). No stochastic calculus background needed; it is built from scratch in IR-04.

Before computing any XVA, you need a rate model. That model must be built on real market data, calibrated to observable prices, and capable of simulating future rate paths. This series constructs every piece of that pipeline from scratch.

Starting from raw swap quotes, we extract discount factors via bootstrapping, extend to multi-curve frameworks, build a volatility surface from swaption prices, and introduce the stochastic models that let us treat rates as random. Hull-White is chosen, calibrated, and simulated. The series ends with the pricing of derivatives on simulated paths, ready to feed into the XVA engine.

The mathematics appears when it earns its place. Every equation has a plain-English interpretation alongside it. Where a proof would interrupt the argument, a reference is given. The goal is to give you the intuition and the structure that a textbook alone rarely provides.

Series at a glance
4
Chapters live
Prerequisites
  • Basic calculus: derivatives and integrals
  • Probability: expectations, normal distributions
  • What a derivative instrument is
  • Basic stochastic calculus required
The destination

After completing this series, you will be able to build, calibrate, simulate, and price with a complete interest rate model, ready to feed into a full XVA engine.

Series Roadmap
Interest Rate Modeling
IR-01 · Yield Curve IR-02 · Multi-Curve IR-03 · Swaptions IR-04 · Stochastic Rates IR-05 · Hull-White draft IR-06 · Calibration draft IR-07 · Monte Carlo draft IR-08 · Pricing draft
XVA Computation
XVA-00 · Intro XVA-01 · Exposure XVA-02 · Aggregation XVA-03 · CVA

Minimum path to CVA: IR-01IR-04IR-05 (draft)IR-07 (draft)IR-08 (draft)XVA-01XVA-03

The yield curve is the foundation of everything else in this series. Before we can price a derivative or simulate future rates, we need to extract discount factors from the swap rates the market actually quotes. This chapter builds that process from scratch: cash deposits, FRAs, and par swaps produce a complete set of bond prices P(0,T).

Discount factors from swaps
SOFR OIS bootstrapping
Zero curve construction
Read chapter →

After the 2008 crisis, a single curve no longer suffices. This chapter separates discounting (OIS) from rate projection (EURIBOR 3M), introduces the instrument hierarchy and node concept, and solves the coupled system via Newton-Raphson with PyTorch autograd for exact Jacobian computation.

Multi-curve framework
Newton-Raphson
AAD (autograd)
Read chapter →

A calibrated rate model needs a target. That target is the swaption market: a grid of option prices on interest rate swaps, across different expiries and tenors, which encodes the market's view of future rate uncertainty. This chapter derives the swaption price from first principles and explains what the volatility surface is actually telling you.

Black formula
Bachelier formula
Vol surface
Read chapter →

Rates do not move like clockwork. To price instruments with optionality or simulate future exposure, you need a model that treats rates as random. This chapter introduces mean-reverting stochastic processes using the Vasicek model as a concrete stepping stone, building the intuition you will need before Hull-White.

Mean reversion intuition
Vasicek model
Risk-neutral measure
Read chapter →

Hull-White fixes the central limitation of Vasicek: it can fit any initial yield curve exactly. This chapter derives the model, states the closed-form bond pricing formula that makes it computationally tractable, and extends it to three correlated factors motivated by a PCA of real yield curve history.

HW1F derivation
ZCB closed form
PCA → HW3F

A model with arbitrary parameters is a mathematical curiosity. To be useful, it must agree with the prices the market quotes. Calibration is the inverse problem: market prices in, model parameters out. This chapter explains the loss function, shows why a perfect fit is the wrong goal, and introduces the regularisation that keeps parameters stable day to day.

Loss function
Regularisation
Parameter stability

With a calibrated Hull-White model, the next step is to generate simulated rate paths. This chapter covers the Euler-Maruyama discretisation of the Hull-White SDE, path generation in PyTorch, variance reduction via antithetic and control variates, and the statistical error analysis that tells you when enough paths are enough.

Euler-Maruyama
Variance reduction
Convergence diagnostics

With a calibrated, simulated model in hand, the final step is to compute prices. This chapter covers mark-to-market evaluation on simulated paths, the pricing of vanilla and path-dependent instruments, and explains how simulation-based valuation connects to the analytical formulas from earlier chapters.

MtM on paths
Swaption pricing
Path-dependent value
Future Directions

The Interest Rate Modeling series focuses on single-currency rates. Extending the framework to other asset classes and risk factors is a natural next step:

  • FX dynamics : correlated multi-currency Hull-White with quanto adjustments
  • Heston equity model : stochastic volatility for equity and equity-linked derivatives
  • Inflation modelling : Jarrow-Yildirim or market model approaches for real/nominal rate dynamics

We begin with IR-01: extracting zero-coupon discount factors from observable swap market quotes. This discount curve is the foundation every subsequent chapter builds on.

Back to Writing

All views expressed are strictly personal and do not represent any past or current employer. Content is educational; nothing here constitutes financial, investment, or trading advice.