compoundedRate.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_COMPOUNDEDRATE_HPP
2 #define JULIAN_COMPOUNDEDRATE_HPP
3 
5 
6 namespace julian {
7 
23  class CompoundedRate: public Compounding {
24  public:
25  CompoundedRate(){};
26 
27  virtual double getCapitalization(double interest_rate,double accrual_time) const;
28  virtual double getRate(double future_value,double accrual_time) const;
29  virtual std::string info() const;
30 
31  virtual CompoundedRate* clone() const;
32  virtual ~CompoundedRate(){};
33 
34  friend std::ostream& operator<<(std::ostream& , CompoundedRate& );
35  friend class boost::serialization::access;
36  private:
37 
40  template<class Archive>
41  void serialize(Archive & , const unsigned int){
42  boost::serialization::base_object<Compounding>(*this);
43  }
44  };
45 }
46 
47 #endif
virtual double getCapitalization(double interest_rate, double accrual_time) const
Calculates future value.
Definition: compoundedRate.cpp:11
File contains interface of interest rate compounding concept.
Definition: cadHoliday.cpp:3
void serialize(Archive &, const unsigned int)
interface used by Boost serialization library
Definition: compoundedRate.hpp:41
Class is an abstract class expressing the concept of compounding interest rate.
Definition: compounding.hpp:23
virtual CompoundedRate * clone() const
Virtual copy constructor.
Definition: compoundedRate.cpp:28
friend std::ostream & operator<<(std::ostream &, CompoundedRate &)
Overloads stream operator.
Definition: compoundedRate.cpp:36
virtual double getRate(double future_value, double accrual_time) const
Calculates interest rate.
Definition: compoundedRate.cpp:20
The class encapsulates the compounded rate compounding method.
Definition: compoundedRate.hpp:23
virtual std::string info() const
Info about class.
Definition: compoundedRate.cpp:45