Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
bondutils.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2019 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/*!
20 \file portfolio/bondutils.hpp
21 \brief bond utilities
22 \ingroup portfolio
23*/
24
25#pragma once
26
29
31
32namespace ore {
33namespace data {
34
35using namespace ore::data;
36
37//! Populate bond data from name and ReferenceDataManager
38/*! The following elements are references and updated, if empty:
39 issuerId
40 settlementDays
41 calendar
42 issueDate
43 creditCurveId
44 creditGroup
45 referenceCurveId
46 incomeCurveId
47 volatilityCurveId
48 coupons */
49void populateFromBondReferenceData(std::string& subType,
50 std::string& issuerId, std::string& settlementDays, std::string& calendar,
51 std::string& issueDate, std::string& priceQuoteMethod,
52 std::string& priceQuoteBaseValue, std::string& creditCurveId,
53 std::string& creditGroup, std::string& referenceCurveId, std::string& incomeCurveId,
54 std::string& volatilityCurveId, std::vector<LegData>& coupons,
55 const std::string& name, const QuantLib::ext::shared_ptr<BondReferenceDatum>& bondRefData,
56 const std::string& startDate = "", const std::string& endDate = "");
57
58Date getOpenEndDateReplacement(const std::string& replacementPeriodStr, const Calendar& calendar = NullCalendar());
59
60} // namespace data
61} // namespace ore
Bond trade data model and serialization.
leg data model and serialization
@ data
Definition: log.hpp:77
Calendar calendar
Definition: utilities.cpp:441
Date getOpenEndDateReplacement(const std::string &replacementPeriodStr, const Calendar &calendar)
Definition: bondutils.cpp:118
void populateFromBondReferenceData(std::string &subType, std::string &issuerId, std::string &settlementDays, std::string &calendar, std::string &issueDate, std::string &priceQuoteMethod, string &priceQuoteBaseValue, std::string &creditCurveId, std::string &creditGroup, std::string &referenceCurveId, std::string &incomeCurveId, std::string &volatilityCurveId, std::vector< LegData > &coupons, const std::string &name, const QuantLib::ext::shared_ptr< BondReferenceDatum > &bondRefData, const std::string &startDate, const std::string &endDate)
Populate bond data from name and ReferenceDataManager.
Definition: bondutils.cpp:26
Serializable Credit Default Swap.
Definition: namespaces.docs:23
Reference data model and serialization.
string name