Credit-linked note
This page lists everything you need to book and value a credit-linked note: the function's arguments and defaults, how it's priced, and an example you can run. A credit-linked note is a bond whose payments depend on a reference name surviving: the investor pays the face, receives a coupon while the name survives, and gets the face back at maturity if it still does, or the recovery if it doesn't. Why investors hold them is covered in how credit products work.
Quick example
The example reads its rates from the desk sheets; load them once and it runs as shown.
This pins ACME on a 2% flat hazard, books five years of a note paying 6% on 100 of face, held by the investor, and splits its value into the coupons, the redemption and the recovery.
use chrono::NaiveDate;
use helixio_docs_sheets::{SOFR_CLOSE_DATE, USD_SOFR_CLOSE};
use helixrs::{
AnyInstrument, CollateralSpec, CreditCurveId, CreditLinkedNote, Currency, DayCountFraction,
FlatHazard, MarketContext, PricingRiskFactors, QuoteSheet, Survival, cds_standard,
};
type Outcome<T> = Result<T, Box<dyn std::error::Error>>;
fn date((year, month, day): (i32, u32, u32)) -> NaiveDate {
NaiveDate::from_ymd_opt(year, month, day).expect("a real calendar date")
}
fn main() -> Outcome<()> {
let close = date(SOFR_CLOSE_DATE);
let usd: Currency = "USD".parse()?;
let sheet = QuoteSheet::from_rows(USD_SOFR_CLOSE.iter().copied())?;
let acme: CreditCurveId = "ACME/SeniorUnSec/XR14/USD".parse()?;
let market = MarketContext::as_of(close)
.with_recipe_quotes(&CollateralSpec::Currency(usd), &sheet)?
.with_credit_curve(
acme,
Survival::FlatHazard(FlatHazard::new(close, 0.02, DayCountFraction::Act365Fixed)?),
Some(0.4),
);
// Five years on ACME, paying 6% on 100 of face, held by the investor.
let note = CreditLinkedNote::standard(&cds_standard(), close, "ACME", usd, 5, 100.0, 0.06);
let instrument = AnyInstrument::CreditLinkedNote(Box::new(note.clone()));
let (coupons, redemption, recovery) = market.priced(&instrument.risk_factors()?, |v| note.components(v))?;
let value = instrument.npv(&market)?;
println!("coupons {coupons:.6}");
println!("redemption {redemption:.6}");
println!("recovery {recovery:.6}");
println!("value {value:.6}");
Ok(())
}import helixio as hlx
from desk_sheets import SOFR_CLOSE_DATE, USD_SOFR_CLOSE
ACME = "ACME/SeniorUnSec/XR14/USD"
market = (
hlx.MarketContext(SOFR_CLOSE_DATE)
.with_recipe_quotes("USD", USD_SOFR_CLOSE)
.with_credit_curve(ACME, hlx.curves.SurvivalCurve.flat_hazard(SOFR_CLOSE_DATE, 0.02), recovery=0.4)
)
# Five years on ACME, paying 6% on 100 of face, held by the investor.
note = hlx.products.credit_linked_note(SOFR_CLOSE_DATE, "ACME", "USD", 5, notional=100.0, coupon=0.06)
coupons, redemption, recovery = hlx.credit.note_components(note, market)
value = note.npv(market)
print(f"coupons {coupons:.6f}")
print(f"redemption {redemption:.6f}")
print(f"recovery {recovery:.6f}")
print(f"value {value:.6f}")coupons 26.821501
redemption 70.566729
recovery 3.533134
value 100.921363
The value is exactly the sum of the three components.
How it's priced
With survival , recovery , discount , coupon , accruals and face , the note is worth three components:
API
| Argument | Type | Default | Meaning |
|---|---|---|---|
trade_date |
date |
required | the trade date |
reference |
str |
required | a bare entity on the standard tier and clause, or a full ENTITY/SENIORITY/DOCCLAUSE spelling |
currency |
str |
required | the note's currency, which completes the curve's identity |
tenor_years |
int |
required | whole years to maturity |
notional |
float |
required | the face |
coupon |
float |
required | the coupon rate, as a decimal |
issued |
bool |
False |
True books the issuer's liability instead of the investor's asset |
fixed_recovery |
float |
None |
a recovery the note fixes; None reads the market's |
credit.note_components(note, market) returns the coupons, the redemption and the recovery. In
Rust the note is CreditLinkedNote::standard, and its components are read through
MarketContext::priced(¬e.risk_factors()?, |view| note.components(view)).
| Symbol | Meaning | Rust | Python |
|---|---|---|---|
| the note | on a reference name | CreditLinkedNote::standard |
products.credit_linked_note |
| its value | AnyInstrument::npv |
Instrument.npv |
|
| the components | coupons, redemption, recovery | CreditLinkedNote::components |
credit.note_components |
Defaults and limits
- Credit terms follow the standard CDS contract on the reference name; see the credit conventions catalog.
- The curve: the market must hold a survival curve under the reference's full identity in the note's currency.
- Survival weighting: a coupon is paid only if the name survives to its date, and the face only if it survives to maturity.
See also
- Source:
crates/helixrs/src/instruments/credit.rs,crates/helixrs/src/market/pricers.rs - Related pages:
- How credit products work, the ideas behind the note.
- Credit default swap, for the protection the note embeds.
- Credit-linked swap, for the same idea on any set of legs.
From the 0.0 line at revision bf7f2e2. Every printed number is that revision's own output.