Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
tlockdata.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2021 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/tlockdata.hpp
20 \brief A class to hold Treasury-Lock data
21 \ingroup tradedata
22 */
23
24#pragma once
25
26#include <boost/optional.hpp>
31
32namespace ore {
33namespace data {
34
35/*! Serializable credit default swap data
36 \ingroup tradedata
37*/
39public:
40 //! Default constructor
42
43 //! Constructor that takes an explicit \p creditCurveId
45 string terminationDate, int paymentGap, string paymentCalendar)
48
49 bool empty() const { return empty_; }
50 bool payer() const { return payer_; }
52 const BondData& bondData() const { return bondData_; }
53 const BondData& originalBondData() const { return originalBondData_; }
54 Real referenceRate() const { return referenceRate_; }
55 const string& dayCounter() const { return dayCounter_; }
56 const string& terminationDate() const { return terminationDate_; }
57 int paymentGap() const { return paymentGap_; }
58 const string& paymentCalendar() const { return paymentCalendar_; }
59
60 //! XMLSerializable interface
61 virtual void fromXML(XMLNode* node) override;
62 virtual XMLNode* toXML(XMLDocument& doc) const override;
63
64private:
65 bool empty_;
66 bool payer_;
73};
74
75} // namespace data
76} // namespace ore
Bond trade data model and serialization.
bond utilities
virtual void fromXML(XMLNode *node) override
XMLSerializable interface.
Definition: tlockdata.cpp:30
virtual XMLNode * toXML(XMLDocument &doc) const override
Definition: tlockdata.cpp:44
const string & dayCounter() const
Definition: tlockdata.hpp:55
TreasuryLockData(bool payer, const BondData &bondData, Real referenceRate, string dayCounter, string terminationDate, int paymentGap, string paymentCalendar)
Constructor that takes an explicit creditCurveId.
Definition: tlockdata.hpp:44
const string & terminationDate() const
Definition: tlockdata.hpp:56
const BondData & bondData() const
Definition: tlockdata.hpp:52
const string & paymentCalendar() const
Definition: tlockdata.hpp:58
const BondData & originalBondData() const
Definition: tlockdata.hpp:53
TreasuryLockData()
Default constructor.
Definition: tlockdata.hpp:41
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Base class for all serializable classes.
Definition: xmlutils.hpp:101
leg data model and serialization
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
base trade data model and serialization