Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv7338/qlo
Modified Files:
enumclassctors.cpp enumclassctors.hpp
Log Message:
Added enumerations for backwardFlat + forwardFlat linear interpolation
Index: enumclassctors.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/enumclassctors.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** enumclassctors.cpp 6 Dec 2006 15:30:55 -0000 1.34
--- enumclassctors.cpp 6 Dec 2006 18:47:46 -0000 1.35
***************
*** 1,7 ****
/*
! Copyright (C) 2005 Plamen Neykov
Copyright (C) 2006 Eric Ehlers
Copyright (C) 2006 Chiara Fornarola
This file is part of QuantLib, a free-software/open-source library
--- 1,9 ----
/*
! Copyright (C) 2006 Marco Bianchetti
! Copyright (C) 2006 Giorgio Facchinetti
Copyright (C) 2006 Eric Ehlers
Copyright (C) 2006 Chiara Fornarola
+ Copyright (C) 2005 Plamen Neykov
This file is part of QuantLib, a free-software/open-source library
***************
*** 189,193 ****
}
! /* *** Interpolation1D Linear *** */
boost::shared_ptr<QuantLib::Interpolation> LINEAR_Interpolation(
dbl_itr& xBegin, dbl_itr& xEnd, dbl_itr& yBegin) {
--- 191,195 ----
}
! /* *** Linear 1D Interpolation *** */
boost::shared_ptr<QuantLib::Interpolation> LINEAR_Interpolation(
dbl_itr& xBegin, dbl_itr& xEnd, dbl_itr& yBegin) {
***************
*** 233,236 ****
--- 235,264 ----
/* *** YieldTermStructure *** */
//Discount based yield term structures
+ boost::shared_ptr<QuantLib::YieldTermStructure> DISCOUNT_BACKWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter) {
+ return boost::shared_ptr<QuantLib::YieldTermStructure>(
+ new QuantLib::PiecewiseYieldCurve<QuantLib::Discount,
+ QuantLib::BackwardFlat>(
+ nDays, calendar,
+ rateHelpers,
+ dayCounter,
+ 1.0e-6));
+ }
+ boost::shared_ptr<QuantLib::YieldTermStructure> DISCOUNT_FORWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter) {
+ return boost::shared_ptr<QuantLib::YieldTermStructure>(
+ new QuantLib::PiecewiseYieldCurve<QuantLib::Discount,
+ QuantLib::ForwardFlat>(
+ nDays, calendar,
+ rateHelpers,
+ dayCounter,
+ 1.0e-6));
+ }
boost::shared_ptr<QuantLib::YieldTermStructure> DISCOUNT_LINEAR_PiecewiseYieldCurve(
const long &nDays,
***************
*** 273,276 ****
--- 301,330 ----
}
//ZeroYield based yield term structures
+ boost::shared_ptr<QuantLib::YieldTermStructure> ZEROYIELD_BACKWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter) {
+ return boost::shared_ptr<QuantLib::YieldTermStructure>(
+ new QuantLib::PiecewiseYieldCurve<QuantLib::ZeroYield,
+ QuantLib::BackwardFlat>(
+ nDays, calendar,
+ rateHelpers,
+ dayCounter,
+ 1.0e-6));
+ }
+ boost::shared_ptr<QuantLib::YieldTermStructure> ZEROYIELD_FORWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter) {
+ return boost::shared_ptr<QuantLib::YieldTermStructure>(
+ new QuantLib::PiecewiseYieldCurve<QuantLib::ZeroYield,
+ QuantLib::ForwardFlat>(
+ nDays, calendar,
+ rateHelpers,
+ dayCounter,
+ 1.0e-6));
+ }
boost::shared_ptr<QuantLib::YieldTermStructure> ZEROYIELD_LINEAR_PiecewiseYieldCurve(
const long &nDays,
***************
*** 313,316 ****
--- 367,396 ----
}
//ForwardRate based yield term structures
+ boost::shared_ptr<QuantLib::YieldTermStructure> FORWARDRATE_BACKWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter) {
+ return boost::shared_ptr<QuantLib::YieldTermStructure>(
+ new QuantLib::PiecewiseYieldCurve<QuantLib::ForwardRate,
+ QuantLib::BackwardFlat>(
+ nDays, calendar,
+ rateHelpers,
+ dayCounter,
+ 1.0e-6));
+ }
+ boost::shared_ptr<QuantLib::YieldTermStructure> FORWARDRATE_FORWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter) {
+ return boost::shared_ptr<QuantLib::YieldTermStructure>(
+ new QuantLib::PiecewiseYieldCurve<QuantLib::ForwardRate,
+ QuantLib::ForwardFlat>(
+ nDays, calendar,
+ rateHelpers,
+ dayCounter,
+ 1.0e-6));
+ }
boost::shared_ptr<QuantLib::YieldTermStructure> FORWARDRATE_LINEAR_PiecewiseYieldCurve(
const long &nDays,
Index: enumclassctors.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/enumclassctors.hpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** enumclassctors.hpp 6 Dec 2006 15:30:55 -0000 1.31
--- enumclassctors.hpp 6 Dec 2006 18:47:46 -0000 1.32
***************
*** 1,7 ****
/*
! Copyright (C) 2005 Plamen Neykov
Copyright (C) 2006 Eric Ehlers
Copyright (C) 2006 Chiara Fornarola
This file is part of QuantLib, a free-software/open-source library
--- 1,9 ----
/*
! Copyright (C) 2006 Marco Bianchetti
! Copyright (C) 2006 Giorgio Facchinetti
Copyright (C) 2006 Eric Ehlers
Copyright (C) 2006 Chiara Fornarola
+ Copyright (C) 2005 Plamen Neykov
This file is part of QuantLib, a free-software/open-source library
***************
*** 112,115 ****
--- 114,127 ----
/* *** YieldTermStructure *** */
//Discount based yield term structures
+ boost::shared_ptr<QuantLib::YieldTermStructure> DISCOUNT_BACKWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter);
+ boost::shared_ptr<QuantLib::YieldTermStructure> DISCOUNT_FORWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter);
boost::shared_ptr<QuantLib::YieldTermStructure> DISCOUNT_LINEAR_PiecewiseYieldCurve(
const long &nDays,
***************
*** 128,131 ****
--- 140,153 ----
const QuantLib::DayCounter &dayCounter);
//ZeroYield based yield term structures
+ boost::shared_ptr<QuantLib::YieldTermStructure> ZEROYIELD_BACKWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter);
+ boost::shared_ptr<QuantLib::YieldTermStructure> ZEROYIELD_FORWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter);
boost::shared_ptr<QuantLib::YieldTermStructure> ZEROYIELD_LINEAR_PiecewiseYieldCurve(
const long &nDays,
***************
*** 144,147 ****
--- 166,179 ----
const QuantLib::DayCounter &dayCounter);
//ForwardRate based yield term structures
+ boost::shared_ptr<QuantLib::YieldTermStructure> FORWARDRATE_BACKWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter);
+ boost::shared_ptr<QuantLib::YieldTermStructure> FORWARDRATE_FORWARDFLAT_PiecewiseYieldCurve(
+ const long &nDays,
+ const QuantLib::Calendar &calendar,
+ const std::vector<boost::shared_ptr<QuantLib::RateHelper> > &rateHelpers,
+ const QuantLib::DayCounter &dayCounter);
boost::shared_ptr<QuantLib::YieldTermStructure> FORWARDRATE_LINEAR_PiecewiseYieldCurve(
const long &nDays,
|