Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13823/qlo
Modified Files:
swaptionvolstructure.cpp swaptionvolstructure.hpp
Added Files:
smilesection.cpp smilesection.hpp
Log Message:
generic interpolatedSmileSection exposed to excel
new file dedicated to smile section added
Index: swaptionvolstructure.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** swaptionvolstructure.cpp 24 Nov 2006 14:17:36 -0000 1.45
--- swaptionvolstructure.cpp 1 Dec 2006 18:48:38 -0000 1.46
***************
*** 235,266 ****
}
-
- InterpolatedSmileSection::InterpolatedSmileSection(
- const QuantLib::Date& optionDate,
- const QuantLib::DayCounter& dc,
- const std::vector<QuantLib::Rate>& s,
- const std::vector<QuantLib::Volatility>& v) {
-
- if (s.size()==1 && v.size()==1) {
- std::vector<QuantLib::Rate> strikes(2, 0.0);
- strikes[1]=1.0;
- std::vector<QuantLib::Volatility> vols(2, v[0]);
- libraryObject_ = boost::shared_ptr<
- QuantLib::SmileSectionInterface>(new
- QuantLib::InterpolatedSmileSection(optionDate,
- dc,
- strikes,
- vols));
- } else {
- libraryObject_ = boost::shared_ptr<
- QuantLib::SmileSectionInterface>(new
- QuantLib::InterpolatedSmileSection(optionDate,
- dc,
- s,
- v));
- }
- }
-
-
SmileSectionByCube::SmileSectionByCube(
const boost::shared_ptr<QuantLib::SwaptionVolatilityCube>& cube,
--- 235,238 ----
Index: swaptionvolstructure.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.hpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** swaptionvolstructure.hpp 27 Nov 2006 18:10:03 -0000 1.42
--- swaptionvolstructure.hpp 1 Dec 2006 18:48:38 -0000 1.43
***************
*** 27,30 ****
--- 27,32 ----
#include <ql/Volatilities/swaptionvolcubebysabr.hpp>
#include <ql/Volatilities/swaptionvolmatrix.hpp>
+ #include <ql/Volatilities/smilesection.hpp>
+ #include <qlo/smilesection.hpp>
#include <qlo/index.hpp>
***************
*** 92,105 ****
};
! class SmileSectionInterface : public ObjHandler::LibraryObject<QuantLib::SmileSectionInterface> {
! };
!
! class InterpolatedSmileSection : public SmileSectionInterface {
! public:
! InterpolatedSmileSection(const QuantLib::Date& optionDate,
! const QuantLib::DayCounter& dc,
! const std::vector<QuantLib::Rate>& strikes,
! const std::vector<QuantLib::Volatility>& v);
! };
class SmileSectionByCube : public SmileSectionInterface {
--- 94,98 ----
};
!
class SmileSectionByCube : public SmileSectionInterface {
--- NEW FILE: smilesection.cpp ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: smilesection.hpp ---
(This appears to be a binary file; contents omitted.)
|