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

#include <qle/instruments/convertiblebond2.hpp>

+ Inheritance diagram for ConvertibleBond2:
+ Collaboration diagram for ConvertibleBond2:

Classes

class  arguments
 
struct  CallabilityData
 
struct  ConversionData
 
struct  ConversionRatioData
 
struct  ConversionResetData
 
struct  DividendProtectionData
 
class  engine
 
struct  ExchangeableData
 
struct  MakeWholeData
 
struct  MandatoryConversionData
 
class  results
 

Public Member Functions

 ConvertibleBond2 (Size settlementDays, const Calendar &calendar, const Date &issueDate, const Leg &coupons, const ExchangeableData &exchangeableData=ExchangeableData{false, false}, const std::vector< CallabilityData > &callData={}, const MakeWholeData &makeWholeData={}, const std::vector< CallabilityData > &putData={}, const std::vector< ConversionRatioData > &conversionRatioData={}, const std::vector< ConversionData > &conversionData={}, const std::vector< MandatoryConversionData > &mandatoryConversionData={}, const std::vector< ConversionResetData > &conversionResetData={}, const std::vector< DividendProtectionData > &dividendProtectionData={}, const bool detachable=false, const bool perpetual=false)
 

Private Member Functions

void setupArguments (PricingEngine::arguments *) const override
 
void fetchResults (const PricingEngine::results *) const override
 

Private Attributes

ExchangeableData exchangeableData_
 
std::vector< CallabilityDatacallData_
 
MakeWholeData makeWholeData_
 
std::vector< CallabilityDataputData_
 
std::vector< ConversionDataconversionData_
 
std::vector< ConversionRatioDataconversionRatioData_
 
std::vector< MandatoryConversionDatamandatoryConversionData_
 
std::vector< ConversionResetDataconversionResetData_
 
std::vector< DividendProtectionDatadividendProtectionData_
 
bool detachable_
 
bool perpetual_
 

Detailed Description

Definition at line 37 of file convertiblebond2.hpp.

Constructor & Destructor Documentation

◆ ConvertibleBond2()

ConvertibleBond2 ( Size  settlementDays,
const Calendar &  calendar,
const Date &  issueDate,
const Leg &  coupons,
const ExchangeableData exchangeableData = ExchangeableData{false, false},
const std::vector< CallabilityData > &  callData = {},
const MakeWholeData makeWholeData = {},
const std::vector< CallabilityData > &  putData = {},
const std::vector< ConversionRatioData > &  conversionRatioData = {},
const std::vector< ConversionData > &  conversionData = {},
const std::vector< MandatoryConversionData > &  mandatoryConversionData = {},
const std::vector< ConversionResetData > &  conversionResetData = {},
const std::vector< DividendProtectionData > &  dividendProtectionData = {},
const bool  detachable = false,
const bool  perpetual = false 
)

Definition at line 24 of file convertiblebond2.cpp.

34 : Bond(settlementDays, calendar, issueDate, coupons), exchangeableData_(exchangeableData), callData_(callData),
35 makeWholeData_(makeWholeData), putData_(putData), conversionData_(conversionData),
36 conversionRatioData_(conversionRatioData), mandatoryConversionData_(mandatoryConversionData),
37 conversionResetData_(conversionResetData), dividendProtectionData_(dividendProtectionData),
38 detachable_(detachable), perpetual_(perpetual) {}
std::vector< DividendProtectionData > dividendProtectionData_
std::vector< ConversionData > conversionData_
std::vector< MandatoryConversionData > mandatoryConversionData_
std::vector< ConversionResetData > conversionResetData_
std::vector< ConversionRatioData > conversionRatioData_
std::vector< CallabilityData > putData_
std::vector< CallabilityData > callData_
ExchangeableData exchangeableData_

Member Function Documentation

◆ setupArguments()

void setupArguments ( PricingEngine::arguments *  args) const
overrideprivate

Definition at line 40 of file convertiblebond2.cpp.

40 {
41 Bond::setupArguments(args);
42 ConvertibleBond2::arguments* arguments = dynamic_cast<ConvertibleBond2::arguments*>(args);
43 QL_REQUIRE(arguments != nullptr, "ConvertibleBond2::setupArguments(): wrong argument type");
44 arguments->startDate = startDate();
45 arguments->notionals = notionals();
46 arguments->exchangeableData = exchangeableData_;
47 arguments->callData = callData_;
48 arguments->makeWholeData = makeWholeData_;
49 arguments->putData = putData_;
50 arguments->conversionRatioData = conversionRatioData_;
51 arguments->conversionData = conversionData_;
52 arguments->mandatoryConversionData = mandatoryConversionData_;
53 arguments->conversionResetData = conversionResetData_;
54 arguments->dividendProtectionData = dividendProtectionData_;
55 arguments->detachable = detachable_;
56 arguments->perpetual = perpetual_;
57}

◆ fetchResults()

void fetchResults ( const PricingEngine::results *  r) const
overrideprivate

Definition at line 59 of file convertiblebond2.cpp.

59{ Bond::fetchResults(r); }

Member Data Documentation

◆ exchangeableData_

ExchangeableData exchangeableData_
private

Definition at line 127 of file convertiblebond2.hpp.

◆ callData_

std::vector<CallabilityData> callData_
private

Definition at line 128 of file convertiblebond2.hpp.

◆ makeWholeData_

MakeWholeData makeWholeData_
private

Definition at line 129 of file convertiblebond2.hpp.

◆ putData_

std::vector<CallabilityData> putData_
private

Definition at line 130 of file convertiblebond2.hpp.

◆ conversionData_

std::vector<ConversionData> conversionData_
private

Definition at line 131 of file convertiblebond2.hpp.

◆ conversionRatioData_

std::vector<ConversionRatioData> conversionRatioData_
private

Definition at line 132 of file convertiblebond2.hpp.

◆ mandatoryConversionData_

std::vector<MandatoryConversionData> mandatoryConversionData_
private

Definition at line 133 of file convertiblebond2.hpp.

◆ conversionResetData_

std::vector<ConversionResetData> conversionResetData_
private

Definition at line 134 of file convertiblebond2.hpp.

◆ dividendProtectionData_

std::vector<DividendProtectionData> dividendProtectionData_
private

Definition at line 135 of file convertiblebond2.hpp.

◆ detachable_

bool detachable_
private

Definition at line 136 of file convertiblebond2.hpp.

◆ perpetual_

bool perpetual_
private

Definition at line 137 of file convertiblebond2.hpp.