MathFin
Map / Valuation · Credit / MathFin.Models.Credit.DefaultTime

The credit default swap priced against a default time

MathFin.Models.Credit.DefaultTimeMSC 91G40JEL G12JEL G33 source

Contracts/Instruments/Credit.lean writes the CDS on a payment grid as a contract that observes the default indicator N u = 1{τ ≤ u}. Here a default time τ : Ω → ℝ is the model: defaultIndicator τ reads N off it, so each leg is a finite sum of discounted values 𝔼[N u] = Q(τ ≤ u). Given the survival function S (Q(τ ≤ u) = 1 − S u) the legs are worth

  • the premium leg, s times the grid annuity ∑ D(tᵢ₊₁) (tᵢ₊₁ − tᵢ) S(tᵢ₊₁) (cdsAnnuityGrid, value_cdsPremiumLeg);
  • the protection leg, 1 − R times the grid losses ∑ D(tᵢ₊₁) (S tᵢ − S tᵢ₊₁) (cdsLossesGrid, value_cdsProtectionLeg);

and the protection buyer's CDS is worth their difference (value_cdsBuyer), zero exactly at the grid par spread (1 − R) · losses / annuity (value_cdsBuyer_eq_zero_iff). These are the discrete analogues of Cox.cdsAnnuity, Cox.cdsLosses and Cox.cdsFairSpreadTV.

The Cox default time of Models/Credit/Cox.lean, built by inverting a unit-exponential clock through the cumulative hazard, has S = hazardSurvival h (cox_cdf_timeVarying), so under it the CDS contract is worth the grid legs of the hazard curve (value_cdsBuyer_coxDefaultTime). The protection leg paid at τ itself is the contract cdsProtectionAtDefault (Contract.payAtHit on the default indicator): its value is (1 − R)·𝔼[D(τ)·1{τ ≤ T}] (value_cdsProtectionAtDefault), which under the Cox default time at a flat rate is Cox.protectionLeg (value_cdsProtectionAtDefault_coxDefaultTime, by CVA.protectionLeg_eq_integral_coxDefaultTime). Against the continuous legs: with no discounting the grid losses on any grid from 0 to T telescope to the default probability 1 − S(T), which is Cox.cdsLosses 0 h T (cdsLossesGrid_one_eq_cdsLosses). With discounting the grid legs converge to the continuous ones as the mesh goes to zero (Models/Credit/DefaultTimeMesh.lean).

Main definitions

  • defaultIndicator — the process N u = 1{τ ≤ u} as a model.
  • cdsAnnuityGrid, cdsLossesGrid, cdsParSpreadGrid.

Main results

  • value_cdsPremiumLeg, value_cdsProtectionLeg, value_cdsBuyer, value_cdsBuyer_eq_zero_iff.
  • value_cdsBuyer_coxDefaultTime, cdsLossesGrid_one_eq_cdsLosses.
  • hitTime_defaultIndicator, pathPV_cdsProtectionAtDefault, value_cdsProtectionAtDefault, value_cdsProtectionAtDefault_coxDefaultTime — the protection leg paid at the default time.
  • value_scale_cdsProtectionAtDefault_sub_pay — recovery paid at default vs at maturity: the difference is ρ·𝔼[(D(τ) − D(T))·1{τ ≤ T}].

References

Tags

credit default swap, default time, survival probability, par spread, Cox process, hazard rate, protection leg, MSC 91G40, JEL G12, JEL G33

Import neighbourhood

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

Corpus entries

mf-contract-cds-cox-default-time · contracts.json · full statement
A Credit Default Swap on a Payment Grid Under the Cox Default Time

The protection buyer's credit default swap on a payment grid t_0, t_1, ..., t_n, written as a contract -- at t_(i+1) receive (1 - R)(N(t_(i+1)) - N(t_i)) and pay s (t_(i+1) - t_i)(1 - N(t_(i+1))), where N(u) = 1{tau <= u} is the default indicator -- is worth, against the Cox default time tau built from a unit-exponential clock xi by inverting the cumulative hazard of a continuous positive intensity h with divergent integral, and for any discount factor D: (1 - R) sum_{i<n} D(t_(i+1)) (S(t_i) - S(t_(i+1))) - s sum_{i<n} D(t_(i+1)) (t_(i+1) - t_i) S(t_(i+1)), where S = hazardSurvival h. Default is paid at the end of the period it falls in, not at tau, and no premium accrues between the last payment date and a default: this is the grid discretisation of the continuous legs, not those legs.

mf-contract-cds-protection-at-default · contracts.json · full statement
The CDS Protection Leg Paid at the Default Time Is the Continuous Protection Leg

