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

Rebated exercise with exercise dates != notification dates and arbitrary period. More...

#include <qle/instruments/rebatedexercise.hpp>

+ Inheritance diagram for RebatedExercise:
+ Collaboration diagram for RebatedExercise:

Public Member Functions

 RebatedExercise (const Exercise &exercise, const Real rebate=0.0, const Natural rebateSettlementDays=0, const Calendar &rebatePaymentCalendar=NullCalendar(), const BusinessDayConvention rebatePaymentConvention=Following)
 as ql ctor More...
 
 RebatedExercise (const Exercise &exercise, const Real rebate, const Period &rebateSettlementPeriod, const Calendar &rebatePaymentCalendar, const BusinessDayConvention rebatePaymentConvention)
 same, but takes settl period instead of days More...
 
 RebatedExercise (const Exercise &exercise, const std::vector< Real > &rebates, const Natural rebateSettlementDays=0, const Calendar &rebatePaymentCalendar=NullCalendar(), const BusinessDayConvention rebatePaymentConvention=Following)
 as ql ctor More...
 
 RebatedExercise (const Exercise &exercise, const std::vector< Real > &rebates, const Period &rebateSettlementPeriod, const Calendar &rebatePaymentCalendar, const BusinessDayConvention rebatePaymentConvention)
 same, but takes settl period instead of days More...
 
 RebatedExercise (const Exercise &exercise, const std::vector< Date > &exerciseDates, const std::vector< Real > &rebates, const Period &rebateSettlementPeriod, const Calendar &rebatePaymentCalendar=NullCalendar(), const BusinessDayConvention rebatePaymentConvention=Following)
 ctor that takes exercise dates != notification dates and a rebate settlement period More...
 
Real rebate (Size index) const
 
Date rebatePaymentDate (Size index) const
 
Date rebatePaymentDate (const Date &exerciseDate) const
 
const std::vector< Real > & rebates () const
 

Private Attributes

std::vector< Date > exerciseDates_
 
std::vector< Real > rebates_
 
Period rebateSettlementPeriod_
 
Calendar rebatePaymentCalendar_
 
BusinessDayConvention rebatePaymentConvention_
 

Detailed Description

Rebated exercise with exercise dates != notification dates and arbitrary period.

Definition at line 36 of file rebatedexercise.hpp.

Constructor & Destructor Documentation

◆ RebatedExercise() [1/5]

RebatedExercise ( const Exercise &  exercise,
const Real  rebate = 0.0,
const Natural  rebateSettlementDays = 0,
const Calendar &  rebatePaymentCalendar = NullCalendar(),
const BusinessDayConvention  rebatePaymentConvention = Following 
)

as ql ctor

Definition at line 23 of file rebatedexercise.cpp.

26 : RebatedExercise(exercise, exercise.dates(), std::vector<Real>(exercise.dates().size(), rebate),
27 rebateSettlementDays * Days, rebatePaymentCalendar, rebatePaymentConvention) {}
RebatedExercise(const Exercise &exercise, const Real rebate=0.0, const Natural rebateSettlementDays=0, const Calendar &rebatePaymentCalendar=NullCalendar(), const BusinessDayConvention rebatePaymentConvention=Following)
as ql ctor
Real rebate(Size index) const

◆ RebatedExercise() [2/5]

RebatedExercise ( const Exercise &  exercise,
const Real  rebate,
const Period &  rebateSettlementPeriod,
const Calendar &  rebatePaymentCalendar,
const BusinessDayConvention  rebatePaymentConvention 
)

same, but takes settl period instead of days

Definition at line 29 of file rebatedexercise.cpp.

32 : RebatedExercise(exercise, exercise.dates(), std::vector<Real>(exercise.dates().size(), rebate),
33 rebateSettlementPeriod, rebatePaymentCalendar, rebatePaymentConvention) {}

◆ RebatedExercise() [3/5]

RebatedExercise ( const Exercise &  exercise,
const std::vector< Real > &  rebates,
const Natural  rebateSettlementDays = 0,
const Calendar &  rebatePaymentCalendar = NullCalendar(),
const BusinessDayConvention  rebatePaymentConvention = Following 
)

