Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
convertiblebond2.cpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2021 Quaternion Risk Management Ltd.
3
4 This file is part of ORE, a free-software/open-source library
5 for transparent pricing and risk analysis - http://opensourcerisk.org
6
7 ORE is free software: you can redistribute it and/or modify it
8 under the terms of the Modified BSD License. You should have received a
9 copy of the license along with this program.
10 The license is also available online at <http://opensourcerisk.org>
11
12 This program is distributed on the basis that it will form a useful
13 contribution to risk analytics and model standardisation, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
16*/
17
19
20namespace QuantExt {
21
22using namespace QuantLib;
23
24ConvertibleBond2::ConvertibleBond2(Size settlementDays, const Calendar& calendar, const Date& issueDate,
25 const Leg& coupons, const ExchangeableData& exchangeableData,
26 const std::vector<CallabilityData>& callData, const MakeWholeData& makeWholeData,
27 const std::vector<CallabilityData>& putData,
28 const std::vector<ConversionRatioData>& conversionRatioData,
29 const std::vector<ConversionData>& conversionData,
30 const std::vector<MandatoryConversionData>& mandatoryConversionData,
31 const std::vector<ConversionResetData>& conversionResetData,
32 const std::vector<DividendProtectionData>& dividendProtectionData,
33 const bool detachable, const bool perpetual)
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) {}
39
41 Bond::setupArguments(args);
43 QL_REQUIRE(arguments != nullptr, "ConvertibleBond2::setupArguments(): wrong argument type");
44 arguments->startDate = startDate();
45 arguments->notionals = notionals();
57}
58
59void ConvertibleBond2::fetchResults(const PricingEngine::results* r) const { Bond::fetchResults(r); }
60
61void ConvertibleBond2::arguments::validate() const { Bond::arguments::validate(); }
62void ConvertibleBond2::results::reset() { Bond::results::reset(); }
63
64} // namespace QuantExt
std::vector< CallabilityData > putData
std::vector< DividendProtectionData > dividendProtectionData
std::vector< ConversionResetData > conversionResetData
std::vector< CallabilityData > callData
std::vector< ConversionRatioData > conversionRatioData
std::vector< ConversionData > conversionData
std::vector< MandatoryConversionData > mandatoryConversionData
void setupArguments(PricingEngine::arguments *) const override
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)
std::vector< DividendProtectionData > dividendProtectionData_
std::vector< ConversionData > conversionData_
std::vector< MandatoryConversionData > mandatoryConversionData_
std::vector< ConversionResetData > conversionResetData_
void fetchResults(const PricingEngine::results *) const override
std::vector< ConversionRatioData > conversionRatioData_
std::vector< CallabilityData > putData_
std::vector< CallabilityData > callData_
ExchangeableData exchangeableData_