Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13494/qlo
Modified Files:
couponvectors.cpp couponvectors.hpp enumclassctors.cpp
enumclassctors.hpp typefactory.hpp
Log Message:
new CMSCoupon/Conundrum interface (added Model of Yield Curve)
Index: couponvectors.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/couponvectors.hpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** couponvectors.hpp 3 Aug 2006 15:39:55 -0000 1.15
--- couponvectors.hpp 7 Aug 2006 10:33:10 -0000 1.16
***************
*** 25,28 ****
--- 25,29 ----
#include <ql/CashFlows/cashflowvectors.hpp>
#include <ql/CashFlows/cmscoupon.hpp>
+ #include <ql/CashFlows/conundrumpricer.hpp>
#include <ql/CashFlows/analysis.hpp>
***************
*** 68,72 ****
class VanillaCMSCouponPricer:public ObjHandler::LibraryObject<QuantLib::VanillaCMSCouponPricer> {
public:
! VanillaCMSCouponPricer(const std::string &typeOfVanillaCMSCouponPricer);
boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> underlyingObject()
{
--- 69,74 ----
class VanillaCMSCouponPricer:public ObjHandler::LibraryObject<QuantLib::VanillaCMSCouponPricer> {
public:
! VanillaCMSCouponPricer(const std::string &typeOfVanillaCMSCouponPricer,
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve);
boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> underlyingObject()
{
***************
*** 93,98 ****
const std::vector<QuantLib::Real>& caps,
const std::vector<QuantLib::Real>& floors,
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& vol,
! const std::string & typeOfVanillaCMSCouponPricer);
};
}
--- 95,102 ----
const std::vector<QuantLib::Real>& caps,
const std::vector<QuantLib::Real>& floors,
+ const std::vector<QuantLib::Real>& meanReversions,
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& vol,
! const std::string & typeOfVanillaCMSCouponPricer,
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve);
};
}
Index: couponvectors.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/couponvectors.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** couponvectors.cpp 3 Aug 2006 15:39:55 -0000 1.21
--- couponvectors.cpp 7 Aug 2006 10:33:10 -0000 1.22
***************
*** 160,167 ****
VanillaCMSCouponPricer::VanillaCMSCouponPricer(
! const std::string &typeOfVanillaCMSCouponPricer)
{
libraryObject_ = Create<boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> >()
! (typeOfVanillaCMSCouponPricer);
}
--- 160,168 ----
VanillaCMSCouponPricer::VanillaCMSCouponPricer(
! const std::string &typeOfVanillaCMSCouponPricer,
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve)
{
libraryObject_ = Create<boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> >()
! (typeOfVanillaCMSCouponPricer,modelOfYieldCurve);
}
***************
*** 177,184 ****
const std::vector<QuantLib::Rate>& caps,
const std::vector<QuantLib::Rate>& floors,
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& vol,
! const std::string & typeOfVanillaCMSCouponPricer) {
! VanillaCMSCouponPricer vanillaCMSCouponPricer(typeOfVanillaCMSCouponPricer);
boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> pricer = vanillaCMSCouponPricer.underlyingObject();
cashFlowVector_ = QuantLib::CMSCouponVector(*schedule,
--- 178,187 ----
const std::vector<QuantLib::Rate>& caps,
const std::vector<QuantLib::Rate>& floors,
+ const std::vector<QuantLib::Real>& meanReversions,
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& vol,
! const std::string & typeOfVanillaCMSCouponPricer,
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve) {
! VanillaCMSCouponPricer vanillaCMSCouponPricer(typeOfVanillaCMSCouponPricer,modelOfYieldCurve);
boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> pricer = vanillaCMSCouponPricer.underlyingObject();
cashFlowVector_ = QuantLib::CMSCouponVector(*schedule,
***************
*** 192,195 ****
--- 195,199 ----
caps,
floors,
+ meanReversions,
pricer,
vol);
Index: enumclassctors.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/enumclassctors.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** enumclassctors.cpp 3 Aug 2006 15:39:55 -0000 1.13
--- enumclassctors.cpp 7 Aug 2006 10:33:10 -0000 1.14
***************
*** 500,510 ****
//VanillaCMSCouponPricer
! boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> CONUNDRUM_BY_BLACK_Pricer( ){
return boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>(
! new QuantLib::ConundrumPricerByBlack( ));
};
! boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> CONUNDRUM_BY_NUMERICAL_INTEGRATION_Pricer( ){
return boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>(
! new QuantLib::ConundrumPricerByNumericalIntegration( ));
};
}
--- 500,512 ----
//VanillaCMSCouponPricer
! boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> CONUNDRUM_BY_BLACK_Pricer(
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve){
return boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>(
! new QuantLib::ConundrumPricerByBlack(modelOfYieldCurve));
};
! boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> CONUNDRUM_BY_NUMERICAL_INTEGRATION_Pricer(
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve ){
return boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>(
! new QuantLib::ConundrumPricerByNumericalIntegration(modelOfYieldCurve));
};
}
Index: enumclassctors.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/enumclassctors.hpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** enumclassctors.hpp 3 Aug 2006 15:39:55 -0000 1.11
--- enumclassctors.hpp 7 Aug 2006 10:33:10 -0000 1.12
***************
*** 191,197 ****
//VanillaCMSCouponPricer
! boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> CONUNDRUM_BY_BLACK_Pricer( );
boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>
! CONUNDRUM_BY_NUMERICAL_INTEGRATION_Pricer( );
}
--- 191,200 ----
//VanillaCMSCouponPricer
! boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>
! CONUNDRUM_BY_BLACK_Pricer(
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve );
boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>
! CONUNDRUM_BY_NUMERICAL_INTEGRATION_Pricer(
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve );
}
Index: typefactory.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/typefactory.hpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** typefactory.hpp 3 Aug 2006 15:39:55 -0000 1.25
--- typefactory.hpp 7 Aug 2006 10:33:10 -0000 1.26
***************
*** 29,32 ****
--- 29,33 ----
#include <ql/TermStructures/ratehelpers.hpp>
#include <ql/CashFlows/cmscoupon.hpp>
+ #include <ql/CashFlows/conundrumpricer.hpp>
#include <oh/exception.hpp>
***************
*** 267,271 ****
/* *** VanillaCMSCouponPricer *** */
! typedef boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>(*VanillaCMSCouponPricerConstructor)( );
template<>
--- 268,273 ----
/* *** VanillaCMSCouponPricer *** */
! typedef boost::shared_ptr<QuantLib::VanillaCMSCouponPricer>(*VanillaCMSCouponPricerConstructor)(
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve);
template<>
***************
*** 274,281 ****
public:
boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> operator() (
! const std::string& vanillaCMSCouponPricerID) {
VanillaCMSCouponPricerConstructor vanillaCMSCouponPricerConstructor =
getType<std::string, VanillaCMSCouponPricerConstructor>(vanillaCMSCouponPricerID);
! return vanillaCMSCouponPricerConstructor();
}
};
--- 276,284 ----
public:
boost::shared_ptr<QuantLib::VanillaCMSCouponPricer> operator() (
! const std::string& vanillaCMSCouponPricerID,
! const QuantLib::GFunctionFactory::ModelOfYieldCurve modelOfYieldCurve) {
VanillaCMSCouponPricerConstructor vanillaCMSCouponPricerConstructor =
getType<std::string, VanillaCMSCouponPricerConstructor>(vanillaCMSCouponPricerID);
! return vanillaCMSCouponPricerConstructor(modelOfYieldCurve);
}
};
|