irCurve.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_IRCURVE_HPP
2 #define JULIAN_IRCURVE_HPP
3 
4 #include <dates/date.hpp>
6 
7 namespace julian {
8 namespace ir {
9 
22  class Curve {
23  public:
24 
27  Curve(){};
28 
31  virtual double DF(Date) const = 0;
32 
35  virtual double DF(Date,Date) const = 0;
36 
39  virtual double DF(Tenor) const = 0;
40 
43  virtual double DF(Tenor,Tenor) const = 0;
44 
49  virtual double capitalization(Date) const = 0;
50 
55  virtual double capitalization(Tenor) const = 0;
56 
61  virtual double capitalization(Date,Date) const = 0;
62 
67  virtual double capitalization(Tenor,Tenor) const = 0;
68 
73  virtual double coupon(Date) const = 0;
74 
79  virtual double coupon(Tenor) const = 0;
80 
85  virtual double coupon(Date,Date) const = 0;
86 
91  virtual double coupon(Tenor,Tenor) const = 0;
92 
97  virtual double rate(Date) const = 0;
98 
103  virtual double rate(Tenor) const = 0;
104 
109  virtual double rate(Date,InterestRate) const = 0;
110 
115  virtual double rate(Tenor,InterestRate) const = 0;
116 
122  virtual double fwdRate(Date,Date) const = 0;
123 
129  virtual double fwdRate(Tenor,Tenor) const = 0;
130 
136  virtual double fwdRate(Date,Tenor) const = 0;
137 
142  virtual double fwdRate(Date,Date,InterestRate) const = 0;
143 
149  virtual double fwdRate(Tenor,Tenor,InterestRate) const = 0;
150 
156  virtual double fwdRate(Date,Tenor,InterestRate) const = 0;
157 
162  virtual Date getValuationDate() const = 0;
163 
167  virtual ~Curve(){};
170  virtual Curve* clone() const;
171 
172  friend class boost::serialization::access;
173  private:
174 
177  template<class Archive>
178  void serialize(Archive & ar, const unsigned int){
179  }
180  };
181 } // namespace ir
182 } // namepsace julian
183 #endif /* JULIAN_IRCURVE_HPP */
virtual double capitalization(Date) const =0
get capitalization
virtual Date getValuationDate() const =0
get today date
Definition: cadHoliday.cpp:3
File contains definition of date class.
virtual ~Curve()
destructor
Definition: irCurve.hpp:167
virtual double fwdRate(Date, Date) const =0
get forward rate
void serialize(Archive &ar, const unsigned int)
interface used by Boost serialization library
Definition: irCurve.hpp:178
Class implements a date object.
Definition: date.hpp:27
virtual double DF(Date) const =0
get DF
virtual Curve * clone() const
Virtual copy constructor.
Curve()
Default constructor.
Definition: irCurve.hpp:27
Class implements a tenor object.
Definition: tenor.hpp:23
The class implements the concept of interest rate.
Definition: interestRate.hpp:25
The class interfaces interest rate curves.
Definition: irCurve.hpp:22
virtual double rate(Date) const =0
get zero coupon rate
File contains definition of InterestRate class.
virtual double coupon(Date) const =0
get coupon