Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
discountingswapenginemulticurve.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/discountingswapenginemulticurve.hpp
20 \brief Swap engine employing assumptions to speed up calculation
21
22 \ingroup engines
23*/
24
25#ifndef quantext_discounting_swap_engine_multi_curve_hpp
26#define quantext_discounting_swap_engine_multi_curve_hpp
27
28#include <ql/instruments/swap.hpp>
29#include <ql/termstructures/yieldtermstructure.hpp>
30
31namespace QuantExt {
32using namespace QuantLib;
33
34//! Discounting Swap Engine - Multi Curve
35/*! This class prices a swap with numerous simplifications in the case of
36 an ibor coupon leg to speed up the calculations:
37 - the index of an IborCoupon is assumed to be fixing in
38 advance and to have a tenor from accrual start date to accrual end
39 date.
40 - start and end discounts of Swap::results not populated.
41
42 \warning if an IborCoupon with non-natural fixing and/or accrual
43 period is present, the NPV will be false
44
45 \ingroup engines
46*/
48public:
49 DiscountingSwapEngineMultiCurve(const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
50 bool minimalResults = true,
51 boost::optional<bool> includeSettlementDateFlows = boost::none,
52 Date settlementDate = Date(), Date npvDate = Date());
53 void calculate() const override;
54 Handle<YieldTermStructure> discountCurve() const { return discountCurve_; }
55
56private:
57 Handle<YieldTermStructure> discountCurve_;
59 boost::optional<bool> includeSettlementDateFlows_;
62
63 class AmountImpl;
64 QuantLib::ext::shared_ptr<AmountImpl> impl_;
65};
66} // namespace QuantExt
67
68#endif