Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11427
Modified Files:
smilesection.cpp smilesection.hpp
Log Message:
SabrInterpolatedSmileSection exposed to Excel
Index: smilesection.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/smilesection.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** smilesection.cpp 11 Dec 2006 17:57:51 -0000 1.7
--- smilesection.cpp 20 Dec 2006 14:40:11 -0000 1.8
***************
*** 22,25 ****
--- 22,26 ----
#include <ql/Math/sabrinterpolation.hpp>
#include <ql/Volatilities/smilesection.hpp>
+ #include <ql/Volatilities/smilesection.hpp>
***************
*** 77,79 ****
--- 78,115 ----
}
+ SabrInterpolatedSmileSection::SabrInterpolatedSmileSection(
+ const QuantLib::Time timeToExpiry,
+ const std::vector<QuantLib::Rate>& strikes,
+ const std::vector<QuantLib::Handle<QuantLib::Quote> >& stdDevHandles,
+ QuantLib::Handle<QuantLib::Quote> forward,
+ QuantLib::Real alpha,
+ QuantLib::Real beta,
+ QuantLib::Real nu,
+ QuantLib::Real rho,
+ bool isAlphaFixed,
+ bool isBetaFixed,
+ bool isNuFixed,
+ bool isRhoFixed,
+ bool vegaWeighted,
+ const boost::shared_ptr<QuantLib::OptimizationMethod> method,
+ const QuantLib::DayCounter& dc)
+ {
+ libraryObject_ =
+ boost::shared_ptr<QuantLib::SabrInterpolatedSmileSection>(
+ new QuantLib::SabrInterpolatedSmileSection(timeToExpiry,
+ strikes,
+ stdDevHandles,
+ forward,
+ alpha,
+ beta,
+ nu,
+ rho,
+ isAlphaFixed,
+ isBetaFixed,
+ isNuFixed,
+ isRhoFixed,
+ vegaWeighted,
+ method,
+ dc));
+ }
}
Index: smilesection.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/smilesection.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** smilesection.hpp 11 Dec 2006 17:57:51 -0000 1.7
--- smilesection.hpp 20 Dec 2006 14:40:11 -0000 1.8
***************
*** 22,27 ****
#include <ql/volatilities/interpolatedsmilesection.hpp>
#include <ql/Optimization/method.hpp>
! #include <ql/quote.hpp>
! //#include <ql/handle.hpp>
namespace QuantLibAddin {
--- 22,26 ----
#include <ql/volatilities/interpolatedsmilesection.hpp>
#include <ql/Optimization/method.hpp>
! #include <ql/Volatilities/sabrinterpolatedsmilesection.hpp>
namespace QuantLibAddin {
***************
*** 67,70 ****
--- 66,89 ----
};
+
+ class SabrInterpolatedSmileSection: public SmileSection {
+ public:
+ SabrInterpolatedSmileSection(
+ const QuantLib::Time expiry,
+ const std::vector<QuantLib::Rate>& strikes,
+ const std::vector<QuantLib::Handle<QuantLib::Quote> >& stdDevs,
+ QuantLib::Handle<QuantLib::Quote> forward,
+ QuantLib::Real alpha,
+ QuantLib::Real beta,
+ QuantLib::Real nu,
+ QuantLib::Real rho,
+ bool isAlphaFixed,
+ bool isBetaFixed,
+ bool isNuFixed,
+ bool isRhoFixed,
+ bool vegaWeighted,
+ const boost::shared_ptr<QuantLib::OptimizationMethod> method,
+ const QuantLib::DayCounter& dc);
+ };
}
|