Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3974/qlo
Modified Files:
forwardrateagreement.cpp forwardrateagreement.hpp
Log Message:
added third FRA constructor using Index
Index: forwardrateagreement.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/forwardrateagreement.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** forwardrateagreement.hpp 13 Jun 2006 08:42:46 -0000 1.4
--- forwardrateagreement.hpp 13 Jun 2006 16:52:35 -0000 1.5
***************
*** 23,26 ****
--- 23,27 ----
#include <qlo/baseinstruments.hpp>
#include <qlo/termstructures.hpp>
+ #include <qlo/xibor.hpp>
namespace QuantLibAddin {
***************
*** 31,35 ****
const QuantLib::Date& valueDate,
const QuantLib::Date& maturityDate,
- //QuantLib::Instrument::Position type,
QuantLib::Position::Type type,
QuantLib::Rate strike,
--- 32,35 ----
***************
*** 42,45 ****
--- 42,55 ----
QuantLib::Compounding compounding = QuantLib::Simple,
QuantLib::Frequency frequency = QuantLib::Annual);
+
+ ForwardRateAgreement(
+ const QuantLib::Date& valueDate,
+ const QuantLib::Date& maturityDate,
+ QuantLib::Position::Type type,
+ QuantLib::Rate strike,
+ double notional,
+ const boost::shared_ptr<QuantLib::Xibor>& index,
+ const boost::shared_ptr<QuantLib::YieldTermStructure>& termStructure,
+ QuantLib::Compounding compounding = QuantLib::Simple);
};
Index: forwardrateagreement.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/forwardrateagreement.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** forwardrateagreement.cpp 13 Jun 2006 08:42:46 -0000 1.4
--- forwardrateagreement.cpp 13 Jun 2006 16:52:35 -0000 1.5
***************
*** 30,34 ****
const QuantLib::Date& valueDate,
const QuantLib::Date& maturityDate,
- //QuantLib::Instrument::Position type,
QuantLib::Position::Type type,
QuantLib::Rate strike,
--- 30,33 ----
***************
*** 41,46 ****
QuantLib::Compounding compounding,
QuantLib::Frequency frequency) {
-
-
QuantLib::Handle<QuantLib::YieldTermStructure> discountingTermStructure;
--- 40,43 ----
***************
*** 63,65 ****
--- 60,87 ----
}
+ ForwardRateAgreement::ForwardRateAgreement(
+ const QuantLib::Date& valueDate,
+ const QuantLib::Date& maturityDate,
+ QuantLib::Position::Type type,
+ QuantLib::Rate strike,
+ double notional,
+ const boost::shared_ptr<QuantLib::Xibor>& index,
+ const boost::shared_ptr<QuantLib::YieldTermStructure>& termStructure,
+ QuantLib::Compounding compounding) {
+
+ QuantLib::Handle<QuantLib::YieldTermStructure> discountingTermStructure;
+ discountingTermStructure.linkTo(termStructure);
+
+ libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
+ new QuantLib::ForwardRateAgreement(valueDate,
+ maturityDate,
+ type,
+ strike,
+ notional,
+ index,
+ discountingTermStructure,
+ compounding
+ ));
+ }
+
}
|