Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9020/qlo
Modified Files:
capletvolstructure.cpp capletvolstructure.hpp smilesection.cpp
smilesection.hpp swaptionvolstructure.cpp
swaptionvolstructure.hpp
Log Message:
1) SmileSectionInterface renamed SmileSection
2) full SmileSection interface exposed to Excel
3) SabrSmileSection signature changed
Index: swaptionvolstructure.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** swaptionvolstructure.cpp 1 Dec 2006 19:34:23 -0000 1.47
--- swaptionvolstructure.cpp 1 Dec 2006 21:13:33 -0000 1.48
***************
*** 25,37 ****
#include <qlo/swaptionvolstructure.hpp>
#include <ql/Volatilities/swaptionconstantvol.hpp>
! #include <ql/Volatilities/swaptionvolcubebylinear.hpp>
! #include <ql/Volatilities/swaptionvolcubebysabr.hpp>
! //#include <ql/Volatilities/smilesection.hpp>
! //#include <ql/Optimization/criteria.hpp>
! //#include <ql/Volatilities/smilesection.hpp>
! //#include <ql/Volatilities/swaptionvolcubebysabr.hpp>
#include <ql/Volatilities/swaptionvolmatrix.hpp>
-
namespace QuantLibAddin {
--- 25,32 ----
#include <qlo/swaptionvolstructure.hpp>
#include <ql/Volatilities/swaptionconstantvol.hpp>
! #include <ql/Volatilities/swaptionvolcube2.hpp>
! #include <ql/Volatilities/swaptionvolcube1.hpp>
#include <ql/Volatilities/swaptionvolmatrix.hpp>
namespace QuantLibAddin {
***************
*** 95,99 ****
}
! SwaptionVolatilityCubeBySabr::SwaptionVolatilityCubeBySabr(
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& atmVol,
const std::vector<QuantLib::Period>& optionTenors,
--- 90,94 ----
}
! SwaptionVolCube1::SwaptionVolCube1(
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& atmVol,
const std::vector<QuantLib::Period>& optionTenors,
***************
*** 109,113 ****
QL_REQUIRE(!atmVol.empty(), "atm vol handle not linked to anything");
libraryObject_ = boost::shared_ptr<QuantLib::Extrapolator>(new
! QuantLib::SwaptionVolatilityCubeBySabr(atmVol,
optionTenors,
swapTenors,
--- 104,108 ----
QL_REQUIRE(!atmVol.empty(), "atm vol handle not linked to anything");
libraryObject_ = boost::shared_ptr<QuantLib::Extrapolator>(new
! QuantLib::SwaptionVolCube1(atmVol,
optionTenors,
swapTenors,
***************
*** 122,129 ****
std::vector<std::vector<boost::any> >
! SwaptionVolatilityCubeBySabr::getSparseSabrParameters() {
! const boost::shared_ptr<QuantLib::SwaptionVolatilityCubeBySabr>&
volCube = boost::dynamic_pointer_cast<
! QuantLib::SwaptionVolatilityCubeBySabr>(libraryObject_);
return getSabrParameters(volCube->sparseSabrParameters());
--- 117,124 ----
std::vector<std::vector<boost::any> >
! SwaptionVolCube1::getSparseSabrParameters() {
! const boost::shared_ptr<QuantLib::SwaptionVolCube1>&
volCube = boost::dynamic_pointer_cast<
! QuantLib::SwaptionVolCube1>(libraryObject_);
return getSabrParameters(volCube->sparseSabrParameters());
***************
*** 131,154 ****
std::vector<std::vector<boost::any> >
! SwaptionVolatilityCubeBySabr::getDenseSabrParameters() {
! const boost::shared_ptr<QuantLib::SwaptionVolatilityCubeBySabr>&
volCube = boost::dynamic_pointer_cast<
! QuantLib::SwaptionVolatilityCubeBySabr>(libraryObject_);
return getSabrParameters(volCube->denseSabrParameters());
}
std::vector<std::vector<boost::any> >
! SwaptionVolatilityCubeBySabr::getMarketVolCube() {
! const boost::shared_ptr<QuantLib::SwaptionVolatilityCubeBySabr>&
volCube = boost::dynamic_pointer_cast<
! QuantLib::SwaptionVolatilityCubeBySabr>(libraryObject_);
return getVolCube(volCube->marketVolCube());
}
std::vector<std::vector<boost::any> >
! SwaptionVolatilityCubeBySabr::getVolCubeAtmCalibrated() {
! const boost::shared_ptr<QuantLib::SwaptionVolatilityCubeBySabr>&
volCube = boost::dynamic_pointer_cast<
! QuantLib::SwaptionVolatilityCubeBySabr>(libraryObject_);
return getVolCube(volCube->volCubeAtmCalibrated());
}
--- 126,149 ----
std::vector<std::vector<boost::any> >
! SwaptionVolCube1::getDenseSabrParameters() {
! const boost::shared_ptr<QuantLib::SwaptionVolCube1>&
volCube = boost::dynamic_pointer_cast<
! QuantLib::SwaptionVolCube1>(libraryObject_);
return getSabrParameters(volCube->denseSabrParameters());
}
std::vector<std::vector<boost::any> >
! SwaptionVolCube1::getMarketVolCube() {
! const boost::shared_ptr<QuantLib::SwaptionVolCube1>&
volCube = boost::dynamic_pointer_cast<
! QuantLib::SwaptionVolCube1>(libraryObject_);
return getVolCube(volCube->marketVolCube());
}
std::vector<std::vector<boost::any> >
! SwaptionVolCube1::getVolCubeAtmCalibrated() {
! const boost::shared_ptr<QuantLib::SwaptionVolCube1>&
volCube = boost::dynamic_pointer_cast<
! QuantLib::SwaptionVolCube1>(libraryObject_);
return getVolCube(volCube->volCubeAtmCalibrated());
}
Index: capletvolstructure.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/capletvolstructure.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** capletvolstructure.cpp 17 Nov 2006 14:26:23 -0000 1.7
--- capletvolstructure.cpp 1 Dec 2006 21:13:33 -0000 1.8
***************
*** 61,65 ****
QuantLib::Real impliedVolatilityAccuracy,
QuantLib::Size maxEvaluations,
! const std::vector<boost::shared_ptr<QuantLib::SmileSectionInterface> >&
smileSectionInterfaces)
{
--- 61,65 ----
QuantLib::Real impliedVolatilityAccuracy,
QuantLib::Size maxEvaluations,
! const std::vector<boost::shared_ptr<QuantLib::SmileSection> >&
smileSectionInterfaces)
{
Index: swaptionvolstructure.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.hpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** swaptionvolstructure.hpp 1 Dec 2006 19:34:23 -0000 1.44
--- swaptionvolstructure.hpp 1 Dec 2006 21:13:33 -0000 1.45
***************
*** 26,30 ****
#include <qlo/smilesection.hpp>
- #include <ql/swaptionvolstructure.hpp>
#include <ql/Indexes/swapindex.hpp>
#include <ql/Volatilities/swaptionvolcube.hpp>
--- 26,29 ----
***************
*** 75,81 ****
std::vector<std::vector<boost::any> > getVolCube(QuantLib::Matrix & volCube);
! class SwaptionVolatilityCubeBySabr : public SwaptionVolatilityCube {
public:
! SwaptionVolatilityCubeBySabr(
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& atmVol,
const std::vector<QuantLib::Period>& optionTenors,
--- 74,80 ----
std::vector<std::vector<boost::any> > getVolCube(QuantLib::Matrix & volCube);
! class SwaptionVolCube1 : public SwaptionVolatilityCube {
public:
! SwaptionVolCube1(
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& atmVol,
const std::vector<QuantLib::Period>& optionTenors,
***************
*** 94,98 ****
};
! class SmileSectionByCube : public SmileSectionInterface {
public:
SmileSectionByCube(
--- 93,97 ----
};
! class SmileSectionByCube : public SmileSection {
public:
SmileSectionByCube(
Index: smilesection.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/smilesection.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** smilesection.cpp 1 Dec 2006 19:34:23 -0000 1.2
--- smilesection.cpp 1 Dec 2006 21:13:33 -0000 1.3
***************
*** 32,36 ****
const QuantLib::DayCounter& dc) {
! libraryObject_ = boost::shared_ptr<QuantLib::SmileSectionInterface>(
new QuantLib::InterpolatedSmileSection<>(optionDate, s, v, dc));
}
--- 32,36 ----
const QuantLib::DayCounter& dc) {
! libraryObject_ = boost::shared_ptr<QuantLib::SmileSection>(
new QuantLib::InterpolatedSmileSection<>(optionDate, s, v, dc));
}
Index: smilesection.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/smilesection.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** smilesection.hpp 1 Dec 2006 19:34:23 -0000 1.2
--- smilesection.hpp 1 Dec 2006 21:13:33 -0000 1.3
***************
*** 27,35 ****
namespace QuantLibAddin {
! class SmileSectionInterface :
! public ObjHandler::LibraryObject<QuantLib::SmileSectionInterface> {
};
! // class FlatSmileSection : public SmileSectionInterface {
// public:
// FlatSmileSection(const QuantLib::Date& optionDate,
--- 27,35 ----
namespace QuantLibAddin {
! class SmileSection :
! public ObjHandler::LibraryObject<QuantLib::SmileSection> {
};
! // class FlatSmileSection : public SmileSection {
// public:
// FlatSmileSection(const QuantLib::Date& optionDate,
***************
*** 39,43 ****
// };
! // class InterpolatedSmileSection : public SmileSectionInterface {
//public:
// InterpolatedSmileSection(const QuantLib::Date& optionDate,
--- 39,43 ----
// };
! // class InterpolatedSmileSection : public SmileSection {
//public:
// InterpolatedSmileSection(const QuantLib::Date& optionDate,
***************
*** 47,51 ****
// };
! class InterpolatedSmileSection : public SmileSectionInterface {
public:
InterpolatedSmileSection(const QuantLib::Date& optionDate,
--- 47,51 ----
// };
! class InterpolatedSmileSection : public SmileSection {
public:
InterpolatedSmileSection(const QuantLib::Date& optionDate,
***************
*** 55,59 ****
};
! class SabrSmileSection: public SmileSectionInterface{
public:
SabrSmileSection(const QuantLib::Time expiry,
--- 55,59 ----
};
! class SabrSmileSection: public SmileSection{
public:
SabrSmileSection(const QuantLib::Time expiry,
Index: capletvolstructure.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/capletvolstructure.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** capletvolstructure.hpp 17 Nov 2006 14:26:23 -0000 1.7
--- capletvolstructure.hpp 1 Dec 2006 21:13:33 -0000 1.8
***************
*** 27,35 ****
namespace QuantLibAddin {
! inline double qltest (boost::shared_ptr<QuantLib::SmileSectionInterface> t){
return QuantLib::test(t);
};
! inline double qltest2(std::vector<boost::shared_ptr<QuantLib::SmileSectionInterface> > t){
return QuantLib::test2(t);
};
--- 27,35 ----
namespace QuantLibAddin {
! inline double qltest (boost::shared_ptr<QuantLib::SmileSection> t){
return QuantLib::test(t);
};
! inline double qltest2(std::vector<boost::shared_ptr<QuantLib::SmileSection> > t){
return QuantLib::test2(t);
};
***************
*** 62,66 ****
QuantLib::Real impliedVolatilityAccuracy,
QuantLib::Size maxEvaluations,
! const std::vector<boost::shared_ptr<QuantLib::SmileSectionInterface> >&
smileSectionInterfaces);
};
--- 62,66 ----
QuantLib::Real impliedVolatilityAccuracy,
QuantLib::Size maxEvaluations,
! const std::vector<boost::shared_ptr<QuantLib::SmileSection> >&
smileSectionInterfaces);
};
|