as ql ctor

Definition at line 35 of file rebatedexercise.cpp.

38 : RebatedExercise(exercise, exercise.dates(), rebates, rebateSettlementDays * Days, rebatePaymentCalendar,
39 rebatePaymentConvention) {}
const std::vector< Real > & rebates() const

◆ RebatedExercise() [4/5]

RebatedExercise ( const Exercise &  exercise,
const std::vector< Real > &  rebates,
const Period &  rebateSettlementPeriod,
const Calendar &  rebatePaymentCalendar,
const BusinessDayConvention  rebatePaymentConvention 
)

same, but takes settl period instead of days

Definition at line 41 of file rebatedexercise.cpp.

44 : RebatedExercise(exercise, exercise.dates(), rebates, rebateSettlementPeriod, rebatePaymentCalendar,
45 rebatePaymentConvention) {}

◆ RebatedExercise() [5/5]

RebatedExercise ( const Exercise &  exercise,
const std::vector< Date > &  exerciseDates,
const std::vector< Real > &  rebates,
const Period &  rebateSettlementPeriod,
const Calendar &  rebatePaymentCalendar = NullCalendar(),
const BusinessDayConvention  rebatePaymentConvention = Following 
)

ctor that takes exercise dates != notification dates and a rebate settlement period

Definition at line 47 of file rebatedexercise.cpp.

51 : Exercise(exercise), exerciseDates_(exerciseDates), rebates_(rebates),
52 rebateSettlementPeriod_(rebateSettlementPeriod), rebatePaymentCalendar_(rebatePaymentCalendar),
53 rebatePaymentConvention_(rebatePaymentConvention) {
54 QL_REQUIRE(exerciseDates_.empty() || exerciseDates_.size() == dates().size(),
55 "then number of notification dates ("
56 << dates().size() << ") must be equal to the number of exercise dates (" << exerciseDates_.size()
57 << ")");
58 QL_REQUIRE(rebates_.size() == dates().size(),
59 "the number of rebates (" << rebates_.size() << ") must be equal to the number of exercise dates ("
60 << dates().size());
61}
std::vector< Date > exerciseDates_
BusinessDayConvention rebatePaymentConvention_
std::vector< Real > rebates_

Member Function Documentation

◆ rebate()

Real rebate ( Size  index) const

Definition at line 69 of file rebatedexercise.hpp.

69 {
70 QL_REQUIRE(index < rebates_.size(),
71 "rebate with index " << index << " does not exist (0..." << (rebates_.size() - 1) << ")");
72 return rebates_[index];
73}

◆ rebatePaymentDate() [1/2]

Date rebatePaymentDate ( Size  index) const

Definition at line 75 of file rebatedexercise.hpp.

75 {
76 QL_REQUIRE(type_ == European || type_ == Bermudan, "for american style exercises the rebate payment date "
77 << "has to be calculted in the client code");
79}

◆ rebatePaymentDate() [2/2]

Date rebatePaymentDate ( const Date &  exerciseDate) const

Definition at line 81 of file rebatedexercise.hpp.

81 {
83}

◆ rebates()

const std::vector< Real > & rebates ( ) const

Definition at line 59 of file rebatedexercise.hpp.

59{ return rebates_; }

Member Data Documentation

◆ exerciseDates_

std::vector<Date> exerciseDates_
private

Definition at line 62 of file rebatedexercise.hpp.

◆ rebates_

std::vector<Real> rebates_
private

Definition at line 63 of file rebatedexercise.hpp.

◆ rebateSettlementPeriod_

Period rebateSettlementPeriod_
private

Definition at line 64 of file rebatedexercise.hpp.

◆ rebatePaymentCalendar_

Calendar rebatePaymentCalendar_
private

Definition at line 65 of file rebatedexercise.hpp.

◆ rebatePaymentConvention_

BusinessDayConvention rebatePaymentConvention_
private

Definition at line 66 of file rebatedexercise.hpp.