Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
fixedratefxlinkednotionalcoupon.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2021 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 fixedratefxlinkednotionalcoupon.hpp
20 \brief Coupon paying a fixed rate but with an FX linked notional
21
22 \ingroup cashflows
23*/
24
25#ifndef quantext_fixed_rate_fx_linked_notional_coupon_hpp
26#define quantext_fixed_rate_fx_linked_notional_coupon_hpp
27
28#include <ql/cashflows/fixedratecoupon.hpp>
30
31namespace QuantExt {
32
33//! %Coupon paying a Libor-type index on an fx-linked nominal
34//! \ingroup cashflows
35class FixedRateFXLinkedNotionalCoupon : public QuantLib::Observer, public FixedRateCoupon, public FXLinked {
36public:
37 //! FloatingRateFXLinkedNotionalCoupon
38 FixedRateFXLinkedNotionalCoupon(const QuantLib::Date& fxFixingDate, QuantLib::Real foreignAmount,
39 QuantLib::ext::shared_ptr<FxIndex> fxIndex, const QuantLib::ext::shared_ptr<FixedRateCoupon>& underlying);
40
41 //! \name FXLinked interface
42 //@{
43 QuantLib::ext::shared_ptr<FXLinked> clone(QuantLib::ext::shared_ptr<FxIndex> fxIndex) override;
44 //@}
45
46 //! \name Coupon interface
47 //@{
48 QuantLib::Rate nominal() const override;
49 QuantLib::Rate rate() const override;
50 //@}
51
52 //! \name Observer interface
53 //@{
54 void update() override;
55 //@}
56
57 //! \name Visitability
58 //@{
59 void accept(QuantLib::AcyclicVisitor&) override;
60 //@}
61
62 //! more inspectors
63 QuantLib::ext::shared_ptr<FixedRateCoupon> underlying() const;
64
65private:
66 const QuantLib::ext::shared_ptr<FixedRateCoupon> underlying_;
67};
68
69} // namespace QuantExt
70
71#endif
Base class for FX Linked cashflows.
const QuantLib::ext::shared_ptr< FxIndex > & fxIndex() const
Real foreignAmount() const
Date fxFixingDate() const
QuantLib::ext::shared_ptr< FXLinked > clone(QuantLib::ext::shared_ptr< FxIndex > fxIndex) override
void accept(QuantLib::AcyclicVisitor &) override
QuantLib::ext::shared_ptr< FixedRateCoupon > underlying() const
more inspectors
const QuantLib::ext::shared_ptr< FixedRateCoupon > underlying_
An FX linked cashflow.