Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
forwardrateagreement.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017, 2023 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 portfolio/forwardrateagreement.hpp
20 \brief ForwardRateAgreement data model and serialization
21 \ingroup tradedata
22*/
23
24
25#pragma once
26
28
29namespace ore {
30namespace data {
31
32//! Serializable ForwardRateAgreement
33/*!
34 \ingroup tradedata
35*/
36class ForwardRateAgreement : public Swap {
37public:
38 ForwardRateAgreement() : ore::data::Swap("ForwardRateAgreement") {}
39 ForwardRateAgreement(Envelope& env, string longShort, string currency, string startDate, string endDate,
40 string index, double strike, double amount)
41 : ore::data::Swap(env, "ForwardRateAgreement"), longShort_(longShort), currency_(currency), startDate_(startDate),
42 endDate_(endDate), index_(index), strike_(strike), amount_(amount) {}
43
44 void build(const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory) override;
45
46 virtual void fromXML(XMLNode* node) override;
47 virtual XMLNode* toXML(XMLDocument& doc) const override;
48 const string& index() const { return index_; }
49
50private:
51 string longShort_;
52 string currency_;
53 string startDate_;
54 string endDate_;
55 string index_;
56 double strike_;
57 double amount_;
58};
59} // namespace data
60} // namespace ore
61
Serializable object holding generic trade data, reporting dimensions.
Definition: envelope.hpp:51
Serializable ForwardRateAgreement.
ForwardRateAgreement(Envelope &env, string longShort, string currency, string startDate, string endDate, string index, double strike, double amount)
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
void build(const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory) override
Build QuantLib/QuantExt instrument, link pricing engine.
Serializable Swap, Single and Cross Currency.
Definition: swap.hpp:36
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.