The protection leg of a credit default swap written as a contract that pays at the default time: cdsProtectionAtDefault T R pays (1 - R) N_T at the first time the default indicator N u = 1{tau <= u} reaches 1 (Contract.payAtHit), that is at tau if tau <= T, and nothing otherwise. Against the Cox default time tau of a continuous positive intensity h with divergent cumulative hazard (a unit-exponential clock xi inverted through the cumulative hazard), discounted at the flat rate r (D u = e^{-ru}), it is worth Cox.protectionLeg R r h T = (1 - R) int_0^T e^{-rs} h(s) S(s) ds, S = hazardSurvival h. The default indicator is the observed underlying; the recovery is a constant and the discount rate is deterministic.

mf-contract-cds-recovery-timing · contracts.json · full statement
Recovery Paid at the Default Time Versus at the Horizon

For a measurable default time tau, a discount curve D whose discounted default payment D(tau) 1{tau <= T} is integrable under Q, and a recovery payment rho, the contract that pays rho at the default time if tau <= T (cdsProtectionAtDefault T 0 scaled by rho, a Contract.payAtHit on the default indicator N u = 1{tau <= u}) is worth rho E_Q[(D(tau) - D(T)) 1{tau <= T}] more than the contract that pays rho at the horizon T if tau <= T (pay T (rho N_T)): the value difference is the discount-curve gap between tau and T, weighted by the default event. The discount curve is deterministic; the integrability hypothesis holds for any curve that is measurable and bounded on [0, T].

Declarations 20

defMathFin.Contracts.defaultIndicatorsource
{Ω : Type u_1} → (Ω → ℝ) → Unit → NNReal → Ω → ℝ

The default indicator process of a default time τ, N u = 1{τ ≤ u}, as the model of the single underlying ().

theoremMathFin.Contracts.defaultIndicator_eq_zero_or_onesource
∀ {Ω : Type u_1} (τ : Ω → ℝ) (u : NNReal) (ω : Ω), defaultIndicator τ () u ω = 0 ∨ defaultIndicator τ () u ω = 1

The default indicator takes the values 0 and 1.

defMathFin.Contracts.cdsAnnuityGridsource
(NNReal → ℝ) → (ℝ → ℝ) → (ℕ → NNReal) → ℕ → ℝ

The grid annuity (premium-leg kernel) of the survival function S on the grid t: ∑ D(tᵢ₊₁) (tᵢ₊₁ − tᵢ) S(tᵢ₊₁).

defMathFin.Contracts.cdsLossesGridsource
(NNReal → ℝ) → (ℝ → ℝ) → (ℕ → NNReal) → ℕ → ℝ

The grid losses (protection-leg kernel): ∑ D(tᵢ₊₁) (S tᵢ − S tᵢ₊₁), the discounted probabilities of defaulting in each period.

defMathFin.Contracts.cdsParSpreadGridsource
(NNReal → ℝ) → (ℝ → ℝ) → (ℕ → NNReal) → ℝ → ℕ → ℝ

The grid par spread (1 − R) · losses / annuity.

theoremMathFin.Contracts.integrable_defaultIndicatorsource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {Q : Measure Ω} [IsProbabilityMeasure Q] {τ : Ω → ℝ}, Measurable τ → ∀ (u : NNReal), Integrable (defaultIndicator τ () u) Q

The default indicator at a date is integrable under a probability measure.

theoremMathFin.Contracts.value_cdsPremiumLegsource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {Q : Measure Ω} [IsProbabilityMeasure Q] {τ : Ω → ℝ} {S : ℝ → ℝ}, Measurable τ → (∀ (u : NNReal), Q.real {ω | τ ω ≤ ↑u} = 1 - S ↑u) → ∀ (D : NNReal → ℝ) (t : ℕ → NNReal) (s : ℝ) (n : ℕ), Contract.value Q (fun t x => D t) (defaultIndicator τ) (cdsPremiumLeg t s n) = s * cdsAnnuityGrid D S t n

The premium leg is s times the grid annuity. Against a default time τ with survival function S (Q(τ ≤ u) = 1 − S u), the premium leg of the CDS is worth s times cdsAnnuityGrid D S t n.

used by 1: value_cdsBuyer
theoremMathFin.Contracts.value_cdsProtectionLegsource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {Q : Measure Ω} [IsProbabilityMeasure Q] {τ : Ω → ℝ} {S : ℝ → ℝ}, Measurable τ → (∀ (u : NNReal), Q.real {ω | τ ω ≤ ↑u} = 1 - S ↑u) → ∀ (D : NNReal → ℝ) (t : ℕ → NNReal) (R : ℝ) (n : ℕ), Contract.value Q (fun t x => D t) (defaultIndicator τ) (cdsProtectionLeg t R n) = (1 - R) * cdsLossesGrid D S t n

