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