Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
formulabasedlegdata.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/formulabasedlegdata.hpp
20 \brief leg data for formula based leg types
21 \ingroup portfolio
22*/
23
24#pragma once
25
27#include <qle/indexes/formulabasedindex.hpp>
28
29namespace ore {
30namespace data {
31
33public:
34 //! Default constructor
36 //! Constructor
41 }
42
43 //! \name Inspectors
44 //@{
45 const string& formulaBasedIndex() const { return formulaBasedIndex_; }
46 int fixingDays() const { return fixingDays_; }
47 const string& fixingCalendar() const { return fixingCalendar_; }
48 bool isInArrears() const { return isInArrears_; }
49 //@}
50
51 //! \name Serialisation
52 //@{
53 virtual void fromXML(XMLNode* node) override;
54 virtual XMLNode* toXML(XMLDocument& doc) const override;
55 //@}
56private:
57 void initIndices();
62};
63
64Leg makeFormulaBasedLeg(const LegData& data, const QuantLib::ext::shared_ptr<QuantExt::FormulaBasedIndex>& formulaBasedIndex,
65 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
66 const std::map<std::string, QuantLib::ext::shared_ptr<QuantLib::InterestRateIndex>>& indexMaps,
67 const QuantLib::Date& openEndDateReplacement = Null<Date>());
68
69} // namespace data
70} // namespace ore
const string & formulaBasedIndex() const
const string & fixingCalendar() const
FormulaBasedLegData(const string &formulaBasedIndex, int fixingDays, bool isInArrears)
Constructor.
virtual void fromXML(XMLNode *node) override
FormulaBasedLegData()
Default constructor.
virtual XMLNode * toXML(XMLDocument &doc) const override
Serializable Additional Leg Data.
Definition: legdata.hpp:63
Serializable object holding leg data.
Definition: legdata.hpp:844
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
leg data model and serialization
@ data
Definition: log.hpp:77
Leg makeFormulaBasedLeg(const LegData &data, const QuantLib::ext::shared_ptr< QuantExt::FormulaBasedIndex > &formulaBasedIndex, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const std::map< std::string, QuantLib::ext::shared_ptr< QuantLib::InterestRateIndex > > &indexMaps, const QuantLib::Date &openEndDateReplacement)
Serializable Credit Default Swap.
Definition: namespaces.docs:23