Skip to content

feat(claim): add FaceValueAccrualClaim settling on a reference security - #867

Merged
benbenbang merged 2 commits into
mainfrom
fable/688
Aug 12, 2026
Merged

feat(claim): add FaceValueAccrualClaim settling on a reference security#867
benbenbang merged 2 commits into
mainfrom
fable/688

Conversation

@benbenbang

@benbenbang benbenbang commented Aug 12, 2026

Copy link
Copy Markdown
Owner
  • feat(claim): add FaceValueAccrualClaim settling on a reference security
  • feat(crates): add conventional spread to credit default swap

close #688

Port `FaceValueAccrualClaim`, which settles a default claim against the
notional and accrual of a reference `Bond`, paying `N (1 - R - a)` where
`a` is the security's accrual at the default date normalised by its
notional there.

The `Claim::amount` trait method now returns `QlResult<Real>` since the
accrual claim reads a fallible `Bond` API. `FaceValueClaim`, which
cannot fail, returns `Ok`, and the three CDS engines propagate the
result.

Where `claim.cpp:41-43` divides by a zero reference notional and returns
`NaN`, the port fails explicitly: `Bond::notional` reports a redeemed
bond as `Ok(0.0)`, putting that quotient within reach of ordinary use,
so the claim names the condition as an error (D4) instead of letting a
`NaN` propagate into a protection leg. Like `FaceValueClaim`, the
accrual claim declines the ISDA downcast seam, so the engine refuses it.

Closes #688
Ports `conventionalSpread` (`creditdefaultswap.cpp:383-423`) as
`CreditDefaultSwap::conventional_spread`, which converts a contract
carrying an upfront into a running spread. It solves the flat hazard
rate that prices the contract to nothing at the conventional recovery,
then reports the engine's fair spread on that curve, supporting both the
mid-point and ISDA models.

Adds two tests over a shared eight-year fixture whose upfront is still
unsettled at the evaluation date, so the conversion moves the spread off
its own running rate. Each rebuilds the contract at the converted spread
with no upfront and checks it prices to nothing on the solved hazard
rate.

Drops the deferral note that listed `conventionalSpread` as omitted.

close #790

close #688
@benbenbang
benbenbang enabled auto-merge (rebase) August 12, 2026 23:13
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 12, 2026
@benbenbang
benbenbang merged commit 012cfcb into main Aug 12, 2026
3 of 6 checks passed
@benbenbang
benbenbang deleted the fable/688 branch August 12, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Credit] Port FaceValueAccrualClaim (deferred from #683)

1 participant