Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
ascot.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2020 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
18/*! \file ored/portfolio/ascot.hpp
19 \brief Ascot (or Convertible Bond Option) trade data model and serialization
20 \ingroup tradedata
21 */
22
23#pragma once
24
27
30
31namespace ore {
32namespace data {
33
34//! Serializable Convertible Bond
35class Ascot : public Trade {
36public:
37 //! Default constructor
38 Ascot() : Trade("Ascot") {}
39
40 //! Constructor for coupon bonds
41 Ascot(const Envelope& env, const ConvertibleBond& bond, const OptionData& optionData,
42 const ore::data::LegData& fundingLegData)
43 : Trade("Ascot", env), bond_(bond), optionData_(optionData), fundingLegData_(fundingLegData) {}
44
45 void build(const QuantLib::ext::shared_ptr<ore::data::EngineFactory>&) override;
46 void fromXML(XMLNode* node) override;
47 XMLNode* toXML(XMLDocument& doc) const override;
48 std::map<AssetClass, std::set<std::string>>
49 underlyingIndices(const QuantLib::ext::shared_ptr<ReferenceDataManager>& referenceDataManager = nullptr) const override;
50
51 const ConvertibleBond& bond() const { return bond_; }
52 const OptionData& optionData() const { return optionData_; }
54
55 // FIXE remove? this is only needed for the simm product class determination.
56 const string& creditCurveId() const { return bond_.data().bondData().creditCurveId(); }
57
58private:
62};
63
64} // namespace data
65} // namespace ore
ext::shared_ptr< ConvertibleBond2 > bond_
ConvertibleBond bond_
Definition: ascot.hpp:59
OptionData optionData_
Definition: ascot.hpp:60
const ConvertibleBond & bond() const
Definition: ascot.hpp:51
const ore::data::LegData & fundingLegData() const
Definition: ascot.hpp:53
Ascot()
Default constructor.
Definition: ascot.hpp:38
Ascot(const Envelope &env, const ConvertibleBond &bond, const OptionData &optionData, const ore::data::LegData &fundingLegData)
Constructor for coupon bonds.
Definition: ascot.hpp:41
ore::data::LegData fundingLegData_
Definition: ascot.hpp:61
const OptionData & optionData() const
Definition: ascot.hpp:52
const string & creditCurveId() const
Definition: ascot.hpp:56
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Serializable object holding leg data.
Definition: legdata.hpp:844
Serializable object holding option data.
Definition: optiondata.hpp:42
Trade base class.
Definition: trade.hpp:55
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Convertible Bond trade data model and serialization.
convertible bond data model and serialization
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
trade option data model and serialization
base trade data model and serialization