|
From: Eric E. <eri...@re...> - 2019-03-11 15:35:27
|
Would you mind sending over the smallest standalone program that recreates the error? Regards, Eric On 08/03/2019 21:16, R S wrote: > As advised here > http://quantlib.10058.n7.nabble.com/How-to-serialize-an-object-in-Quantlibxl-td763.html > > I am attempting to save date and rates from my curve in order to > reconstruct it (avoid bootstrap) > > I am taking a pre-canned example with deposit and swap helpers > > rates.push_back(0.0382); qlperiods.push_back(5 * Days); > rates.push_back(0.0372); qlperiods.push_back(1 * Months); > rates.push_back(0.037125); qlperiods.push_back(2 * Years); > > (I have more but I have narrowed it to these to keep it simple) > > First two go into building DepositRateHelper and the last > one, SwapRateHelper > > I then construct a PiecewiseYieldCurve<Discount, LogLinear> > > When I try to print the dates and rates from. this. depoSwap curve > > vector<Date> curvedates = depoSwapTermStructure->dates(); > vector<Real> curverates = depoSwapTermStructure->data(); > > vector<Real>::iterator ri = curverates.begin(); > for (vector<Date>::iterator it = curvedates.begin(); it != > curvedates.end(); it++) { > cout << *it << " : " << *ri << endl; > ri++; > } > > I keep getting this error > terminate called after throwing an instance of 'QuantLib::Error' > what(): more than one instrument with pillar March 19th, 2019 > > Settlement is set to > Date settlementDate(1, September, 2010); > > The error stops if i comment out > rates.push_back(0.0382); qlperiods.push_back(5 * Days); > > I am lost as to why > > > > Regards > -RS > > > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev |