Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17710/qlo
Modified Files:
swaptionvolstructure.cpp swaptionvolstructure.hpp
Log Message:
bug fixed
Index: swaptionvolstructure.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** swaptionvolstructure.cpp 17 Oct 2006 14:38:22 -0000 1.33
--- swaptionvolstructure.cpp 18 Oct 2006 13:48:53 -0000 1.34
***************
*** 139,143 ****
isAtmCalibrated
));
! calibrated_=false;
}
--- 139,150 ----
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();
}
Index: swaptionvolstructure.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.hpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** swaptionvolstructure.hpp 17 Oct 2006 14:38:22 -0000 1.29
--- swaptionvolstructure.hpp 18 Oct 2006 13:48:53 -0000 1.30
***************
*** 98,116 ****
);
- 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()
{
--- 98,101 ----
***************
*** 134,139 ****
QuantLib::Matrix marketVolCube_;
QuantLib::Matrix volCubeAtmCalibrated_;
- bool calibrated_;
-
};
--- 119,122 ----
|