0
$\begingroup$

Valuation Date As Backdate(12 November 2019)

On calcuating Vanilla Swap, Quantlib gives error message as below

//.//Error 1st iteration: failed at 2nd instrument, maturity November 21st, 2019, reference date November 12th, 2019: Missing no-fix1W Actual/365 (Fixed) fixing for November 11th, 2019

//.//2nd leg: Missing Euribor3M Actual/360 fixing for Date...


try
{
    vswapPtr = shared_ptr<VanillaSwap> (new VanillaSwap (fixedLeg->direction,  fixedLeg->nominal, *fixedSched, fixedLeg->coupon, fixedLeg->dc, *floatingSched, euroIbor, floatingLeg->spreads, floatingLeg->dc)); 
}
catch(QuantLib::Error &e)
{

}

Handle<YieldTermStructure> handleTS(domYieldCurve); 
discountSwapEnginePtr = shared_ptr<DiscountingSwapEngine>(new DiscountingSwapEngine(handleTS));
vswapPtr->setPricingEngine(discountSwapEnginePtr);

try
{

    npv = vswapPtr->NPV();//.//Exception on this line

    fairRate = vswapPtr->fairRate();

}
catch(QuantLib::Error& e)
{
    const char* ch =e.what();       
} 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.