Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22654/qlo
Modified Files:
.cvsignore baseinstruments.hpp
Added Files:
forwardrateagreement.cpp forwardrateagreement.hpp
Log Message:
exported object Forward Rate Agreement from QL to QLXL
Index: .cvsignore
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** .cvsignore 6 Jun 2006 08:10:05 -0000 1.2
--- .cvsignore 8 Jun 2006 18:42:42 -0000 1.3
***************
*** 13,16 ****
--- 13,17 ----
vo_couponvectors.*pp
vo_exercise.*pp
+ vo_forwardrateagreement.*pp
vo_instruments.*pp
vo_interpolation.*pp
Index: baseinstruments.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/baseinstruments.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** baseinstruments.hpp 19 May 2006 16:56:16 -0000 1.1
--- baseinstruments.hpp 8 Jun 2006 18:42:42 -0000 1.2
***************
*** 22,25 ****
--- 22,26 ----
#include <ql/instrument.hpp>
#include <ql/Instruments/bond.hpp>
+ #include <ql/Instruments/forward.hpp>
#include <ql/Instruments/oneassetoption.hpp>
--- NEW FILE: forwardrateagreement.hpp ---
/*
Copyright (C) 2006 Katiuscia Manzoni
Copyright (C) 2006 Ferdinando Ametrano
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.
*/
#ifndef qla_forwardrateagreement_hpp
#define qla_forwardrateagreement_hpp
#include <ql/Instruments/forwardrateagreement.hpp>
#include <qlo/baseinstruments.hpp>
#include <qlo/termstructures.hpp>
namespace QuantLibAddin {
class ForwardRateAgreement : public Instrument {
public:
ForwardRateAgreement(
const QuantLib::Date& valueDate,
const QuantLib::Date& maturityDate,
QuantLib::Forward::Type type,
QuantLib::Rate strike,
double notional,
long settlementDays,
const QuantLib::DayCounter& dayCount,
const QuantLib::Calendar& calendar,
QuantLib::BusinessDayConvention businessDayConvention,
const boost::shared_ptr<QuantLib::YieldTermStructure>& termStructure,
QuantLib::Compounding compounding = QuantLib::Simple,
QuantLib::Frequency frequency = QuantLib::Annual);
EXPORT_UNDERLYING_OBJECT(QuantLib::ForwardRateAgreement, mInstrument);
};
}
#endif
--- NEW FILE: forwardrateagreement.cpp ---
/*
Copyright (C) 2006 Ferdinando Ametrano
Copyright (C) 2006 Katiuscia Manzoni
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 <oh/objhandlerdefines.hpp>
#include <qlo/termstructures.hpp>
#include <qlo/forwardrateagreement.hpp>
namespace QuantLibAddin {
ForwardRateAgreement::ForwardRateAgreement(
const QuantLib::Date& valueDate,
const QuantLib::Date& maturityDate,
QuantLib::Forward::Type type,
QuantLib::Rate strike,
double notional,
long settlementDays,
const QuantLib::DayCounter& dayCount,
const QuantLib::Calendar& calendar,
QuantLib::BusinessDayConvention businessDayConvention,
const boost::shared_ptr<QuantLib::YieldTermStructure>& termStructure,
QuantLib::Compounding compounding,
QuantLib::Frequency frequency) {
QuantLib::Handle<QuantLib::YieldTermStructure> discountingTermStructure;
discountingTermStructure.linkTo(termStructure);
mInstrument = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ForwardRateAgreement(valueDate,
maturityDate,
type,
strike,
notional,
settlementDays,
dayCount,
calendar,
businessDayConvention,
discountingTermStructure,
compounding,
frequency
));
}
}
|