MathFin
Map / Valuation · Interest rates

Valuation · Interest rates

bonds and curves, durations, short-rate and affine models, HJM, forward measures, caps

54
modules
539
declarations
97
corpus entries · 94 full

Module graph

An arrow runs from a module to one that imports it (implied imports omitted). Hover for a module's title, click to open it.

Modules

Rates

ABCD volatility prices through Black-76 at its root-mean-square

Models/Rates/ABCDVolatility.lean gives the ABCD instantaneous volatility f(τ) = (a + bτ)e^{−cτ} + d of a forward rate as a function of its time to maturity τ, and the closed form of its integrated variance v(T) = ∫₀ᵀ…
MathFin.Models.Rates.ABCDBlack76
9 declarations · 2 corpus entries

ABCD instantaneous volatility — closed-form integrated variance

The ABCD parametrization (Rebonato) is the standard humped instantaneous-volatility shape used for forward rates / caplets in LIBOR market models, as a function of the time to maturity τ:
MathFin.Models.Rates.ABCDVolatility
5 declarations

Affine bond prices solve the term-structure PDE

In a one-factor affine short-rate model dr = κ(θ − r) dt + √(α + β r) dW, bond prices take the form P = exp(A(τ) − B(τ)·r) in the time to maturity τ, with loadings solving the Riccati system
MathFin.Models.Rates.AffineTermStructurePDE
8 declarations · 3 corpus entries

Bond forward price from no-arbitrage

A forward contract on a coupon bond, struck at forward price X, maturing at the forward-expiry date t_fe, has zero time-0 value exactly when discounting the strike X paid at t_fe back to today equals the bond's price…
MathFin.Models.Rates.BondForward
2 declarations · 1 corpus entries

Curve bootstrapping by bracketing search

Every curve starts as instrument quotes and ends as discount factors; the algorithm between is bootstrapping — solve one instrument at a time for its new discount factor, with the already-solved factors held fixed.
MathFin.Models.Rates.Bootstrapping
40 declarations · 2 corpus entries

The CIR loadings solve their term-structure equations

The Cox–Ingersoll–Ross bond price has the affine form P(0, T) = exp(A(T) − B(T) · r₀), so the A here is the logarithm of the multiplicative factor that vasicekBondA and Brigo–Mercurio call A.
MathFin.Models.Rates.CIRRiccati
12 declarations · 2 corpus entries

The mean of a sum of two squared OU fluctuations (the Feller-borderline CIR mean)

Each component is an Ornstein–Uhlenbeck fluctuation in its Wiener representation,
MathFin.Models.Rates.CIRSquaredOU
8 declarations · 1 corpus entries

The CMS par-rate functional: convexity, the annuity measure, a Jensen gap

A constant-maturity swap leg pays, at the fixing date T, the then-prevailing par swap rate — a nonlinear functional of the curve state, discounted through an annuity that is itself random; the gap between its value and…
MathFin.Models.Rates.CMS
16 declarations · 2 corpus entries

CMS contracts, priced under the annuity measure

A constant-maturity swap pays, at a fixing date T₀, the then-prevailing par swap rate S = (P(T₀, T₀) − P(T₀, Tₙ)) / A(T₀) of a swap on the dates T 1, …, T n, with annuity A = δ Σᵢ P(T₀, Tᵢ).
MathFin.Models.Rates.CMSContract
39 declarations · 7 corpus entries

Caplets and caps, on the bond prices of a stochastic discount factor

bondPrice Q 𝓕 D t T = 𝔼_Q[D T | 𝓕 t] / D t is the zero-coupon bond price P(t, T) at time t, for any stochastic discount factor D (Pricing/BondPrice.lean): the bond prices that floating payoffs need.
MathFin.Models.Rates.Caplet
25 declarations · 3 corpus entries

Clean price and accrued interest, on- and between-coupon dates

A coupon bond's quoted clean price omits the interest that has accrued since the last coupon date; the dirty (invoiced) price is what actually changes hands.
MathFin.Models.Rates.CleanPriceAccrued
10 declarations · 2 corpus entries

Second-order bond portfolio immunization

The first-order immunization in Immunization.lean only neutralizes ∂(A - L)/∂r at the current rate.
MathFin.Models.Rates.ConvexityImmunization
6 declarations · 4 corpus entries

Convexity as the second derivative of bond price (first-principles)

