lballabio / QuantLib

The QuantLib C++ library
http://quantlib.org
Other
5.22k stars 1.78k forks source link

Basket Loss & LHP Loss Model #763

Open phil-zxx opened 4 years ago

phil-zxx commented 4 years ago

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)

lballabio commented 4 years ago

Thanks!