Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
discountingequityforwardengine.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 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 qle/pricingengines/discountingequityforwardengine.hpp
20 \brief Engine to value an Equity Forward contract
21
22 \ingroup engines
23*/
24
25#ifndef quantext_discounting_equity_forward_engine_hpp
26#define quantext_discounting_equity_forward_engine_hpp
27
28#include <ql/termstructures/yieldtermstructure.hpp>
29
31
32namespace QuantExt {
33
34//! Discounting Equity Forward Engine
35
36/*! This class implements pricing of Equity Forwards by discounting the future
37 nominal cash flows using the respective yield curves. The forward price is
38 estimated using reference rate and dividend yield curves as input. The
39 cashflows are discounted using a separate discounting curve input.
40
41 \ingroup engines
42*/
44public:
45 /*! \param equityInterestRateCurve
46 The IR rate curve for estimating forward price.
47 \param dividendYieldCurve
48 The dividend yield term structure for estimating
49 forward price.
50 \param equitySpot
51 The market spot rate quote.
52 \param discountCurve
53 The discount curve
54 \param includeSettlementDateFlows, settlementDate
55 If includeSettlementDateFlows is true (false), cashflows
56 on the settlementDate are (not) included in the NPV.
57 If not given the settlement date is set to the
58 npv date.
59 \param npvDate
60 Discount to this date. If not given the npv date
61 is set to the evaluation date
62 */
63 DiscountingEquityForwardEngine(const Handle<YieldTermStructure>& equityInterestRateCurve,
64 const Handle<YieldTermStructure>& dividendYieldCurve,
65 const Handle<Quote>& equitySpot, const Handle<YieldTermStructure>& discountCurve,
66 boost::optional<bool> includeSettlementDateFlows = boost::none,
67 const Date& settlementDate = Date(), const Date& npvDate = Date());
68
69 void calculate() const override;
70
71 const Handle<YieldTermStructure>& equityReferenceRateCurve() const { return equityRefRateCurve_; }
72 const Handle<YieldTermStructure>& divYieldCurve() const { return divYieldCurve_; }
73 const Handle<YieldTermStructure>& discountCurve() const { return discountCurve_; }
74
75 const Handle<Quote>& equitySpot() const { return equitySpot_; }
76
77private:
78 Handle<YieldTermStructure> equityRefRateCurve_;
79 Handle<YieldTermStructure> divYieldCurve_;
80 Handle<Quote> equitySpot_;
81 Handle<YieldTermStructure> discountCurve_;
82 boost::optional<bool> includeSettlementDateFlows_;
85};
86} // namespace QuantExt
87
88#endif
const Handle< YieldTermStructure > & divYieldCurve() const
const Handle< YieldTermStructure > & discountCurve() const
const Handle< YieldTermStructure > & equityReferenceRateCurve() const
equityforward instrument