[QuantLibAddin-cvs] QuantLibAddin/qlo swap.cpp, 1.16, 1.17 swap.hpp, 1.13, 1.14
Brought to you by:
ericehlers,
nando
|
From: Ferdinando A. <na...@us...> - 2006-11-06 10:29:44
|
Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10483/qlo Modified Files: swap.cpp swap.hpp Log Message: exported makeCMS Index: swap.cpp =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swap.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** swap.cpp 18 Oct 2006 20:11:37 -0000 1.16 --- swap.cpp 6 Nov 2006 10:29:41 -0000 1.17 *************** *** 26,29 **** --- 26,30 ---- #include <qlo/swap.hpp> #include <ql/Instruments/swap.hpp> + #include <ql/Instruments/makecms.hpp> namespace QuantLibAddin { *************** *** 50,53 **** --- 51,75 ---- } + // QuantLib::MakeCMS + Swap::Swap( + const QuantLib::Period& swapTenor, + const boost::shared_ptr<QuantLib::SwapIndex>& swapIndex, + const QuantLib::Spread iborSpread, + const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& vol, + const std::string& typeOfVanillaCMSCouponPricer, + const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve, + const QuantLib::Real meanReversion, + //const boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>& pricer, + const QuantLib::Period& forwardStart) + { + VanillaCMSCouponPricer vanillaCMSCouponPricer( + typeOfVanillaCMSCouponPricer, modelOfYieldCurve); + boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> pricer = + vanillaCMSCouponPricer.underlyingObject(); + libraryObject_ = QuantLib::MakeCMS(swapTenor, swapIndex, iborSpread, + vol, meanReversion, pricer, forwardStart).operator + boost::shared_ptr<QuantLib::Swap>(); + } + std::vector<std::vector<boost::any> > Swap::legAnalysis(QuantLib::Size i) { Index: swap.hpp =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swap.hpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** swap.hpp 18 Oct 2006 20:11:37 -0000 1.13 --- swap.hpp 6 Nov 2006 10:29:41 -0000 1.14 *************** *** 36,39 **** --- 36,49 ---- const std::vector<bool>& payer, const QuantLib::Handle<QuantLib::YieldTermStructure>& hYTS); + // QuantLib::MakeCMS + Swap(const QuantLib::Period& swapTenor, + const boost::shared_ptr<QuantLib::SwapIndex>& swapIndex, + const QuantLib::Spread iborSpread, + const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& vol, + const std::string& typeOfVanillaCMSCouponPricer, + const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve, + const QuantLib::Real meanReversion, + //const boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>& pricer, + const QuantLib::Period& forwardStart); std::vector<std::vector<boost::any> > legAnalysis(QuantLib::Size i); |