@@ -973,12 +973,12 @@ void CapFloorVolCurve::buildCalibrationInfo(const Date& asof, const CurveConfigu
973973 if ((strikes[j] > -shift || close_enough (strikes[j], -shift)) &&
974974 (forwards[i][u] > -shift || close_enough (forwards[i][u], -shift))) {
975975 stddev =
976- std::sqrt (capletVol_->blackVariance (expiries[i] , strikes[j]));
976+ std::sqrt (capletVol_->blackVariance (t , strikes[j]));
977977 callPricesStrike[i][u][j] =
978978 blackFormula (Option::Type::Call, strikes[j], forwards[i][u], stddev);
979979 }
980980 } else {
981- stddev = std::sqrt (capletVol_->blackVariance (expiries[i] , strikes[j]));
981+ stddev = std::sqrt (capletVol_->blackVariance (t , strikes[j]));
982982 callPricesStrike[i][u][j] =
983983 bachelierBlackFormula (Option::Type::Call, strikes[j], forwards[i][u], stddev);
984984 }
@@ -1044,12 +1044,12 @@ void CapFloorVolCurve::buildCalibrationInfo(const Date& asof, const CurveConfigu
10441044 if (capletVol_->volatilityType () == ShiftedLognormal) {
10451045 if ((strike > -shift || close_enough (strike, -shift)) &&
10461046 (forwards[i][u] > -shift || close_enough (forwards[i][u], -shift))) {
1047- stddev = std::sqrt (capletVol_->blackVariance (expiries[i] , strike));
1047+ stddev = std::sqrt (capletVol_->blackVariance (t , strike));
10481048 callPricesStrikeSpread[i][u][j] =
10491049 blackFormula (Option::Type::Call, strike, forwards[i][u], stddev);
10501050 }
10511051 } else {
1052- stddev = std::sqrt (capletVol_->blackVariance (expiries[i] , strike));
1052+ stddev = std::sqrt (capletVol_->blackVariance (t , strike));
10531053 callPricesStrikeSpread[i][u][j] =
10541054 bachelierBlackFormula (Option::Type::Call, strike, forwards[i][u], stddev);
10551055 }
0 commit comments