|
From: Daniel L. <dan...@gm...> - 2020-09-19 10:25:45
|
Hi, I was replicating the examples as given in https://github.com/lballabio/QuantLib/blob/master/Examples/BermudanSwaption/BermudanSwaption.cpp. However I changed the Term structure curve as below - Asin the file - Handle<YieldTermStructure> rhTermStructure( ext::make_shared<FlatForward>( settlementDate, Handle<Quote>(flatRate), Actual365Fixed())); But I changed to - Handle<YieldTermStructure> rhTermStructure1( ext::make_shared<FlatForward>( settlementDate, Handle<Quote>(flatRate), Actual365Fixed())); std::vector<QuantLib::Date> sr_dt; std::vector<QuantLib::Real> sr_v; sr_dt.push_back(Date(15, February, 2002)); sr_dt.push_back(Date(15, February, 2003)); sr_dt.push_back(Date(15, February, 2004)); sr_v.push_back(0); sr_v.push_back(1.5/100); sr_v.push_back(2/100); Handle<YieldTermStructure> rhTermStructure( ext::make_shared<ZeroCurve>(sr_dt, sr_v, Actual365Fixed() )); With this change I failed to generate any value. I received error - 1st leg: time (2.01096) is past max curve time (2) Any insight why I get this error and how to resolve this would be really helpful. Thanks for your time |