Skip to content

Commit f115e58

Browse files
committed
QPR-11360 introduce lower and upper limits
1 parent 6c016db commit f115e58

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

ql/experimental/credit/randomdefaultmodel.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ namespace QuantLib {
7474
if (dts->defaultProbability(tmax) < p)
7575
pool_->setTime(name, tmax+1);
7676
else{
77-
int guess = 0;
78-
while(dts->defaultProbability(guess) < p && guess < tmax)
79-
guess++;
80-
pool_->setTime(name, Brent().solve(Root(dts,p),accuracy_,guess,1));
77+
pool_->setTime(name, Brent().solve(Root(dts,p),accuracy_,0.0,tmax));
8178
}
8279
}
8380
}

0 commit comments

Comments
 (0)