Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5647/qlo
Modified Files:
.cvsignore swaptionvolstructure.hpp
Added Files:
swaptionvolstructure.cpp
Log Message:
added SwaptionVolMatrix
Index: .cvsignore
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** .cvsignore 19 Jun 2006 14:18:01 -0000 1.6
--- .cvsignore 19 Jun 2006 17:08:22 -0000 1.7
***************
*** 10,11 ****
--- 10,12 ----
qladdin.hpp
vo_*.*pp
+
--- NEW FILE: swaptionvolstructure.cpp ---
/*
Copyright (C) 2006 Silvia Frasson
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have received a copy of the
license along with this program; if not, please email qua...@li...
The license is also available online at http://quantlib.org/html/license.html
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
#if defined(HAVE_CONFIG_H)
#include <qlo/config.hpp>
#endif
#include <qlo/swaptionvolstructure.hpp>
namespace QuantLibAddin {
SwaptionVolatilityMatrix::SwaptionVolatilityMatrix(const QuantLib::Date& referenceDate,
const std::vector<QuantLib::Date>& exerciseDates,
const std::vector<QuantLib::Period>& lengths,
const boost::shared_ptr<QuantLib::Matrix>& volatilities,
const QuantLib::DayCounter& dayCounter) {
libraryObject_ = boost::shared_ptr<QuantLib::SwaptionVolatilityStructure>(
new QuantLib::SwaptionVolatilityMatrix(referenceDate, exerciseDates, lengths, *(volatilities.get()), dayCounter));
}
}
Index: swaptionvolstructure.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swaptionvolstructure.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** swaptionvolstructure.hpp 12 Jun 2006 14:08:18 -0000 1.1
--- swaptionvolstructure.hpp 19 Jun 2006 17:08:22 -0000 1.2
***************
*** 21,25 ****
#include <oh/objhandler.hpp>
! #include <ql/swaptionvolstructure.hpp>
namespace QuantLibAddin {
--- 21,26 ----
#include <oh/objhandler.hpp>
! #include <ql/Volatilities/swaptionvolmatrix.hpp>
! #include <qlo/interpolation.hpp>
namespace QuantLibAddin {
***************
*** 28,31 ****
--- 29,41 ----
};
+ class SwaptionVolatilityMatrix : public SwaptionVolatilityStructure {
+ public:
+ SwaptionVolatilityMatrix(const QuantLib::Date& referenceDate,
+ const std::vector<QuantLib::Date>& exerciseDates,
+ const std::vector<QuantLib::Period>& lengths,
+ const boost::shared_ptr<QuantLib::Matrix>& volatilities,
+ const QuantLib::DayCounter& dayCounter);
+ };
+
}
|