MathFin
Map / Valuation · Interest rates / MathFin.Models.Rates.DeterministicCurve

Bonds and swaps on a deterministic curve

MathFin.Models.Rates.DeterministicCurveMSC 91G30JEL E43JEL G12 source

On a deterministic discount curve the library's fixed-income closed forms are the values of contracts. A coupon bond is a schedule of fixed cash flows (fixedFlows, Contracts/Instruments/FixedIncome.lean), and in every model it is worth the sum of its discounted flows (value_fixedFlows_deterministic):

  • discounted at a yield y, with integer payment times, it is bondPriceDisc (pathPV_fixedFlows_yieldDiscount), the price the durations and convexities of Models/Rates/ are taken of;
  • n level payments on a grid of step Δt, discounted on the flat continuous curve zcb r 0, are annuityValue (pathPV_fixedFlows_zcb).

A swap on the curve P exchanges a fixed leg, δK at each payment date, for a floating leg that pays the simple forward rate the curve implies for each accrual period, δ · fraForwardRate (P Tᵢ) (P Tᵢ₊₁) δ at Tᵢ₊₁. The floating coupons are fixed by the curve, which is what makes this the deterministic-rates model, where a floating rate is known in advance. The floating leg telescopes to P(T₀) − P(Tₙ) (pathPV_floatingLeg), the fixed leg is K times the annuity (pathPV_fixedLeg), so the payer swap is worth payerSwapValue (value_payerSwap), and it is worth zero exactly at the par rate (value_payerSwap_eq_zero_iff). With one accrual period the swap is a forward-rate agreement, worth fraValue (value_payerSwap_one_eq_fraValue). With a stochastic discount the same contracts are priced in Models/Rates/ShortRate.lean.

Main definitions

  • yieldDiscount — discounting at a yield with annual compounding.
  • floatingLeg, fixedLeg, payerSwap — the legs of a swap on a deterministic curve.

Main results

  • pathPV_fixedFlows_yieldDiscount, pathPV_fixedFlows_zcb — bonds and annuities.
  • pathPV_floatingLeg, pathPV_fixedLeg, value_payerSwap, value_payerSwap_eq_zero_iff, value_payerSwap_one_eq_fraValue — swaps and FRAs.

References

  • P. Bilokon, The Contract Is Not the Model [Bilokon2026], the contract layer these values are read through
  • D. Brigo and F. Mercurio, Interest Rate Models --- Theory and Practice [BrigoMercurio2006], Section 1.5
  • Fabozzi, Bond Markets, Analysis and Strategies [FabozziBMAS], ch. 2
  • J. C. Hull, Options, Futures, and Other Derivatives [Hull], ch. 7

Tags

coupon bond, interest rate swap, par swap rate, forward rate agreement, annuity, floating leg, deterministic curve, MSC 91G30, JEL E43, JEL G12

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

mf-contract-coupon-bond-yield · contracts.json · full statement
A Coupon Bond as a Contract Is Worth bondPriceDisc at Its Yield

A schedule of fixed cash flows c_i at integer times t_i (i < n), written as a contract, is worth sum_i c_i / (1 + y)^(t_i) in every model under any probability measure, when discounted at the yield y with annual compounding, (1 + y)^(-tau), and 1 + y >= 0. This is the library's bondPriceDisc, the price its durations and convexities are taken of.

mf-contract-level-annuity-zcb · contracts.json · full statement
Level Payments as a Contract Are annuityValue on the Flat Curve

n payments of c at Delta t, 2 Delta t, ..., n Delta t, written as a contract and discounted on the flat continuous curve zcb r 0, have present value sum_{i<n} c e^(-r (i+1) Delta t), the library's annuityValue n c r Delta t, along every scenario.

mf-contract-payer-swap-value · contracts.json · full statement
A Payer Swap on a Deterministic Curve Is Worth payerSwapValue

On a deterministic discount curve P with nonzero discount factors at the payment dates T_0, ..., T_n and accrual delta != 0, the payer swap contract (receive at each T_(i+1) delta times the simple forward rate the curve implies for [T_i, T_(i+1)], pay delta K) is worth P(T_0) - P(T_n) - K A in every model under any probability measure, with A = delta sum_{i<n} P(T_(i+1)) the annuity: the floating leg telescopes. The floating coupons are fixed by the curve (deterministic rates).

mf-contract-payer-swap-par-rate · contracts.json · full statement
A Payer Swap Contract Is Worth Zero Exactly at the Par Rate

On a deterministic discount curve P with nonzero discount factors at the payment dates, accrual delta != 0 and a nonzero annuity A, the payer swap contract with fixed rate K has Contract.value 0 if and only if K = (P(T_0) - P(T_n)) / A, the par swap rate.

mf-contract-fra-value · contracts.json · full statement
A Forward-Rate Agreement Is a One-Period Payer Swap Worth fraValue

On a deterministic discount curve P with nonzero discount factors at T_0 and T_1 and accrual delta != 0, the one-period payer swap contract (receive delta F at T_1 with F = fraForwardRate (P T_0) (P T_1) delta, pay delta K) is worth fraValue delta (P T_1) F K = delta P(T_1) (F - K) in every model under any probability measure. The floating coupon is fixed by the curve (deterministic rates); the FRA is the n = 1 payer swap, not a separately defined contract.

Declarations 11

defMathFin.Contracts.yieldDiscountsource
ℝ → NNReal → ℝ

Discounting at a yield y with annual compounding, (1 + y)^{−τ}; a discount factor for 1 + y > 0.

theoremMathFin.Contracts.pathPV_fixedFlows_yieldDiscountsource
∀ {ι : Type u_1} {y : ℝ}, 0 ≤ 1 + y → ∀ (s : Scenario ι) (t : ℕ → ℕ) (c : ℕ → ℝ) (n : ℕ), Contract.pathPV (yieldDiscount y) s (fixedFlows (fun i => ↑(t i)) c n) = bondPriceDisc (Finset.range n) t c y

