January 3rd, 2008, 9:57 am
Hi,Does someone know how to convert this static code:Handle<Quote> l_oX0(boost::shared_ptr<Quote>(new SimpleQuote(100.0)));Handle<YieldTermStructure> R(flatRate(0.045, Actual360()));Handle<YieldTermStructure> lQ(flatRate(0.0, Actual360()));Handle<BlackVolTermStructure> Sigma(flatVol(0.35, Actual360())); Handle<Quote>X1(boost::shared_ptr<Quote>(new SimpleQuote(100.0)));Handle<BlackVolTermStructure> Sigma1(flatVol(0.15, Actual360()));Handle<Quote> X2(boost::shared_ptr<Quote>(new SimpleQuote(100.0)));Handle<BlackVolTermStructure> Sigma2(flatVol(0.55, Actual360()));into a code with a loop. I don't know how to allocate vector of handle.I try some to do thisl_oX.push_back(Handle<Quote> boost::shared_ptr<Quote>(new SimpleQuote(100.0)));l_oX.push_back(boost::shared_ptr<Quote>(new SimpleQuote(100.0)));But it doesn't work.Any ideas ?Regards