The protection leg is 1 − R times the grid losses.

theoremMathFin.Contracts.value_cdsBuyersource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {Q : Measure Ω} [IsProbabilityMeasure Q] {τ : Ω → ℝ} {S : ℝ → ℝ}, Measurable τ → (∀ (u : NNReal), Q.real {ω | τ ω ≤ ↑u} = 1 - S ↑u) → ∀ (D : NNReal → ℝ) (t : ℕ → NNReal) (s R : ℝ) (n : ℕ), Contract.value Q (fun t x => D t) (defaultIndicator τ) (cdsBuyer t s R n) = (1 - R) * cdsLossesGrid D S t n - s * cdsAnnuityGrid D S t n

The protection buyer's CDS is worth protection less premium: (1 − R) times the grid losses minus s times the grid annuity.

theoremMathFin.Contracts.value_cdsBuyer_eq_zero_iffsource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {Q : Measure Ω} [IsProbabilityMeasure Q] {τ : Ω → ℝ} {S : ℝ → ℝ}, Measurable τ → (∀ (u : NNReal), Q.real {ω | τ ω ≤ ↑u} = 1 - S ↑u) → ∀ (D : NNReal → ℝ) (t : ℕ → NNReal) (s R : ℝ) (n : ℕ), cdsAnnuityGrid D S t n ≠ 0 → (Contract.value Q (fun t x => D t) (defaultIndicator τ) (cdsBuyer t s R n) = 0 ↔ s = cdsParSpreadGrid D S t R n)

The buyer's CDS is worth zero exactly at the grid par spread (nonzero annuity).

theoremMathFin.Contracts.hitTime_defaultIndicatorsource
∀ {Ω : Type u_1} (τ : Ω → ℝ) (ω : Ω), (scenarioAt (defaultIndicator τ) ω).hitTime () (Set.Ici 1) = ↑(τ ω).toNNReal

The default indicator hits [1, ∞) at the default time: the first time the observed process N u = 1{τ ≤ u} reaches 1 is τ, or 0 if τ is negative.

theoremMathFin.Contracts.pathPV_cdsProtectionAtDefaultsource
∀ {Ω : Type u_1} (D : NNReal → ℝ) (τ : Ω → ℝ) (T : NNReal) (R : ℝ) (ω : Ω), Contract.pathPV D (scenarioAt (defaultIndicator τ) ω) (cdsProtectionAtDefault T R) = D (τ ω).toNNReal * ((1 - R) * defaultIndicator τ () T ω)

The path value of the protection leg paid at the default time: (1 − R) discounted at τ, if default happens by T.

theoremMathFin.Contracts.value_cdsProtectionAtDefaultsource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} (D : NNReal → ℝ) (τ : Ω → ℝ) (T : NNReal) (R : ℝ), Contract.value μ (fun t x => D t) (defaultIndicator τ) (cdsProtectionAtDefault T R) = (1 - R) * ∫ (ω : Ω), (Set.Iic ↑T).indicator (fun s => D s.toNNReal) (τ ω) ∂μ

The protection leg paid at the default time is worth (1 − R)·𝔼[D(τ)·1{τ ≤ T}], for any pricing measure, default time and discount curve (D is read at τ made nonnegative). It is an identity of Bochner integrals with no integrability assumed: when the integrand is not integrable both sides are 0.

theoremMathFin.Contracts.value_scale_cdsProtectionAtDefault_sub_paysource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {Q : Measure Ω} [IsProbabilityMeasure Q] {τ : Ω → ℝ}, Measurable τ → ∀ {D : NNReal → ℝ} {T : NNReal}, Integrable (fun ω => (Set.Iic ↑T).indicator (fun s => D s.toNNReal) (τ ω)) Q → ∀ (ρ : ℝ), Contract.value Q (fun t x => D t) (defaultIndicator τ) (Contract.scale ρ (cdsProtectionAtDefault T 0)) - Contract.value Q (fun t x => D t) (defaultIndicator τ) (Contract.pay T ((Payoff.const ρ).mul (Payoff.obs () T))) = ρ * ∫ (ω : Ω), (Set.Iic ↑T).indicator (fun s => D s.toNNReal - D T) (τ ω) ∂Q