A coupon bond at a yield is bondPriceDisc. Discounted at the yield y, cash flows c i at integer times t i are worth ∑ cᵢ / (1 + y)^{tᵢ}.

theoremMathFin.Contracts.pathPV_fixedFlows_zcbsource
∀ {ι : Type u_1} (s : Scenario ι) (n : ℕ) (c r : ℝ) (Δt : NNReal), Contract.pathPV (fun τ => zcb r 0 ↑τ) s (fixedFlows (fun i => (↑i + 1) * Δt) (fun x => c) n) = annuityValue n c r ↑Δt

Level payments on the flat continuous curve are annuityValue. n payments of c at Δt, 2Δt, …, nΔt, discounted by zcb r 0, are worth ∑ c e^{−r(i+1)Δt}.

defMathFin.Contracts.floatingLegsource
{ι : Type u_1} → (NNReal → ℝ) → (ℕ → NNReal) → ℝ → ℕ → Contract ι

The floating leg of a swap on the deterministic discount curve P, with payment dates T 1, …, T n and accrual δ: at T (i + 1) it pays δ times the simple forward rate the curve implies for [T i, T (i + 1)].

defMathFin.Contracts.fixedLegsource
{ι : Type u_1} → (ℕ → NNReal) → ℝ → ℕ → ℝ → Contract ι

The fixed leg of a swap with fixed rate K: δK at each of T 1, …, T n.

defMathFin.Contracts.payerSwapsource
{ι : Type u_1} → (NNReal → ℝ) → (ℕ → NNReal) → ℝ → ℕ → ℝ → Contract ι

The payer swap: receive the floating leg, pay the fixed leg.

theoremMathFin.Contracts.pathPV_floatingLegsource
∀ {ι : Type u_1} {P : NNReal → ℝ} {T : ℕ → NNReal} {δ : ℝ} (n : ℕ), δ ≠ 0 → (∀ (i : ℕ), P (T i) ≠ 0) → ∀ (s : Scenario ι), Contract.pathPV P s (floatingLeg P T δ n) = P (T 0) - P (T n)

The floating leg telescopes. Discounted on its own curve, each forward-rate coupon is worth P(Tᵢ) − P(Tᵢ₊₁), so the leg is worth P(T₀) − P(Tₙ).

used by 1: value_payerSwap
theoremMathFin.Contracts.pathPV_fixedLegsource
∀ {ι : Type u_1} {P : NNReal → ℝ} {T : ℕ → NNReal} {δ : ℝ} (n : ℕ) (K : ℝ) (s : Scenario ι), Contract.pathPV P s (fixedLeg T δ n K) = K * annuity δ (fun i => P (T (i + 1))) (Finset.range n)

The fixed leg is worth K times the annuity of its payment dates.

used by 1: value_payerSwap
theoremMathFin.Contracts.value_payerSwapsource
∀ {ι : Type u_1} {Ω : Type u_2} {mΩ : MeasurableSpace Ω} {P : NNReal → ℝ} {T : ℕ → NNReal} {δ : ℝ} (n : ℕ) {Q : Measure Ω} [IsProbabilityMeasure Q] (X : ι → NNReal → Ω → ℝ), δ ≠ 0 → (∀ (i : ℕ), P (T i) ≠ 0) → ∀ (K : ℝ), Contract.value Q (fun t x => P t) X (payerSwap P T δ n K) = payerSwapValue (P (T 0)) (P (T n)) K (annuity δ (fun i => P (T (i + 1))) (Finset.range n))

A payer swap on a deterministic curve is worth payerSwapValue in every model: the floating leg P(T₀) − P(Tₙ) less K times the annuity.

theoremMathFin.Contracts.value_payerSwap_one_eq_fraValuesource
∀ {ι : Type u_1} {Ω : Type u_2} {mΩ : MeasurableSpace Ω} {P : NNReal → ℝ} {T : ℕ → NNReal} {δ : ℝ} {Q : Measure Ω} [IsProbabilityMeasure Q] (X : ι → NNReal → Ω → ℝ), δ ≠ 0 → (∀ (i : ℕ), P (T i) ≠ 0) → ∀ (K : ℝ), Contract.value Q (fun t x => P t) X (payerSwap P T δ 1 K) = fraValue δ (P (T 1)) (fraForwardRate (P (T 0)) (P (T 1)) δ) K

A forward-rate agreement is a one-period payer swap. With one accrual period [T₀, T₁] the swap's floating coupon is the simple forward rate fraForwardRate (P T₀) (P T₁) δ and the fixed coupon is δK, both paid at T₁; its value in every model is fraValue (Models/Rates/FRA.lean): δ · P(T₁) · (F − K).

theoremMathFin.Contracts.value_payerSwap_eq_zero_iffsource
∀ {ι : Type u_1} {Ω : Type u_2} {mΩ : MeasurableSpace Ω} {P : NNReal → ℝ} {T : ℕ → NNReal} {δ : ℝ} (n : ℕ) {Q : Measure Ω} [IsProbabilityMeasure Q] (X : ι → NNReal → Ω → ℝ), δ ≠ 0 → (∀ (i : ℕ), P (T i) ≠ 0) → annuity δ (fun i => P (T (i + 1))) (Finset.range n) ≠ 0 → ∀ (K : ℝ), Contract.value Q (fun t x => P t) X (payerSwap P T δ n K) = 0 ↔ K = parSwapRate (P (T 0)) (P (T n)) (annuity δ (fun i => P (T (i + 1))) (Finset.range n))

A payer swap is worth zero exactly at the par swap rate.