deposit.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_DEPOSIT_HPP
2 #define JULIAN_DEPOSIT_HPP
3 
8 
9 namespace julian {
10 
22  class Deposit: public LinearInstrument, public ir::BuildingBlock {
23  public:
24  Deposit(Date trade_date,Date start_date,Date end_date,InterestRate rate ,double notional,double quoting);
25 
29 
30  double price(const SmartPointer<ir::Curve>&);
33  void valuation(const SmartPointer<ir::Curve>& discounting1,const SmartPointer<ir::Curve>& discounting2,const SmartPointer<ir::Curve>& projecting1,const SmartPointer<ir::Curve>& projecting2);
35 
39  Date getDate() const override;
40  std::pair<CashFlowVector, CashFlowVector> getCFs() const override;
41  InterestRate getInterestRate() const override;
42  double calibrate(const SmartPointer<ir::Curve>& calibrated) override;
43  double calibrate(const SmartPointer<ir::Curve>& discounting, const SmartPointer<ir::Curve>& projection, const SmartPointer<ir::Curve>& calibrated) override;
44  double getParRate(const SmartPointer<ir::Curve>& discounting,const SmartPointer<ir::Curve>& projection, const SmartPointer<ir::Curve>& projection2) override;
45  double getQuoting() override;
46  void changeQuoting(double) override;
47  std::string info() const override;
49 
50  ~Deposit(){};
51  Deposit* clone() const;
52 
53  friend std::ostream& operator<<(std::ostream&, Deposit&);
54 
55  private:
58  double quoting_;
60  };
61 }
62 #endif
File contains types common to all financial instruments.
double calibrate(const SmartPointer< ir::Curve > &calibrated) override
Method calibrate is used by root finding estimator.
Definition: deposit.cpp:45
Class is an abstract class expressing the concept of linear instruments like deposits, FRAs, futures, fxForwards and swaps.
Definition: linearInstrument.hpp:21
File containing definition of interest rates curve building block.
Deposit(Date trade_date, Date start_date, Date end_date, InterestRate rate, double notional, double quoting)
constructor
Definition: deposit.cpp:11
Definition: cadHoliday.cpp:3
Deposit * clone() const
Virtual copy constructor.
Definition: deposit.cpp:145
InterestRate getInterestRate() const override
Returns interest rates convention of deposit.
Definition: deposit.cpp:68
Class helps to handle the vector of CFs.
Definition: CashFlowVector.hpp:22
Building Block is a class that defines the interface for benchmark instruments used for estimating in...
Definition: curveBuildingBlock.hpp:27
Class implements a deposit contract.
Definition: deposit.hpp:22
void changeQuoting(double) override
changes quoting of the deposit
Definition: deposit.cpp:60
Date getDate() const override
returns maturity of deposit
Definition: deposit.cpp:52
Date trade_date_
The date on which deposit is dealt.
Definition: deposit.hpp:56
double price(const SmartPointer< ir::Curve > &)
calculates price of deposit by summing the discounted CFs
Definition: deposit.cpp:20
File contains definition of linear instruments interface.
CashFlowVector cfs_
Deposit cashflows .
Definition: deposit.hpp:59
void valuation(const SmartPointer< ir::Curve > &)
prints price and CFs of deposit
Definition: deposit.cpp:126
friend std::ostream & operator<<(std::ostream &, Deposit &)
Overloads stream operator.
Definition: deposit.cpp:103
InterestRate rate_
Convention of interest rates.
Definition: deposit.hpp:57
std::string info() const override
returns the name of instrument: Deposit
Definition: deposit.cpp:139
double quoting_
Deposit interest rate.
Definition: deposit.hpp:58
Class implements a date object.
Definition: date.hpp:27
The class implements the concept of interest rate.
Definition: interestRate.hpp:25
double getQuoting() override
Returns quoting.
Definition: deposit.cpp:95
double getParRate(const SmartPointer< ir::Curve > &discounting, const SmartPointer< ir::Curve > &projection, const SmartPointer< ir::Curve > &projection2) override
Implies quoting of benchmark instrument from interest rate curves provided.
Definition: deposit.cpp:87
File contains definition of InterestRate class.
std::pair< CashFlowVector, CashFlowVector > getCFs() const override
Returns the sets of cashflows associated with deposit.
Definition: deposit.cpp:77