Skip to content

Commit d10b7b8

Browse files
committed
QPR-11360 check flat short end in default model
1 parent 467d114 commit d10b7b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ql/experimental/credit/randomdefaultmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ namespace QuantLib {
7171
Real y = a * values[0] + sqrt(1-a*a) * values[j+1];
7272
Real p = CumulativeNormalDistribution()(y);
7373

74-
if (dts->defaultProbability(tmax) < p)
74+
if (dts->defaultProbability(tmax) < p || dts->hazardRate(dts->referenceDate() + 1.0 * Days ,true) < QL_EPSILON)
7575
pool_->setTime(name, tmax+1);
7676
else
7777
pool_->setTime(name, Brent().solve(Root(dts,p),accuracy_,0,1));

0 commit comments

Comments
 (0)