Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
callableswap.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2018 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/callableswap.hpp
20 \brief Callable Swap data model and serialization
21 \ingroup tradedata
22*/
23
24#pragma once
25
28
29namespace ore {
30namespace data {
31
32//! Serializable Swaption
33/*!
34 \ingroup tradedata
35*/
37public:
38 //! Default constructor
39 CallableSwap() : ore::data::Trade("CallableSwap") {}
40 //! Constructor
42 : Trade("CallableSwap", env), swap_(swap), swaption_(swaption) {}
43
44 //! Build QuantLib/QuantExt instrument, link pricing engine
45 void build(const QuantLib::ext::shared_ptr<ore::data::EngineFactory>&) override;
46
47 //! \name Inspectors
48 //@{
49 const ore::data::Swap& swap() const { return swap_; }
50 const ore::data::Swaption& swaption() const { return swaption_; }
51 //@}
52
53 //! \name Serialisation
54 //@{
55 virtual void fromXML(ore::data::XMLNode* node) override;
56 virtual ore::data::XMLNode* toXML(ore::data::XMLDocument& doc) const override;
57 //@}
58
59 const std::map<std::string,boost::any>& additionalData() const override;
60
61private:
64};
65} // namespace data
66} // namespace ore
Serializable Swaption.
const ore::data::Swap & swap() const
CallableSwap(const ore::data::Envelope &env, const ore::data::Swap &swap, const ore::data::Swaption &swaption)
Constructor.
const ore::data::Swaption & swaption() const
virtual void fromXML(ore::data::XMLNode *node) override
CallableSwap()
Default constructor.
virtual ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
void build(const QuantLib::ext::shared_ptr< ore::data::EngineFactory > &) override
Build QuantLib/QuantExt instrument, link pricing engine.
ore::data::Swaption swaption_
ore::data::Swap swap_
const std::map< std::string, boost::any > & additionalData() const override
returns all additional data returned by the trade once built
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Serializable Swap, Single and Cross Currency.
Definition: swap.hpp:36
Serializable Swaption.
Definition: swaption.hpp:39
Trade base class.
Definition: trade.hpp:55
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
Swap trade data model and serialization.
Swaption data model and serialization.