Hi,
I am currently using QL in a project to price Structured Floaters; as part of the incoming data I would like to use to parameterize the LFM we are receiving (annualized) atm cap/floor volatilities... I tried using OptionletStripper1/2 to get caplet volas from those; however, OptionletStripper2 is not usable since it relies on OptionletStripper1 which in turn needs a vol surface instead of a vol curve. Anyhow, "faking" a vol surface by setting all values (in strike dimension) to the atm vols returned only zeros upon calling OptionletStripper1::optionletVolatilities() Am I doing something fundementally wrong here and/or is there some other class/method which I can use for the purpose? Thanks for any help and best regards, Andreas ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Hi Andreas,
when I try something like this boost::shared_ptr<YieldTermStructure> yts(new FlatForward(0,TARGET(),0.05,Actual365Fixed())); boost::shared_ptr<IborIndex> euribor6m(new Euribor(6*Months,Handle<YieldTermStructure>(yts))); std::vector<Period> optionTenors; optionTenors.push_back(1*Years); optionTenors.push_back(2*Years); optionTenors.push_back(3*Years); optionTenors.push_back(4*Years); optionTenors.push_back(5*Years); std::vector<Rate> strikes; strikes.push_back(0.03); strikes.push_back(0.04); strikes.push_back(0.05); strikes.push_back(0.06); strikes.push_back(0.07); Matrix flatVols(5,5,0.20); boost::shared_ptr<CapFloorTermVolSurface> caps(new CapFloorTermVolSurface(0,TARGET(),ModifiedFollowing,optionTenors,strikes,flatVols)); boost::shared_ptr<OptionletStripper> stripper(new OptionletStripper1(caps,euribor6m)); boost::shared_ptr<OptionletVolatilityStructure> caplets(new StrippedOptionletAdapter(stripper)); for(int i=0;i<strikes.size();i++) { for(int j=0;j<10;j++) { std::cout << caplets->volatility(j*6*Months,strikes[i]) << " "; } std::cout << std::endl; } I get 0.199999 0.2 0.2 0.2 0.2 0.20006 0.200001 0.2 0.200018 0.2 0.199999 0.199999 0.2 0.2 0.2 0.200091 0.200001 0.2 0.200025 0.2 0.2 0.2 0.2 0.2 0.2 0.199817 0.199998 0.2 0.199949 0.2 0.2 0.2 0.2 0.2 0.2 0.199881 0.199999 0.2 0.199965 0.2 0.2 0.2 0.2 0.2 0.2 0.199911 0.199999 0.2 0.199973 0.2 which looks reasonable. Is that of any help for you? Regards Peter Am 04.05.2012 10:00, schrieb Andreas Spengler: Hi, I am currently using QL in a project to price Structured Floaters; as part of the incoming data I would like to use to parameterize the LFM we are receiving (annualized) atm cap/floor volatilities... I tried using OptionletStripper1/2 to get caplet volas from those; however, OptionletStripper2 is not usable since it relies on OptionletStripper1 which in turn needs a vol surface instead of a vol curve. Anyhow, "faking" a vol surface by setting all values (in strike dimension) to the atm vols returned only zeros upon calling OptionletStripper1::optionletVolatilities() Am I doing something fundementally wrong here and/or is there some other class/method which I can use for the purpose? Thanks for any help and best regards, Andreas ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |