Package com.quantfinlib.credit
@NullMarked
package com.quantfinlib.credit
Credit curves, CDS pricing and credit spreads.
CreditCurve
bootstraps piecewise-constant hazard rates from CDS par spreads (the
credit analogue of the rates bootstrap — every input reprices exactly,
and the credit triangle spread ~ hazard * (1 - recovery) is
pinned by test); CdsPricer prices the
two legs, the par spread and the standardized-contract upfront, and
exposes the risky annuity (risky DV01);
CreditSpreads translates bond prices
into Z-spreads over the risk-free curve, the number that pairs with
the CDS par spread to form the cds-bond basis.
IsdaCdsModel is the ISDA CDS Standard
Model; MultiCurrencyExposureSimulator
simulates netting-set exposure (single- or multi-currency), and CvaApproximator
turns it into CVA, DVA, bilateral and wrong-way CVA. Research lane;
discretization choices stated on each class.-
ClassDescriptionCDS pricing off a
CreditCurve: the two legs, the par spread, and the upfront that post-2009 standardized contracts actually exchange.Credit curve — piecewise-constant hazard rates bootstrapped from CDS par spreads, the credit market's exact analogue ofYieldCurve's bootstrap: walk the quotes from shortest to longest, at each pillar solving for the one hazard rate that reprices that maturity's CDS to zero upfront given everything already solved.Bond credit-spread measures — the translation layer between a bond's price and how much of it is credit.Unilateral CVA — the price of the counterparty in every derivative you hold: the expected loss from their default before your trades' cash flows finish arriving.Bilateral CVA and DVA with first-to-default conditioning.Output ofMultiCurrencyExposureSimulator: per exposure date, the profile statistics, and per path, the discounted exposures the wrong-way CVA inCvaApproximatorneeds.Market factor used as the wrong-way driver.The ISDA CDS Standard Model: the pricing conventions every post-2009 standard CDS is quoted and settled with, beside the textbook quarterly grid ofCdsPricer.One CDS contract's dates and terms.Model conventions beyond the contract terms.One premium period of the coupon schedule.A curve of the kind the ISDA CDS Standard Model works on: continuously compounded zero rates r_i at node times t_i (years, ACT/365F from the curve's base date), interpolated linearly inr(t) * t.Builds the discount curve of the ISDA CDS Standard Model from par swap rates (the swap-only RFR curve used by the SOFR-era test grids).One par swap quote.Monte Carlo exposure generator for a netting set of multi-curve swaps and FX forwards on several currency pairs, each foreign currency with its own stochastic short rate.Stochastic projection-discount basis for domestic swaps that carry a projection curve (added in 2.3).Collateral agreement terms (two-way, symmetric).A discount functiont -> P(0,t), t in years, P(0,0) = 1.Domestic Hull-White short rate.One foreign currency: its Hull-White short rate and the spot against the domestic currency (domestic per foreign).A swap in a foreign currency (added in 2.3).An FX forward on one pair.FX forward: buyforeignNotionalunits of foreign currency atstrikedomestic per foreign atmaturityYears; a negative notional sells.The market: domestic rate, foreign currencies, and the correlation of the factors[W_d, W_1, W_S1, W_2, W_S2, ...].A domestic swap with an optional projection curve for its floating leg.Vanilla fixed-for-floating swap.