Skip to content

Commit

Permalink
Use correct guess for given option and swap tenors
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Oct 31, 2024
1 parent a6378c5 commit 46880be
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 46880be

Please sign in to comment.