Serving the Quantitative Finance Community

 
User avatar
Squal
Topic Author
Posts: 1
Joined: January 21st, 2004, 9:14 am

quantlib trouble

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
 
User avatar
lballabio
Posts: 0
Joined: January 19th, 2004, 12:34 pm

quantlib trouble

January 3rd, 2008, 10:13 am

Last edited by lballabio on January 2nd, 2008, 11:00 pm, edited 1 time in total.