We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 467d114 commit d10b7b8Copy full SHA for d10b7b8
1 file changed
ql/experimental/credit/randomdefaultmodel.cpp
@@ -71,7 +71,7 @@ namespace QuantLib {
71
Real y = a * values[0] + sqrt(1-a*a) * values[j+1];
72
Real p = CumulativeNormalDistribution()(y);
73
74
- if (dts->defaultProbability(tmax) < p)
+ if (dts->defaultProbability(tmax) < p || dts->hazardRate(dts->referenceDate() + 1.0 * Days ,true) < QL_EPSILON)
75
pool_->setTime(name, tmax+1);
76
else
77
pool_->setTime(name, Brent().solve(Root(dts,p),accuracy_,0,1));
0 commit comments