Hello,
I am getting an assert error when executing maxDate() method from an AbcdAtmVolCurve which triggers all the calculations within curve. the call stack is as follows! ------------------------------- std::_Debug_message(const wchar_t * message=0x00a88468, const wchar_t * file=0x00a884b0, unsigned int line=98) Line 24 C++ std::_Vector_const_iterator<double,std::allocator<double> >::operator*() Line 99 C++ QuantLib::detail::AbcdInterpolationImpl<std::_Vector_iterator<double,std::allocator<double> >,std::_Vector_iterator<double,std::allocator<double> > >::update() Line 108 + 0x8 bytes C++ QuantLib::AbcdAtmVolCurve::performCalculations() Line 156 C++ QuantLib::LazyObject::calculate() Line 146 C++ QuantLib::AbcdAtmVolCurve::maxDate() Line 122 + 0x12 bytes C++ ------------------------------- the code for instantiating the curve is as follows. TS_VOL_ABCD_ATM* c; // this is a custom structure for serializing information between a gui client application and the server where the following code actually runs! std::vector<QuantLib::Period> optionTenors; std::vector<QuantLib::Handle<QuantLib::Quote> > vols; std::vector<bool> inclusionInInterpolationFlag; for (std::size_t i = 0; i < c->Values.size(); i++) { QuantLib::Period period ( Converter::toInteger(c->Values[i].OptionTenor.NoTimeUnit) , Converter::toTimeUnit(c->Values[i].OptionTenor.TimeUnit) ); optionTenors.push_back(period); vols.push_back(QuantLib::Handle<QuantLib::Quote>(boost::shared_ptr<QuantLib::SimpleQuote>(new QuantLib::SimpleQuote(QuantLib::Real(c->Values[i].Volatility))))); inclusionInInterpolationFlag.push_back(c->Values[i].InclusionInInterpolationFlag); } boost::shared_ptr<QuantLib::AbcdAtmVolCurve> curve ( new QuantLib::AbcdAtmVolCurve( Converter::toNatural(c->SettlementDays) , Converter::toCalendar(c->Calendar) , optionTenors , vols , inclusionInInterpolationFlag // default std::vector< bool >(1, true) , Converter::toBusinessDayConvention(c->Convention) , Converter::toDayCounter(c->DayCounter) )); ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |