@@ -385,7 +385,7 @@ GenericYieldVolCurve::GenericYieldVolCurve(
385385 for (Size i = 0 ; i < optionTenors.size (); ++i) {
386386 for (Size j = 0 ; j < underlyingTenors.size (); ++j) {
387387 std::vector<std::pair<Real, bool >> tmp;
388- Size idx = alpha.initialValue .size () == 1 ? 0 : i;
388+ Size idx = alpha.initialValue .size () == 1 ? 0 : i * underlyingTenors. size () + j ;
389389 tmp.push_back (std::make_pair (alpha.initialValue [idx], alpha.isFixed ));
390390 tmp.push_back (std::make_pair (beta.initialValue [idx], beta.isFixed ));
391391 tmp.push_back (std::make_pair (nu.initialValue [idx], nu.isFixed ));
@@ -625,25 +625,25 @@ GenericYieldVolCurve::GenericYieldVolCurve(
625625 if (auto p = QuantLib::ext::dynamic_pointer_cast<QuantExt::SabrParametricVolatility>(
626626 sabr->parametricVolatility ())) {
627627 DLOG (" SABR parameters:" );
628- DLOG (" alpha (rows = underlying lengths , cols = option tenors ):" );
629- DLOGGERSTREAM (p->alpha ());
630- DLOG (" beta (rows = underlying lengths , cols = option tenors ):" );
631- DLOGGERSTREAM (p->beta ());
632- DLOG (" nu (rows = underlying lengths , cols = option tenors ):" );
633- DLOGGERSTREAM (p->nu ());
634- DLOG (" rho (rows = underlying lengths , cols = option tenors ):" );
635- DLOGGERSTREAM (p->rho ());
636- DLOG (" lognormal shift (rows = underlying lengths , cols = option tenors ):" );
637- DLOGGERSTREAM (p->lognormalShift ());
638- DLOG (" calibration attempts (rows = underlying lengths , cols = option tenors ):" );
639- DLOGGERSTREAM (p->numberOfCalibrationAttempts ());
640- DLOG (" calibration error (rows = underlying lengths , cols = option tenors , rmse of relative "
628+ DLOG (" alpha (rows = option tenors , cols = underlying lengths ):" );
629+ DLOGGERSTREAM (transpose ( p->alpha () ));
630+ DLOG (" beta (rows = option tenors , cols = underlying lengths ):" );
631+ DLOGGERSTREAM (transpose ( p->beta () ));
632+ DLOG (" nu (rows = option tenors , cols = underlying lengths ):" );
633+ DLOGGERSTREAM (transpose ( p->nu () ));
634+ DLOG (" rho (rows = option tenors , cols = underlying lengths ):" );
635+ DLOGGERSTREAM (transpose ( p->rho () ));
636+ DLOG (" lognormal shift (rows = option tenors , cols = underlying lengths ):" );
637+ DLOGGERSTREAM (transpose ( p->lognormalShift () ));
638+ DLOG (" calibration attempts (rows = option tenors , cols = underlying lengths ):" );
639+ DLOGGERSTREAM (transpose ( p->numberOfCalibrationAttempts () ));
640+ DLOG (" calibration error (rows = option tenors , cols = underlying lengths , rmse of relative "
641641 " errors w.r.t. max of sabr variant's preferred quotation type, i.e. nvol, slnvol, "
642642 " premium:" );
643- DLOGGERSTREAM (p->calibrationError ());
644- DLOG (" isInterpolated (rows = underlying lengths , cols = option tenors , 1 means calibration "
643+ DLOGGERSTREAM (transpose ( p->calibrationError () ));
644+ DLOG (" isInterpolated (rows = option tenors , cols = underlying lengths , 1 means calibration "
645645 " failed and point is interpolated):" );
646- DLOGGERSTREAM (p->isInterpolated ());
646+ DLOGGERSTREAM (transpose ( p->isInterpolated () ));
647647 }
648648 }
649649 }
0 commit comments