For a coupon bond with discrete-compounded yield y and cashflows c_i at integer times t_i,
MathFin.Models.Rates.ConvexitySensitivity
4 declarations

Coupon bonds, annuities, and rate-curve identities

Extensions of the deterministic-short-rate framework in ZCB.lean:
MathFin.Models.Rates.CouponBonds
5 declarations · 3 corpus entries

Bonds and swaps on a deterministic curve

On a deterministic discount curve the library's fixed-income closed forms are the values of contracts.
MathFin.Models.Rates.DeterministicCurve
11 declarations · 5 corpus entries

The deterministic-rates bond market

The simplest term-structure model as a Market: a deterministic bank account N (N t = e^{rt} for a flat rate) as numéraire, and zero-coupon bonds P(t, τᵢ) = N t / N τᵢ as the traded assets (deterministicMarket).
MathFin.Models.Rates.DeterministicMarket
13 declarations · 4 corpus entries

Duration as price sensitivity (first-principles derivation)

For a coupon bond with discrete-compounded yield y and cashflows c_i at times t_i ∈ ℕ,
MathFin.Models.Rates.DurationSensitivity
3 declarations

Forward-rate agreement

The simple forward rate over one accrual period is
MathFin.Models.Rates.FRA
5 declarations · 1 corpus entries

The Black–Scholes forward price under the T-forward measure

The T-forward measure forwardMeasure Q B (the zero-coupon bond as numéraire, bank account B), its probability and the bond-numéraire change of measure forwardMeasure_price are in Pricing/ForwardMeasure.lean.
MathFin.Models.Rates.ForwardMeasure
1 declarations · 1 corpus entries

Forward rate from a non-flat spot-rate curve

Given a continuously-compounded spot-rate curve T ↦ R(T) with R'(T), the zero-coupon bond price is P(T) = exp(−T · R(T)), so
MathFin.Models.Rates.ForwardRate
2 declarations · 1 corpus entries

Bond prices at `t > 0` in the GSR model

For the GSR discount factor D t = exp(−∫₀ᵗ r) (gsrIntegratedRate, two-piece volatility) and the natural filtration of the driving Brownian motion, bondPrice is the affine form of gsrBondPrice_condExp…
MathFin.Models.Rates.GSRBond
1 declarations · 1 corpus entries

The GSR bond price at a time `t > 0`

Models/Rates/GSRPiecewiseVol.lean prices the zero-coupon bond at time 0 when the volatility is σ₁ up to the breakpoint T* and σ₂ after it.
MathFin.Models.Rates.GSRBondPriceAt
16 declarations · 1 corpus entries

GSR (Gaussian short rate) with two-piece piecewise-constant volatility

