Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
cashflowresults.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2020 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 cashflowresults.hpp
20 \brief class holding cashflow-related results
21
22 \ingroup instruments
23*/
24
25#pragma once
26
27#include <ql/cashflow.hpp>
28#include <ql/currency.hpp>
29#include <ql/termstructures/yieldtermstructure.hpp>
30#include <ql/time/date.hpp>
31#include <ql/types.hpp>
32#include <ql/utilities/null.hpp>
33
34namespace QuantExt {
35
37 QuantLib::Real amount = QuantLib::Null<QuantLib::Real>();
38 QuantLib::Date payDate;
39 std::string currency;
40 QuantLib::Size legNumber = 0;
41 std::string type = "Unspecified";
42 QuantLib::Real rate = QuantLib::Null<QuantLib::Real>();
43 QuantLib::Real accrualPeriod = QuantLib::Null<QuantLib::Real>();
44 QuantLib::Date accrualStartDate;
45 QuantLib::Date accrualEndDate;
46 QuantLib::Real accruedAmount = QuantLib::Null<QuantLib::Real>();
47 QuantLib::Date fixingDate;
48 QuantLib::Real fixingValue = QuantLib::Null<QuantLib::Real>();
49 QuantLib::Real notional = QuantLib::Null<QuantLib::Real>();
50 QuantLib::Real discountFactor = QuantLib::Null<QuantLib::Real>();
51 QuantLib::Real presentValue = QuantLib::Null<QuantLib::Real>();
52 QuantLib::Real presentValueBase = QuantLib::Null<QuantLib::Real>();
53 QuantLib::Real fxRateLocalBase = QuantLib::Null<QuantLib::Real>();
54 QuantLib::Real floorStrike = QuantLib::Null<QuantLib::Real>();
55 QuantLib::Real capStrike = QuantLib::Null<QuantLib::Real>();
56 QuantLib::Real floorVolatility = QuantLib::Null<QuantLib::Real>();
57 QuantLib::Real capVolatility = QuantLib::Null<QuantLib::Real>();
58 QuantLib::Real effectiveFloorVolatility = QuantLib::Null<QuantLib::Real>();
59 QuantLib::Real effectiveCapVolatility = QuantLib::Null<QuantLib::Real>();
60};
61
62std::ostream& operator<<(std::ostream& out, const CashFlowResults& t);
63
64CashFlowResults standardCashFlowResults(const QuantLib::ext::shared_ptr<QuantLib::CashFlow>& c,
65 const QuantLib::Real multiplier = 1.0, const std::string& type = "Unspecified",
66 const QuantLib::Size legNo = 0,
67 const QuantLib::Currency& currency = QuantLib::Currency(),
68 const QuantLib::Handle<QuantLib::YieldTermStructure>& discountCurve =
69 QuantLib::Handle<QuantLib::YieldTermStructure>());
70
71CashFlowResults populateCashFlowResultsFromCashflow(const QuantLib::ext::shared_ptr<QuantLib::CashFlow>& c,
72 const QuantLib::Real multiplier = 1.0,
73 const QuantLib::Size legNo = 0,
74 const QuantLib::Currency& currency = QuantLib::Currency());
75
76} // namespace QuantExt
CashFlowResults standardCashFlowResults(const QuantLib::ext::shared_ptr< CashFlow > &c, const Real multiplier, const std::string &type, const Size legNo, const Currency &currency, const Handle< YieldTermStructure > &discountCurve)
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
CashFlowResults populateCashFlowResultsFromCashflow(const QuantLib::ext::shared_ptr< QuantLib::CashFlow > &c, const QuantLib::Real multiplier, const QuantLib::Size legNo, const QuantLib::Currency &currency)
QuantLib::Real effectiveFloorVolatility
QuantLib::Real effectiveCapVolatility