couponvectors.hpp
Go to the documentation of this file.
1 /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 /*
4  Copyright (C) 2006, 2007, 2009 Ferdinando Ametrano
5  Copyright (C) 2005 Aurelien Chanudet
6  Copyright (C) 2006, 2007 Cristina Duminuco
7  Copyright (C) 2006 Giorgio Facchinetti
8 
9  This file is part of QuantLib, a free-software/open-source library
10  for financial quantitative analysts and developers - http://quantlib.org/
11 
12  QuantLib is free software: you can redistribute it and/or modify it
13  under the terms of the QuantLib license. You should have received a
14  copy of the license along with this program; if not, please email
15  <quantlib-dev@lists.sf.net>. The license is also available online at
16  <http://quantlib.org/license.shtml>.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the license for more details.
21 */
22 
23 #ifndef qla_couponvectors_hpp
24 #define qla_couponvectors_hpp
25 
26 #include <qlo/leg.hpp>
27 
28 #include <ql/time/businessdayconvention.hpp>
29 #include <ql/cashflows/replication.hpp>
30 
31 namespace QuantLib {
32  class Schedule;
33  class IborIndex;
34  class DayCounter;
35  class SwapIndex;
36  class OptionletVolatilityStructure;
37 
38  template <class T>
39  class Handle;
40 }
41 
42 namespace QuantLibAddin {
43 
44  class DigitalReplication : public ObjectHandler::LibraryObject<QuantLib::DigitalReplication>{
45  public:
46  DigitalReplication(const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
47  QuantLib::Replication::Type replicationType,
48  QuantLib::Real eps,
49  bool permanent) ;
50  };
51 
52  class FixedRateLeg : public Leg {
53  public:
55  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
56  QuantLib::BusinessDayConvention paymentConvention,
57  const std::vector<QuantLib::Real>& nominals,
58  const boost::shared_ptr<QuantLib::Schedule>& schedule,
59  const std::vector<QuantLib::Rate>& couponRates,
60  const QuantLib::DayCounter& paymentDayCounter,
61  bool permanent);
63  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
64  QuantLib::BusinessDayConvention paymentConvention,
65  const std::vector<QuantLib::Real>& nominals,
66  const boost::shared_ptr<QuantLib::Schedule>& schedule,
67  const std::vector<boost::shared_ptr<QuantLib::InterestRate> >& couponRates,
68  bool permanent);
69  };
70 
71  class IborLeg : public Leg {
72  public:
73  IborLeg(
74  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
75  QuantLib::BusinessDayConvention paymentConvention,
76  const std::vector<QuantLib::Real>& nominals,
77  const boost::shared_ptr<QuantLib::Schedule>& schedule,
78  const std::vector<QuantLib::Natural>& fixingDays,
79  bool isInArrears,
80  const QuantLib::DayCounter& paymentDayCounter,
81  const std::vector<QuantLib::Rate>& floors,
82  const std::vector<QuantLib::Real>& gearings,
83  const boost::shared_ptr<QuantLib::IborIndex>& index,
84  const std::vector<QuantLib::Spread>& spreads,
85  const std::vector<QuantLib::Rate>& caps,
86  bool permanent);
87  };
88 
89  class DigitalIborLeg : public Leg {
90  public:
92  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
93  QuantLib::BusinessDayConvention paymentConvention,
94  const std::vector<QuantLib::Real>& nominals,
95  const boost::shared_ptr<QuantLib::Schedule>& schedule,
96  const std::vector<QuantLib::Natural>& fixingDays,
97  bool isInArrears,
98  const QuantLib::DayCounter& paymentDayCounter,
99  const std::vector<QuantLib::Real>& gearings,
100  const boost::shared_ptr<QuantLib::IborIndex>& index,
101  const std::vector<QuantLib::Spread>& spreads,
102  const std::vector<QuantLib::Rate>& callStrikes,
103  std::string callPositionAndATMInclusion,
104  const std::vector<QuantLib::Rate>& callDigitalPayoffs,
105  const std::vector<QuantLib::Rate>& putStrikes,
106  std::string putPositionAndATMInclusion,
107  const std::vector<QuantLib::Rate>& putDigitalPayoffs,
108  const boost::shared_ptr<QuantLib::DigitalReplication>& replication,
109  bool permanent);
110  };
111 
112  class CmsLeg : public Leg {
113  public:
114  CmsLeg(
115  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
116  QuantLib::BusinessDayConvention paymentConvention,
117  const std::vector<QuantLib::Real>& nominals,
118  const boost::shared_ptr<QuantLib::Schedule>& schedule,
119  const std::vector<QuantLib::Natural>& fixingDays,
120  bool isInArrears,
121  const QuantLib::DayCounter& paymentDayCounter,
122  const std::vector<QuantLib::Rate>& floors,
123  const std::vector<QuantLib::Real>& gearings,
124  const boost::shared_ptr<QuantLib::SwapIndex>& index,
125  const std::vector<QuantLib::Spread>& spreads,
126  const std::vector<QuantLib::Rate>& caps,
127  bool permanent);
128  };
129 
130  class DigitalCmsLeg : public Leg {
131  public:
133  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
134  QuantLib::BusinessDayConvention paymentConvention,
135  const std::vector<QuantLib::Real>& nominals,
136  const boost::shared_ptr<QuantLib::Schedule>& schedule,
137  const std::vector<QuantLib::Natural>& fixingDays,
138  bool isInArrears,
139  const QuantLib::DayCounter& paymentDayCounter,
140  const std::vector<QuantLib::Real>& gearings,
141  const boost::shared_ptr<QuantLib::SwapIndex>& index,
142  const std::vector<QuantLib::Spread>& spreads,
143  const std::vector<QuantLib::Rate>& callStrikes,
144  std::string callPositionAndATMInclusion,
145  const std::vector<QuantLib::Rate>& callDigitalPayoffs,
146  const std::vector<QuantLib::Rate>& putStrikes,
147  std::string putPositionAndATMInclusion,
148  const std::vector<QuantLib::Rate>& putDigitalPayoffs,
149  const boost::shared_ptr<QuantLib::DigitalReplication>& replication,
150  bool permanent);
151  };
152 
153  class RangeAccrualLeg : public Leg {
154  public:
156  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
157  QuantLib::BusinessDayConvention paymentConvention,
158  const std::vector<QuantLib::Real>& nominals,
159  const boost::shared_ptr<QuantLib::Schedule>& schedule,
160  const std::vector<QuantLib::Natural>& fixingDays,
161  const QuantLib::DayCounter& paymentDayCounter,
162  const std::vector<QuantLib::Rate>& lowerTriggers,
163  const std::vector<QuantLib::Real>& gearings,
164  const boost::shared_ptr<QuantLib::IborIndex>& index,
165  const std::vector<QuantLib::Spread>& spreads,
166  const std::vector<QuantLib::Rate>& upperTriggers,
167  const QuantLib::Period& observationTenor,
168  QuantLib::BusinessDayConvention observationConvention,
169  bool permanent);
170  };
171 
172  class CmsZeroLeg : public Leg {
173  public:
174  CmsZeroLeg(
175  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
176  QuantLib::BusinessDayConvention paymentConvention,
177  const std::vector<QuantLib::Real>& nominals,
178  const boost::shared_ptr<QuantLib::Schedule>& schedule,
179  const std::vector<QuantLib::Natural>& fixingDays,
180  bool isInArrears,
181  const QuantLib::DayCounter& paymentDayCounter,
182  const std::vector<QuantLib::Rate>& floors,
183  const std::vector<QuantLib::Real>& gearings,
184  const boost::shared_ptr<QuantLib::SwapIndex>& index,
185  const std::vector<QuantLib::Spread>& spreads,
186  const std::vector<QuantLib::Rate>& caps,
187  bool permanent);
188  };
189 
190  OH_LIB_CLASS(FloatingRateCouponPricer, QuantLib::FloatingRateCouponPricer);
191 
192  class IborCouponPricer : public FloatingRateCouponPricer {
193  public:
195  const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
197  const std::string& typeOfIborCouponPricer,
198  bool permanent);
199  };
200 }
201 
202 #endif
Definition: basketlossmodels.hpp:32
Definition: couponvectors.hpp:112
Definition: couponvectors.hpp:192
OH_LIB_CLASS(AlphaForm, QuantLib::AlphaForm)
Definition: couponvectors.hpp:71
IborCouponPricer(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, const QuantLib::Handle< QuantLib::OptionletVolatilityStructure > &vol, const std::string &typeOfIborCouponPricer, bool permanent)
DigitalCmsLeg(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, QuantLib::BusinessDayConvention paymentConvention, const std::vector< QuantLib::Real > &nominals, const boost::shared_ptr< QuantLib::Schedule > &schedule, const std::vector< QuantLib::Natural > &fixingDays, bool isInArrears, const QuantLib::DayCounter &paymentDayCounter, const std::vector< QuantLib::Real > &gearings, const boost::shared_ptr< QuantLib::SwapIndex > &index, const std::vector< QuantLib::Spread > &spreads, const std::vector< QuantLib::Rate > &callStrikes, std::string callPositionAndATMInclusion, const std::vector< QuantLib::Rate > &callDigitalPayoffs, const std::vector< QuantLib::Rate > &putStrikes, std::string putPositionAndATMInclusion, const std::vector< QuantLib::Rate > &putDigitalPayoffs, const boost::shared_ptr< QuantLib::DigitalReplication > &replication, bool permanent)
DigitalReplication(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, QuantLib::Replication::Type replicationType, QuantLib::Real eps, bool permanent)
Definition: couponvectors.hpp:44
Definition: leg.hpp:44
DigitalIborLeg(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, QuantLib::BusinessDayConvention paymentConvention, const std::vector< QuantLib::Real > &nominals, const boost::shared_ptr< QuantLib::Schedule > &schedule, const std::vector< QuantLib::Natural > &fixingDays, bool isInArrears, const QuantLib::DayCounter &paymentDayCounter, const std::vector< QuantLib::Real > &gearings, const boost::shared_ptr< QuantLib::IborIndex > &index, const std::vector< QuantLib::Spread > &spreads, const std::vector< QuantLib::Rate > &callStrikes, std::string callPositionAndATMInclusion, const std::vector< QuantLib::Rate > &callDigitalPayoffs, const std::vector< QuantLib::Rate > &putStrikes, std::string putPositionAndATMInclusion, const std::vector< QuantLib::Rate > &putDigitalPayoffs, const boost::shared_ptr< QuantLib::DigitalReplication > &replication, bool permanent)
Definition: couponvectors.hpp:89
FixedRateLeg(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, QuantLib::BusinessDayConvention paymentConvention, const std::vector< QuantLib::Real > &nominals, const boost::shared_ptr< QuantLib::Schedule > &schedule, const std::vector< QuantLib::Rate > &couponRates, const QuantLib::DayCounter &paymentDayCounter, bool permanent)
Definition: couponvectors.hpp:153
Definition: abcd.hpp:38
IborLeg(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, QuantLib::BusinessDayConvention paymentConvention, const std::vector< QuantLib::Real > &nominals, const boost::shared_ptr< QuantLib::Schedule > &schedule, const std::vector< QuantLib::Natural > &fixingDays, bool isInArrears, const QuantLib::DayCounter &paymentDayCounter, const std::vector< QuantLib::Rate > &floors, const std::vector< QuantLib::Real > &gearings, const boost::shared_ptr< QuantLib::IborIndex > &index, const std::vector< QuantLib::Spread > &spreads, const std::vector< QuantLib::Rate > &caps, bool permanent)
Definition: couponvectors.hpp:52
Definition: couponvectors.hpp:130
Definition: abcd.hpp:30
CmsZeroLeg(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, QuantLib::BusinessDayConvention paymentConvention, const std::vector< QuantLib::Real > &nominals, const boost::shared_ptr< QuantLib::Schedule > &schedule, const std::vector< QuantLib::Natural > &fixingDays, bool isInArrears, const QuantLib::DayCounter &paymentDayCounter, const std::vector< QuantLib::Rate > &floors, const std::vector< QuantLib::Real > &gearings, const boost::shared_ptr< QuantLib::SwapIndex > &index, const std::vector< QuantLib::Spread > &spreads, const std::vector< QuantLib::Rate > &caps, bool permanent)
RangeAccrualLeg(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, QuantLib::BusinessDayConvention paymentConvention, const std::vector< QuantLib::Real > &nominals, const boost::shared_ptr< QuantLib::Schedule > &schedule, const std::vector< QuantLib::Natural > &fixingDays, const QuantLib::DayCounter &paymentDayCounter, const std::vector< QuantLib::Rate > &lowerTriggers, const std::vector< QuantLib::Real > &gearings, const boost::shared_ptr< QuantLib::IborIndex > &index, const std::vector< QuantLib::Spread > &spreads, const std::vector< QuantLib::Rate > &upperTriggers, const QuantLib::Period &observationTenor, QuantLib::BusinessDayConvention observationConvention, bool permanent)
Definition: couponvectors.hpp:172
CmsLeg(const boost::shared_ptr< ObjectHandler::ValueObject > &properties, QuantLib::BusinessDayConvention paymentConvention, const std::vector< QuantLib::Real > &nominals, const boost::shared_ptr< QuantLib::Schedule > &schedule, const std::vector< QuantLib::Natural > &fixingDays, bool isInArrears, const QuantLib::DayCounter &paymentDayCounter, const std::vector< QuantLib::Rate > &floors, const std::vector< QuantLib::Real > &gearings, const boost::shared_ptr< QuantLib::SwapIndex > &index, const std::vector< QuantLib::Spread > &spreads, const std::vector< QuantLib::Rate > &caps, bool permanent)