S&P 5005,983+0.49%
NASDAQ21,220+0.47%
Russell2,187-0.64%
VIX18.20+0.7
10Y Yield4.31%+3.0bp
Gold2,936+0.62%
Crude70.40-0.98%
Bitcoin95,800-0.42%
S&P 5005,983+0.49%
NASDAQ21,220+0.47%
Russell2,187-0.64%
VIX18.20+0.7
10Y Yield4.31%+3.0bp
Gold2,936+0.62%
Crude70.40-0.98%
Bitcoin95,800-0.42%
simulated

Credit Risk Methodology

Instrument-level credit analytics for corporate bond portfolios — spread sensitivity, historical spread VaR, and four custom stress scenarios.

Download PDF

Overview

The Credit Risk Methodology documents the analytics behind the Corporate Bond Risk Calculator. The calculator ingests a corporate bond portfolio (CUSIP, face, price, coupon, yield-to-worst, maturity, seniority, sector, rating, call schedule) and outputs:

This is an instrument-level methodology (bonds, not entities). For entity-level counterparty reviews see Counterparty Credit Review.


Per-position analytics

Modified duration

Computed from the bond's cash-flow schedule using a semi-annual coupon convention and yield-to-worst as the discount rate:

For inputs that produce a degenerate PV (e.g. negative or zero present value of cash flows), the engine falls back to a duration approximation of years × 0.85.

DV01 and CS01

CS01 and DV01 are numerically identical at first order; the distinction is interpretive (CS01 isolates the credit-spread component for stress and VaR aggregation).

Spread routing — G-spread, OAS, G-spread(YTM)

The engine selects a spread methodology per bond:

Bond profileMethodLabel
Non-callableYTW minus interpolated Treasury CMT at maturityG-spread
Callable + valid call data + call in futureOAS via Black-Derman-Toy binomial treeOAS
Callable but OAS bisection failsYTM-based G-spread via Newton's methodG-spread(YTM)

The effectiveSpreadBps field is always populated; spreadType indicates which method produced it. See web/src/lib/credit/oas-model.ts for the BDT calibration and OAS bisection.

Treasury curve

The Treasury par curve is fetched from the Treasury.gov daily XML feed (no auth required) for tenors 1mo through 30yr. CMT rates are linearly interpolated to each bond's years-to-maturity.


Spread VaR / CVaR

The calculator estimates 3-day 99% portfolio spread VaR and CVaR from historical changes in ICE BofA OAS indices:

FRED series used

RatingFRED series IDDescription
AAABAMLC0A1CAAAICE BofA AAA US Corporate Index OAS
AABAMLC0A2CAAICE BofA AA US Corporate Index OAS
ABAMLC0A3CAICE BofA A US Corporate Index OAS
BBBBAMLC0A4CBBBICE BofA BBB US Corporate Index OAS
HY (BB/B/CCC)BAMLH0A0HYM2ICE BofA US High Yield Index OAS
ALLBAMLC0A0CMICE BofA US Corporate Index OAS (fallback)

If FRED_API_KEY is not configured, the engine substitutes a synthetic OAS series parameterized by per-rating mean spread and vol so the rest of the pipeline still runs (useful for local development without API access).


Stress scenarios

Each scenario produces a StressScenario record with total loss and per-position breakdown. All four scenarios run on every portfolio.

S1 — Worst Issuer

Identifies the issuer with the largest absolute CS01 exposure, then applies a 100% spread widening (the issuer's current G-spread doubles) to every bond from that issuer.

Loss = signedCs01 × current G-spread (bps)

Useful for sizing single-name credit-event impact.

S2 — Sector Contagion

Identifies the sector containing the worst-CS01 issuer, then applies a 50% spread widening to every bond in that sector. Models broad contagion from a single credit event.

S3 — Market-Wide

Applies a 25% spread widening to every bond in the portfolio. Models a generalized risk-off move (recession, liquidity withdrawal).

S4 — Jump to Default

The worst-face-value issuer defaults. Long positions take a loss; short positions on the same issuer gain. Recovery is determined by seniority:

SeniorityRecovery
Secured50%
Senior Unsecured30%
Senior Subordinated15%
Junior / Subordinated0%

Long loss = face × (1 − recovery); short gain = face × (1 − recovery)

JTD exemptions — AAA and AA issuers are excluded from JTD selection (default probability assumed negligible). US Treasuries (debtType = 'UST', or CUSIP/issuer prefixed UST- / UST ) are always exempt.


Overall Risk

A blended summary number that combines default risk with spread risk:

Overall Risk = 50% × JTD loss + worst-of (S1, S2, S3) excluding the JTD issuer

Removing the JTD issuer from the spread scenarios avoids double-counting (the JTD scenario already monetized that issuer's worst case). Reported as OverallRiskSummary with the JTD issuer, the dominant spread scenario, and the blended dollar amount.


Concentration analysis

The calculator buckets exposures four ways and reports ConcentrationBucket records (face, MV, CS01, % of portfolio) for each:

Used to flag single-name, sector, or seniority concentration before applying stress scenarios.


Bond reference data

The calculator ships with a 101-bond reference dataset (web/src/lib/credit/bond-reference.json):

User-uploaded positions extend or override the reference set per CUSIP. Unknown CUSIPs are accepted with the user-supplied fields.


Implementation entry points

FilePurpose
web/src/lib/credit/engine.tsMain entry: computeCreditRiskReport(); coordinates enrichment, VaR, stress, concentration
web/src/lib/credit/oas-model.tsBlack-Derman-Toy binomial tree, OAS bisection, YTM via Newton's method
web/src/lib/credit/treasury-curve.tsTreasury.gov XML fetch, CMT interpolation
web/src/lib/credit/fred-oas.tsFRED OAS time series, spread VaR/CVaR computation, synthetic fallback
web/src/lib/credit/types.tsType definitions, recovery rates, seniority labels, sector/rating enums
web/src/lib/credit/bond-reference.json101-bond reference dataset

Related modules