Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3774/qlo
Modified Files:
swaptionvolstructure.cpp swaptionvolstructure.hpp
Log Message:
splitted construction and calibration of swaptionvolcubebysabr
Index: swaptionvolstructure.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** swaptionvolstructure.cpp 4 Oct 2006 10:04:35 -0000 1.32
--- swaptionvolstructure.cpp 17 Oct 2006 14:38:22 -0000 1.33
***************
*** 139,148 ****
isAtmCalibrated
));
! const boost::shared_ptr<QuantLib::SwaptionVolatilityCubeBySabr>
! volCube = boost::dynamic_pointer_cast<QuantLib::SwaptionVolatilityCubeBySabr>(libraryObject_);
! sparseSabrParameters_ = volCube->sparseSabrParameters();
! denseSabrParameters_ = volCube->denseSabrParameters();
! marketVolCube_ = volCube->marketVolCube();
! volCubeAtmCalibrated_ = volCube->volCubeAtmCalibrated();
}
--- 139,143 ----
isAtmCalibrated
));
! calibrated_=false;
}
Index: swaptionvolstructure.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.hpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** swaptionvolstructure.hpp 4 Oct 2006 13:35:46 -0000 1.28
--- swaptionvolstructure.hpp 17 Oct 2006 14:38:22 -0000 1.29
***************
*** 97,101 ****
bool isAtmCalibrated
);
!
const std::vector<std::vector<boost::any> > getSparseSabrParameters()
{
--- 97,116 ----
bool isAtmCalibrated
);
!
! void performCalibration()
! {
! const boost::shared_ptr<QuantLib::SwaptionVolatilityCubeBySabr>
! volCube = boost::dynamic_pointer_cast<QuantLib::SwaptionVolatilityCubeBySabr>(libraryObject_);
!
! //volCube->performCalculations();
! volCube->performCalibration();
! if(!calibrated_){
! sparseSabrParameters_ = volCube->sparseSabrParameters();
! denseSabrParameters_ = volCube->denseSabrParameters();
! marketVolCube_ = volCube->marketVolCube();
! volCubeAtmCalibrated_ = volCube->volCubeAtmCalibrated();
! }
! calibrated_ = true;
! }
const std::vector<std::vector<boost::any> > getSparseSabrParameters()
{
***************
*** 119,122 ****
--- 134,138 ----
QuantLib::Matrix marketVolCube_;
QuantLib::Matrix volCubeAtmCalibrated_;
+ bool calibrated_;
};
|