Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21649/qlo
Modified Files:
swaptionvolstructure.cpp swaptionvolstructure.hpp
Log Message:
repalced const Matrix& volSpreads by const std::vector<std::vector<Handle<Quote> > >& volSpreads
in SwaptionVolatilityCubeBySabr constructor
Index: swaptionvolstructure.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** swaptionvolstructure.cpp 15 Sep 2006 18:46:06 -0000 1.31
--- swaptionvolstructure.cpp 4 Oct 2006 10:04:35 -0000 1.32
***************
*** 106,110 ****
const std::vector<QuantLib::Period>& lengths,
const std::vector<QuantLib::Spread>& strikeSpreads,
! const QuantLib::Matrix& volSpreads,
const QuantLib::Calendar& calendar,
long swapSettlementDays,
--- 106,110 ----
const std::vector<QuantLib::Period>& lengths,
const std::vector<QuantLib::Spread>& strikeSpreads,
! const std::vector<std::vector<QuantLib::Handle<QuantLib::Quote> > >& volSpreads,
const QuantLib::Calendar& calendar,
long swapSettlementDays,
***************
*** 220,222 ****
--- 220,247 ----
}
+ SmileSection::SmileSection(
+ double expiryTime,
+ const std::vector<double>& strikes,
+ const std::vector<double>& volatilities){
+ libraryObject_ = boost::shared_ptr<QuantLib::SmileSection>(
+ new QuantLib::SmileSection(expiryTime,
+ strikes,
+ volatilities));
+ }
+
+ SmileSection::SmileSection(
+ double expiryTime,
+ double flatVolatility){
+ int n = 5;
+ std::vector<double> fictitiousStrikes;
+ for(int i=0; i<n; i++){
+ fictitiousStrikes.push_back(.01+.001*i);
+ }
+ const std::vector<double> volatilities = std::vector<double>(n, flatVolatility);
+ libraryObject_ = boost::shared_ptr<QuantLib::SmileSection>(
+ new QuantLib::SmileSection(expiryTime,
+ fictitiousStrikes,
+ volatilities));
+ }
+
}
Index: swaptionvolstructure.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.hpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** swaptionvolstructure.hpp 15 Sep 2006 15:14:12 -0000 1.26
--- swaptionvolstructure.hpp 4 Oct 2006 10:04:35 -0000 1.27
***************
*** 84,88 ****
const std::vector<QuantLib::Period>& lengths,
const std::vector<QuantLib::Spread>& strikeSpreads,
! const QuantLib::Matrix& volSpreads,
const QuantLib::Calendar& calendar,
long swapSettlementDays,
--- 84,88 ----
const std::vector<QuantLib::Period>& lengths,
const std::vector<QuantLib::Spread>& strikeSpreads,
! const std::vector<std::vector<QuantLib::Handle<QuantLib::Quote> > >& volSpreads,
const QuantLib::Calendar& calendar,
long swapSettlementDays,
***************
*** 128,131 ****
--- 128,140 ----
const double expiry,
const double length);
+
+ SmileSection(
+ double expiryTime,
+ const std::vector<double>& strikes,
+ const std::vector<double>& volatilities);
+
+ SmileSection(
+ double expiryTime,
+ double flatVolatility);
};
|