Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FlatForwardDividendCurve Class Reference

#include <qle/termstructures/flatforwarddividendcurve.hpp>

+ Inheritance diagram for FlatForwardDividendCurve:
+ Collaboration diagram for FlatForwardDividendCurve:

Public Member Functions

 FlatForwardDividendCurve (const Date &asof, const Handle< YieldTermStructure > &dividendCurve, const Handle< YieldTermStructure > &forecastCurve)
 
Date maxDate () const override
 
DiscountFactor discountImpl (Time) const override
 

Private Attributes

Handle< YieldTermStructure > dividendCurve_
 
Handle< YieldTermStructure > forecastCurve_
 

Detailed Description

Definition at line 32 of file flatforwarddividendcurve.hpp.

Constructor & Destructor Documentation

◆ FlatForwardDividendCurve()

FlatForwardDividendCurve ( const Date &  asof,
const Handle< YieldTermStructure > &  dividendCurve,
const Handle< YieldTermStructure > &  forecastCurve 
)

Definition at line 34 of file flatforwarddividendcurve.hpp.

36 : YieldTermStructure(asof, dividendCurve->calendar(), dividendCurve->dayCounter()), dividendCurve_(dividendCurve),
37 forecastCurve_(forecastCurve) {}
Handle< YieldTermStructure > dividendCurve_
Handle< YieldTermStructure > forecastCurve_

Member Function Documentation

◆ maxDate()

Date maxDate ( ) const
override

Definition at line 23 of file flatforwarddividendcurve.cpp.

23 {
24 return Date::maxDate(); }

◆ discountImpl()

DiscountFactor discountImpl ( Time  t) const
override

Definition at line 26 of file flatforwarddividendcurve.cpp.

26 {
27 Time maxTime = dividendCurve_->maxTime();
28 if (t > maxTime) {
29 if (allowsExtrapolation())
30 return dividendCurve_->discount(maxTime) / forecastCurve_->discount(maxTime) * forecastCurve_->discount(t);
31 else
32 return dividendCurve_->discount(maxTime);
33 }
34
35 return dividendCurve_->discount(t);
36}

Member Data Documentation

◆ dividendCurve_

Handle<YieldTermStructure> dividendCurve_
private

Definition at line 43 of file flatforwarddividendcurve.hpp.

◆ forecastCurve_

Handle<YieldTermStructure> forecastCurve_
private

Definition at line 44 of file flatforwarddividendcurve.hpp.