|
From: Amine I. <ami...@gm...> - 2020-09-19 10:58:58
|
Hi Daniel, I believe the error is due to an initial check on the term structure that fails because The last tenor on the curve is less than the maturity date of your instrument/ underlying swap. I would try setting the last tenor on the curve to be longer than the last point on your instrument. Let me know how it goes ! Amine Ifri > On 19 Sep 2020, at 11:27, Daniel Lobo <dan...@gm...> wrote: > > 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 > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |