Skip to content

Commit

Permalink
SABR swaption vol cube: use correct guess for given option and swap t…
Browse files Browse the repository at this point in the history
…enors (#2108)
  • Loading branch information
lballabio authored Nov 2, 2024
2 parents ea7e1e4 + 46880be commit 585bb09
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ namespace QuantLib {
for (Size i=0; i<4; i++)
for (Size j=0; j<nOptionTenors_; j++)
for (Size k=0; k<nSwapTenors_; k++)
privateObserver_->registerWith(parametersGuessQuotes_[j+k*nOptionTenors_][i]);
privateObserver_->registerWith(parametersGuessQuotes_[j*nSwapTenors_+k][i]);
}

template<class Model> void XabrSwaptionVolatilityCube<Model>::setParameterGuess() const {
Expand All @@ -290,7 +290,7 @@ namespace QuantLib {
for (Size j=0; j<nOptionTenors_ ; j++)
for (Size k=0; k<nSwapTenors_; k++) {
parametersGuess_.setElement(i, j, k,
parametersGuessQuotes_[j+k*nOptionTenors_][i]->value());
parametersGuessQuotes_[j*nSwapTenors_+k][i]->value());
}
parametersGuess_.updateInterpolators();

Expand Down

0 comments on commit 585bb09

Please sign in to comment.