The GSR model (QuantLib's GsrProcess/one-factor Gsr model) generalizes Vasicek/ Hull-White by letting the diffusion coefficient be piecewise constant in calendar time rather than a single scalar — the feature actually…
MathFin.Models.Rates.GSRPiecewiseVol
15 declarations · 1 corpus entries

The Heath–Jarrow–Morton model bundle

The HJM model describes the whole forward-rate curve f(t,T), t ≤ T, as a family of Itô processes in t, one for each fixed maturity T: f(t,T) = f(0,T) + ∫₀ᵗ α(s,T) ds + ∫₀ᵗ σ(s,T) dB_s, driven by the Brownian motion B…
MathFin.Models.Rates.HJM
26 declarations

Fixed cash flows in the Heath–Jarrow–Morton model

An HJM.HJMModel has a short rate r(t) = f(t,t) and so a stochastic discount factor D t = exp(-∫₀ᵗ r), the inverse of its bank account.
MathFin.Models.Rates.HJMBond
4 declarations · 2 corpus entries

Bond prices at `t > 0` in the Hull–White model

For the Hull–White discount factor D t = exp(−∫₀ᵗ r) (HullWhite.bondRate, continuous forcing θ) and the natural filtration of the driving Brownian motion, bondPrice is the affine form of the time-0 price of the forcing…
MathFin.Models.Rates.HullWhiteBond
1 declarations · 1 corpus entries

The Hull–White bond price at a time `t > 0`

Models/Rates/HullWhiteCalibration.lean prices the zero-coupon bond at time 0, P(0, T) = A(T)·exp(−B(T) r₀) with the forcing θ in A.
MathFin.Models.Rates.HullWhiteBondPriceAt
5 declarations · 1 corpus entries

Hull–White short rates: deterministic part, Gaussian law, affine bonds, calibration

The Hull–White model dr_t = (θ(t) − κ·r_t) dt + σ·dB_t with κ > 0 and deterministic θ (continuity hypotheses stated where the FTC needs them), obtained by generalizing the proved Vasicek template of…
MathFin.Models.Rates.HullWhiteCalibration
34 declarations · 1 corpus entries

Bond portfolio immunization under a deterministic short rate

A portfolio of zero-coupon bonds with face values w i and maturities T i, indexed by a finite set s:
MathFin.Models.Rates.Immunization
6 declarations · 4 corpus entries

Inflation is FX: the zero-coupon inflation swap and the YoY convexity

The Jarrow–Yildirim identification reads the price index I_t as an exchange rate (nominal currency per real good) and the index-linked bond as a bond denominated in goods.
MathFin.Models.Rates.Inflation
7 declarations · 1 corpus entries

Vanilla interest-rate swap

The annuity, the payer-swap value, the par swap rate, and the par identity — the swap is worth zero iff the fixed rate is the par rate.
MathFin.Models.Rates.InterestRateSwap
6 declarations · 1 corpus entries

Jamshidian: the zero-coupon bond put and the caplet in the Gaussian short-rate models

A put on P(T₀, T₁) struck at k expiring at T₀ is worth P(0, T₀) times the put's expectation under the T₀-forward measure (forwardMeasure, the change of numéraire forwardMeasure_price).
MathFin.Models.Rates.Jamshidian
11 declarations · 7 corpus entries

Key-rate partials sum to the parallel-shift derivative

MacaulayModified prices a bond off a single flat yield, P(y) = Σ cᵢ / (1 + y)^{tᵢ} (bondPriceDisc), and DurationSensitivity differentiates it: P'(y) = -ModNum(y) (hasDerivAt_bondPriceDisc).
MathFin.Models.Rates.KeyRateDuration
7 declarations · 1 corpus entries

Loan amortization schedules: bullet, equal-principal and level-payment

All three schedules share the same per-period interest accrual on the outstanding balance B_{n-1},
MathFin.Models.Rates.LoanAmortization
10 declarations · 1 corpus entries

Macaulay vs modified duration under discrete compounding

For a bond with discrete-compounded yield y and cashflows c_i at times t_i ∈ ℕ, define the duration numerators
MathFin.Models.Rates.MacaulayModified
4 declarations · 1 corpus entries

Nelson-Siegel-Svensson yield-curve parametrization

The Nelson-Siegel (1987) and its Svensson (1994) four-term extension are closed-form exponential-basis parametrizations of the zero-coupon yield curve, fit by least squares to observed yields rather than recovered by…
MathFin.Models.Rates.NelsonSiegelSvensson
10 declarations

The OU Hermite modes decay at their eigenvalues under the Vasicek law

Probability/Brownian/SDE/OUSpectral.lean proves, as polynomial algebra, that the scaled Hermite polynomials q_n(x) = He_n(x/s) are eigenfunctions of the OU generator L p = −κx·p' + (σ²/2)·p'' at the stationary scale…
MathFin.Models.Rates.OUHermiteVasicek
4 declarations · 1 corpus entries

Backward-looking (compounded overnight) caplets: the variance-damping time

A caplet on a compounded overnight rate over an accrual period [τ₀, τ₁] pays (R(τ₁) − K)⁺ at τ₁, where R(t) is the conditional expectation of the compounded rate under the τ₁-forward measure.
MathFin.Models.Rates.OvernightCompounding
10 declarations · 1 corpus entries

Periodic compounding against the continuously compounded bond

An account that accrues simple interest y per period and reinvests it grows like (1 + y) ^ n over n periods.
MathFin.Models.Rates.PeriodicCompounding
4 declarations

Stochastic discounting, and contracts in the Gaussian short-rate models

In a short-rate model the discount factor is a random variable at each time, D t = exp(−∫₀ᵗ r_s ds) (shortRateDiscount), and Contract.value Q D X c values a contract along each outcome by that outcome's discount path.
MathFin.Models.Rates.ShortRate
4 declarations · 3 corpus entries

The covariance-between-numéraires identity: timing adjustment and futures-forward basis

Two textbook corrections are the same identity.
MathFin.Models.Rates.TimingAdjustment
9 declarations · 2 corpus entries

Vasicek mean-reversion (deterministic part)

The Vasicek short-rate SDE is dr_t = κ(θ − r_t) dt + σ dW_t.
MathFin.Models.Rates.Vasicek
6 declarations · 2 corpus entries

Bond prices at `t > 0` in the Vasicek model

bondPrice Q 𝓕 D t T = 𝔼_Q[D T | 𝓕 t] / D t (Models/Rates/Caplet.lean) is the price at t of one unit paid at T, for any stochastic discount factor D.
MathFin.Models.Rates.VasicekBond
1 declarations · 1 corpus entries

The Vasicek zero-coupon bond price — the affine term structure

Models/Rates/VasicekSDEGaussian.lean derives the terminal short-rate law r_T ~ N(mean, var) from the Wiener representation of the Ornstein–Uhlenbeck solution.
MathFin.Models.Rates.VasicekBondPrice
22 declarations · 1 corpus entries

The Vasicek bond price at a time `t > 0`

Models/Rates/VasicekBondPrice.lean prices the zero-coupon bond at time 0, P(0, T) = 𝔼[exp(−∫₀ᵀ r_s ds)] = A(T)·exp(−B(T) r₀).
MathFin.Models.Rates.VasicekBondPriceAt
8 declarations · 1 corpus entries

The Vasicek bond market

The first Market of the library with a stochastic numéraire: the Vasicek short rate, the bank account N_t = exp ∫₀ᵗ r as numéraire, and the zero-coupon bond of maturity T as the traded asset (Rates.vasicekMarket).
MathFin.Models.Rates.VasicekMarket
16 declarations · 1 corpus entries

The Vasicek market price solves the Vasicek pricing PDE

The Vasicek bond market (Models/Rates/VasicekMarket.lean) and the term-structure PDE (Models/Rates/AffineTermStructurePDE.lean) share the loadings vasicekBondA, vasicekBondB: the market prices a unit payment at T at…
MathFin.Models.Rates.VasicekMarketPDE
1 declarations · 1 corpus entries

Vasicek short rate under a constant market price of risk

Textbook background (the SDEs are not formalized): with a constant market price of risk λ, the Vasicek short rate has real-world dynamics dr = κ(θ − r)dt + σ dB and, under the Girsanov measure Q_λ =…
MathFin.Models.Rates.VasicekMarketPriceOfRisk
7 declarations · 2 corpus entries

Vasicek SDE terminal-distribution form (stated, not derived) (phase 41)

The pre-existing Models/Rates/Vasicek.lean derives only the deterministic part of the Vasicek mean-reverting short-rate model (the σ = 0 ODE).
MathFin.Models.Rates.VasicekSDE
9 declarations

Vasicek terminal distribution of the Ornstein–Uhlenbeck solution (Itô→pricing bridge)

Models/Rates/VasicekSDE.lean posited the terminal law of the Vasicek short rate r_t ~ N(mean, var) as closed-form defs, in the BSCallHyp style.
MathFin.Models.Rates.VasicekSDEGaussian
9 declarations · 1 corpus entries

The Vasicek yield curve in Nelson–Siegel factors

The Nelson–Siegel slope factor s(x) = (1 − e^{−x})/x (nssSlope, Models/Rates/NelsonSiegelSvensson.lean) is the Vasicek rate loading per unit maturity: s(κτ) = B(τ)/τ with B = vasicekBondB (vasicekBondB_div_eq_nssSlope).
MathFin.Models.Rates.VasicekYieldNelsonSiegel
7 declarations · 2 corpus entries

The Vasicek bond price at vanishing mean reversion

Models/Rates/VasicekBondPrice.lean prices the zero-coupon bond under the Vasicek short rate, P(0,T) = exp(−M(T) + σ²V(T)/2) (vasicekBondPrice_eq), for every κ > 0.
MathFin.Models.Rates.VasicekZeroMeanReversionLimit
20 declarations · 2 corpus entries

Yield curve bootstrapping

Standard practitioner method to extract zero-coupon bond (ZCB) prices from a sequence of coupon-bond prices at successive maturities.
MathFin.Models.Rates.YieldCurve
5 declarations · 4 corpus entries

Fixed-income basics under a deterministic short rate

Closed-form identities for a zero-coupon bond with continuous compounding under a constant short rate r:
MathFin.Models.Rates.ZCB
10 declarations · 4 corpus entries