Skip to content

Commit

Permalink
Merge pull request #1137.
Browse files Browse the repository at this point in the history
Reintroduce wider search bounds for G2 calibration.
  • Loading branch information
lballabio committed Jul 2, 2021
2 parents 0d91e36 + 1bf9123 commit e005927
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ql/models/shortrate/twofactormodels/g2.cpp
Expand Up @@ -167,7 +167,8 @@ namespace QuantLib {
SolvingFunction function(lambda, Bb_) ;
Brent s1d;
s1d.setMaxEvaluations(1000);
Real yb = s1d.solve(function, 1e-6, 0.00, -10.0*sigmay_, 10.0*sigmay_);
Real searchBound = std::max(10.0*sigmay_, 1.0);
Real yb = s1d.solve(function, 1e-6, 0.00, -searchBound, searchBound);

Real h1 = (yb - muy_)/(sigmay_*txy) -
rhoxy_*(x - mux_)/(sigmax_*txy);
Expand Down

0 comments on commit e005927

Please sign in to comment.