In BlackSwapEngine::calculate() the variable atmForward is calculated by using the forwardingTermStructure as the DiscountingSwapEngine is initialized by it. But the discounting swap should be intialised by the discoutCurve_ so that the fair swap rate is calculated in the \"two curve world\".
More precisely, the block
// using the forecasting curve
new DiscountingSwapEngine(swap.iborIndex()->forwardingTermStructure(), false)));
should be changed with
// using the discounting curve
new DiscountingSwapEngine(discountCurve_, false)));
Log in to post a comment.