Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
bondindexbuilder.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 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 ored/utilities/bondindexbuilder.hpp
20 \brief Interface for building a bond index
21 \ingroup utilities
22*/
23
24#pragma once
25
27
28namespace ore {
29namespace data {
30
32public:
33 BondIndexBuilder(BondData bondData, const bool dirty, const bool relative,
34 const Calendar& fixingCalendar, const bool conditionalOnSurvival,
35 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
36 QuantLib::Real bidAskAdjustment = 0.0, const bool bondIssueDateFallback = false);
37
38 BondIndexBuilder(const Bond& bond, const bool dirty, const bool relative,
39 const Calendar& fixingCalendar, const bool conditionalOnSurvival,
40 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
41 QuantLib::Real bidAskAdjustment = 0.0, const bool bondIssueDateFallback = false);
42
43 BondIndexBuilder(const std::string& securityId, const bool dirty, const bool relative,
44 const Calendar& fixingCalendar, const bool conditionalOnSurvival,
45 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory, QuantLib::Real bidAskAdjustment = 0.0,
46 const bool bondIssueDateFallback = false);
47
48 QuantLib::ext::shared_ptr<QuantExt::BondIndex> bondIndex() const;
49 void addRequiredFixings(RequiredFixings& requiredFixings, Leg leg = {});
50 const Bond& bond() const { return bond_; };
51 QuantLib::Real priceAdjustment(QuantLib::Real price);
52
53private:
55 QuantLib::ext::shared_ptr<QuantExt::BondIndex> bondIndex_;
57 const bool dirty_;
58
59 void buildIndex(const bool relative, const Calendar& fixingCalendar, const bool conditionalOnSurvival,
60 const QuantLib::ext::shared_ptr<EngineFactory>& engineFactory,
61 QuantLib::Real bidAskAdjustment, const bool bondIssueDateFallback);
62};
63
64} // namespace data
65} // namespace ore
Bond trade data model and serialization.
Serializable Bond.
Definition: bond.hpp:153
QuantLib::Real priceAdjustment(QuantLib::Real price)
BondIndexBuilder(BondData bondData, const bool dirty, const bool relative, const Calendar &fixingCalendar, const bool conditionalOnSurvival, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::Real bidAskAdjustment=0.0, const bool bondIssueDateFallback=false)
QuantLib::ext::shared_ptr< QuantExt::BondIndex > bondIndex() const
void buildIndex(const bool relative, const Calendar &fixingCalendar, const bool conditionalOnSurvival, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::Real bidAskAdjustment, const bool bondIssueDateFallback)
BondIndexBuilder(const Bond &bond, const bool dirty, const bool relative, const Calendar &fixingCalendar, const bool conditionalOnSurvival, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::Real bidAskAdjustment=0.0, const bool bondIssueDateFallback=false)
QuantLib::ext::shared_ptr< QuantExt::BondIndex > bondIndex_
void addRequiredFixings(RequiredFixings &requiredFixings, Leg leg={})
BondIndexBuilder(const std::string &securityId, const bool dirty, const bool relative, const Calendar &fixingCalendar, const bool conditionalOnSurvival, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, QuantLib::Real bidAskAdjustment=0.0, const bool bondIssueDateFallback=false)
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23