#763·QuantLib

Basket Loss & LHP Loss Model

Author: phil-zxxCreated Jan 24, 2020Updated May 16, 2026
Labelshelp wanted

Two small comments:

  1. In https://github.com/lballabio/QuantLib/blob/master/Examples/BasketLosses/BasketLosses.cpp it says Expected 10-Yr Losses but in fact we have advance(..., Period(60, Months)). And 60 months are 5 years, not 10.

  2. In https://github.com/lballabio/QuantLib/blob/master/ql/experimental/credit/gaussianlhplossmodel.cpp the return value of function GaussianLHPLossModel::expectedTrancheLossImpl is not divided by (detachLimit - attachLimit) as should be done, see e.g.

image

Screenshot taken from https://books.google.co.uk/books?id=tWZ3EgNAZHEC&printsec=frontcover (section 12.5.1)