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

convertible bond More...

#include <qle/instruments/convertiblebond.hpp>

+ Inheritance diagram for ConvertibleBond:
+ Collaboration diagram for ConvertibleBond:

Classes

class  option
 

Public Member Functions

 ConvertibleBond (Natural settlementDays, const Calendar &calendar, const Date &issueDate, const Leg &coupons, const QuantLib::ext::shared_ptr< Exercise > &exercise, const Real conversionRatio, const DividendSchedule &dividends, const CallabilitySchedule &callability)
 similar to bond ctor, coupons should not contain redemption flows More...
 
QuantLib::ext::shared_ptr< Exercise > exercise () const
 
Real conversionRatio () const
 
const DividendSchedule & dividends () const
 
const CallabilitySchedule & callability () const
 

Protected Member Functions

void performCalculations () const override
 

Protected Attributes

QuantLib::ext::shared_ptr< Exercise > exercise_
 
Real conversionRatio_
 
DividendSchedule dividends_
 
CallabilitySchedule callability_
 
QuantLib::ext::shared_ptr< optionoption_
 

Detailed Description

convertible bond

Definition at line 56 of file convertiblebond.hpp.

Constructor & Destructor Documentation

◆ ConvertibleBond()

ConvertibleBond ( Natural  settlementDays,
const Calendar &  calendar,
const Date &  issueDate,
const Leg &  coupons,
const QuantLib::ext::shared_ptr< Exercise > &  exercise,
const Real  conversionRatio,
const DividendSchedule &  dividends,
const CallabilitySchedule &  callability 
)

similar to bond ctor, coupons should not contain redemption flows

Definition at line 36 of file convertiblebond.cpp.

40 : Bond(settlementDays, calendar, issueDate, coupons), exercise_(exercise), conversionRatio_(conversionRatio),
42
43 if (!callability.empty()) {
44 QL_REQUIRE(callability.back()->date() <= maturityDate_, "last callability date (" << callability.back()->date()
45 << ") later than maturity ("
46 << maturityDate_ << ")");
47 }
48
49 QL_REQUIRE(exercise_, "no exercise for conversion given");
50 QL_REQUIRE(!exercise_->dates().empty(), "exercise does not contain any conversion dates");
51
52 option_ = QuantLib::ext::make_shared<option>(this);
53}
QuantLib::ext::shared_ptr< Exercise > exercise_
const CallabilitySchedule & callability() const
QuantLib::ext::shared_ptr< option > option_
const DividendSchedule & dividends() const
QuantLib::ext::shared_ptr< Exercise > exercise() const
CallabilitySchedule callability_
+ Here is the call graph for this function:

Member Function Documentation

◆ exercise()

QuantLib::ext::shared_ptr< Exercise > exercise ( ) const

Definition at line 63 of file convertiblebond.hpp.

63{ return exercise_; }
+ Here is the caller graph for this function:

◆ conversionRatio()

Real conversionRatio ( ) const

Definition at line 64 of file convertiblebond.hpp.

64{ return conversionRatio_; }
+ Here is the caller graph for this function:

◆ dividends()

const DividendSchedule & dividends ( ) const

Definition at line 65 of file convertiblebond.hpp.

65{ return dividends_; }

◆ callability()

const CallabilitySchedule & callability ( ) const

Definition at line 66 of file convertiblebond.hpp.

66{ return callability_; }
+ Here is the caller graph for this function:

◆ performCalculations()

void performCalculations ( ) const
overrideprotected

Definition at line 55 of file convertiblebond.cpp.

55 {
56 option_->setPricingEngine(engine_);
57 NPV_ = settlementValue_ = option_->NPV();
58 additionalResults_ = option_->additionalResults();
59 errorEstimate_ = Null<Real>();
60}
QuantLib::ext::shared_ptr< PricingEngine > engine_
Definition: cdsoption.cpp:78

Member Data Documentation

◆ exercise_

QuantLib::ext::shared_ptr<Exercise> exercise_
protected

Definition at line 71 of file convertiblebond.hpp.

◆ conversionRatio_

Real conversionRatio_
protected

Definition at line 72 of file convertiblebond.hpp.

◆ dividends_

DividendSchedule dividends_
protected

Definition at line 73 of file convertiblebond.hpp.

◆ callability_

CallabilitySchedule callability_
protected

Definition at line 74 of file convertiblebond.hpp.

◆ option_

QuantLib::ext::shared_ptr<option> option_
protected

Definition at line 76 of file convertiblebond.hpp.