Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
convertiblebondreferencedata.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2019 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file ored/portfolio/convertiblebondreferencedata.hpp
20 \brief reference data
21 \ingroup portfolio
22*/
23
24#pragma once
25
29
30#include <ql/cashflow.hpp>
31
32#include <ql/shared_ptr.hpp>
33
34namespace ore {
35namespace data {
36
37using QuantLib::Leg;
38using std::map;
39using std::pair;
40using std::string;
41using std::vector;
42
43//! Convertible Bond Reference data
45public:
46 static constexpr const char* TYPE = "ConvertibleBond";
47
48 ConvertibleBondReferenceDatum() : callData_("CallData"), putData_("PutData") {}
49
51 : ReferenceDatum(TYPE, id), callData_("CallData"), putData_("PutData") {}
52
60
61 void fromXML(XMLNode* node) override;
62 XMLNode* toXML(ore::data::XMLDocument& doc) const override;
63
70 }
71 std::string detachable() const { return detachable_; }
72
78 }
81 }
82
83private:
89 std::string detachable_;
90};
91
92} // namespace data
93} // namespace ore
const ConvertibleBondData::CallabilityData & callData() const
ConvertibleBondData::DividendProtectionData dividendProtectionData_
ConvertibleBondData::CallabilityData callData_
const ConvertibleBondData::DividendProtectionData & dividendProtectionData() const
void setConversionData(const ConvertibleBondData::ConversionData &conversionData)
ConvertibleBondData::CallabilityData putData_
ConvertibleBondData::ConversionData conversionData_
const ConvertibleBondData::CallabilityData & putData() const
XMLNode * toXML(ore::data::XMLDocument &doc) const override
void setPutData(const ConvertibleBondData::CallabilityData &putData)
void setDividendProtectionData(const ConvertibleBondData::DividendProtectionData &dividendProtectionData)
const BondReferenceDatum::BondData & bondData() const
void setBondData(const BondReferenceDatum::BondData &bondData)
ConvertibleBondReferenceDatum(const string &id, const BondReferenceDatum::BondData &bondData, const ConvertibleBondData::CallabilityData &callData, const ConvertibleBondData::CallabilityData &putData, const ConvertibleBondData::ConversionData &conversionData, const ConvertibleBondData::DividendProtectionData &dividendProtectionData)
void setCallData(const ConvertibleBondData::CallabilityData &callData)
const ConvertibleBondData::ConversionData & conversionData() const
Base class for reference data.
const std::string & id() const
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
convertible bond data model and serialization
leg data model and serialization
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
Reference data model and serialization.