CashFlow.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_CASHFLOW_HPP
2 #define JULIAN_CASHFLOW_HPP
3 
5 #include <dates/date.hpp>
7 namespace julian {
8 
9 
22  class CashFlow {
23  public:
28  virtual double price(const SmartPointer<ir::Curve>& disc) = 0;
29 
34  virtual double value(const SmartPointer<ir::Curve>& disc) = 0;
35 
38  virtual Date getDate() const = 0;
39 
42  virtual double getNotional() const = 0;
43 
46  virtual double getCF() const = 0;
47 
50  virtual void setCashFlow(double amount) = 0;
51 
54  virtual void setCashFlow(double quote, const InterestRate& rate) = 0;
55 
58  virtual void setCashFlow(const SmartPointer<ir::Curve>&) = 0;
59 
62  virtual CashFlow* clone() const = 0;
63 
66  virtual ~CashFlow(){};
67 
68  friend class boost::serialization::access;
69  private:
70  template<class Archive>
73  void serialize(Archive & , const unsigned int) {
74  }
75  };
76 
77 } // namespace julian
78 
79 #endif /* CASHFLOW_HPP */
Class implements the general concept of CF understand as certain amount paid on predefined date...
Definition: CashFlow.hpp:22
virtual void setCashFlow(double amount)=0
sets new CF value
virtual Date getDate() const =0
returns payment date
Definition: cadHoliday.cpp:3
File contains definition of date class.
virtual double getNotional() const =0
returns notional
void serialize(Archive &, const unsigned int)
interface of Boost serialization library
Definition: CashFlow.hpp:73
virtual double getCF() const =0
returns CF
Class implements a date object.
Definition: date.hpp:27
virtual double value(const SmartPointer< ir::Curve > &disc)=0
prints and returns the value discounted the cashflow
virtual double price(const SmartPointer< ir::Curve > &disc)=0
discounts the cashflow
virtual ~CashFlow()
destructor
Definition: CashFlow.hpp:66
The class implements the concept of interest rate.
Definition: interestRate.hpp:25
File contains interface of interest rate curves.
virtual CashFlow * clone() const =0
virtual copy constructor
File contains definition of InterestRate class.