Basket Loss & LHP Loss Model
Author: phil-zxxCreated Jan 24, 2020Updated May 16, 2026
Labelshelp wanted
Two small comments:
In https://github.com/lballabio/QuantLib/blob/master/Examples/BasketLosses/BasketLosses.cpp it says
Expected 10-Yr Lossesbut in fact we haveadvance(..., Period(60, Months)). And 60 months are 5 years, not 10.In https://github.com/lballabio/QuantLib/blob/master/ql/experimental/credit/gaussianlhplossmodel.cpp the return value of function
GaussianLHPLossModel::expectedTrancheLossImplis not divided by(detachLimit - attachLimit)as should be done, see e.g.

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