Recovery paid at default vs at maturity. The loss ρ paid at the default time (the protection leg cdsProtectionAtDefault T 0 scaled by ρ) is worth ρ·𝔼[(D(τ) − D(T))·1{τ ≤ T}] more than the same ρ paid at the horizon T on default by T (ρ·N_T at T): the timing difference is the discount-curve gap between τ and T. The only hypothesis is that the discounted default payment D(τ)·1{τ ≤ T} is integrable (it is, for a discount curve bounded and measurable on [0, T]); without it value_cdsProtectionAtDefault is 0 while the other leg is not.

theoremMathFin.Contracts.measureReal_coxDefaultTime_lesource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {h : ℝ → ℝ}, Continuous h → (∀ (s : ℝ), 0 < h s) → Filter.Tendsto (cumHazard h) Filter.atTop Filter.atTop → ∀ {ξ : Ω → ℝ}, Measurable ξ → Measure.map ξ μ = expMeasure 1 → ∀ (u : NNReal), μ.real {ω | coxDefaultTime h ξ ω ≤ ↑u} = 1 - hazardSurvival h ↑u

The Cox default time has survival function hazardSurvival h, in the form the CDS legs consume: μ(τ ≤ u) = 1 − S u for every date u ≥ 0.

theoremMathFin.Contracts.value_cdsBuyer_coxDefaultTimesource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {h : ℝ → ℝ}, Continuous h → (∀ (s : ℝ), 0 < h s) → Filter.Tendsto (cumHazard h) Filter.atTop Filter.atTop → ∀ {ξ : Ω → ℝ}, Measurable ξ → Measure.map ξ μ = expMeasure 1 → ∀ (D : NNReal → ℝ) (t : ℕ → NNReal) (s R : ℝ) (n : ℕ), Contract.value μ (fun t x => D t) (defaultIndicator (coxDefaultTime h ξ)) (cdsBuyer t s R n) = (1 - R) * cdsLossesGrid D (hazardSurvival h) t n - s * cdsAnnuityGrid D (hazardSurvival h) t n

The CDS contract under the Cox default time: the protection buyer's CDS on the grid t, priced against the default time built from a unit-exponential clock ξ by inverting the cumulative hazard of a continuous positive intensity h, is worth (1 − R) times the grid losses of the hazard curve less s times its grid annuity.

theoremMathFin.Contracts.cdsLossesGrid_onesource
∀ (S : ℝ → ℝ) (t : ℕ → NNReal) (n : ℕ), cdsLossesGrid (fun x => 1) S t n = S ↑(t 0) - S ↑(t n)

Without discounting the grid losses telescope to the default probability, whatever the grid.

theoremMathFin.Contracts.cdsLossesGrid_one_eq_cdsLossessource
∀ {h : ℝ → ℝ}, Continuous h → ∀ (t : ℕ → NNReal) (n : ℕ), t 0 = 0 → cdsLossesGrid (fun x => 1) (hazardSurvival h) t n = cdsLosses 0 h ↑(t n)

The undiscounted grid losses are the continuous ones: on any grid from t 0 = 0 to t n, the undiscounted grid losses of the hazard curve equal Cox.cdsLosses 0 h (t n), the integral of the default density.

theoremMathFin.Contracts.ae_pos_coxDefaultTimesource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {h : ℝ → ℝ}, Continuous h → (∀ (s : ℝ), 0 < h s) → Filter.Tendsto (cumHazard h) Filter.atTop Filter.atTop → ∀ {ξ : Ω → ℝ}, Measurable ξ → Measure.map ξ μ = expMeasure 1 → ∀ᵐ (ω : Ω) ∂μ, 0 < coxDefaultTime h ξ ω

The Cox default time is a.s. positive: its law has no atom at 0, μ(τ ≤ 0) = 1 − S(0) = 0.

theoremMathFin.Contracts.value_cdsProtectionAtDefault_coxDefaultTimesource
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : Measure Ω} [IsProbabilityMeasure μ] {h : ℝ → ℝ}, Continuous h → (∀ (s : ℝ), 0 < h s) → Filter.Tendsto (cumHazard h) Filter.atTop Filter.atTop → ∀ {ξ : Ω → ℝ}, Measurable ξ → Measure.map ξ μ = expMeasure 1 → ∀ (r R : ℝ) (T : NNReal), Contract.value μ (fun u x => Real.exp (-(r * ↑u))) (defaultIndicator (coxDefaultTime h ξ)) (cdsProtectionAtDefault T R) = protectionLeg R r h ↑T

The protection leg paid at the default time, under the Cox default time, is the continuous protection leg Cox.protectionLeg: for a continuous positive intensity h with divergent cumulative hazard, the contract that pays 1 − R at the first time the default indicator reaches 1, if that is by T, discounted at the flat rate r (D u = e^{−ru}), is worth (1 − R) ∫₀ᵀ e^{−rs} h(s) S(s) ds.