Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
quantocouponpricer.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2018 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 Copyright (C) 2008 Toyin Akin
21
22 This file is part of QuantLib, a free-software/open-source library
23 for financial quantitative analysts and developers - http://quantlib.org/
24
25 QuantLib is free software: you can redistribute it and/or modify it
26 under the terms of the QuantLib license. You should have received a
27 copy of the license along with this program; if not, please email
28 <quantlib-dev@lists.sf.net>. The license is also available online at
29 <http://quantlib.org/license.shtml>.
30
31 This program is distributed in the hope that it will be useful, but WITHOUT
32 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
33 FOR A PARTICULAR PURPOSE. See the license for more details.
34*/
35
36/*! \file quantocouponpricer.hpp
37 \brief quanto-adjusted coupon
38*/
39
40#ifndef quantext_coupon_quanto_pricer_hpp
41#define quantext_coupon_quanto_pricer_hpp
42
43#include <ql/cashflows/couponpricer.hpp>
44#include <ql/quote.hpp>
45#include <ql/termstructures/volatility/equityfx/blackvoltermstructure.hpp>
46
47namespace QuantExt {
48using QuantLib::Handle;
49using QuantLib::Null;
50using QuantLib::Rate;
51using QuantLib::Real;
52
53/*! Same as QuantLib, but with fixed t1 computation (dc from vol ts instead
54 of index) and extended to SLN and N vol types */
55class BlackIborQuantoCouponPricer : public QuantLib::BlackIborCouponPricer {
56public:
57 BlackIborQuantoCouponPricer(const Handle<QuantLib::BlackVolTermStructure>& fxRateBlackVolatility,
58 const Handle<QuantLib::Quote>& underlyingFxCorrelation,
59 const Handle<QuantLib::OptionletVolatilityStructure>& capletVolatility)
60 : BlackIborCouponPricer(capletVolatility), fxRateBlackVolatility_(fxRateBlackVolatility),
61 underlyingFxCorrelation_(underlyingFxCorrelation) {
62 registerWith(fxRateBlackVolatility_);
63 registerWith(underlyingFxCorrelation_);
64 }
65
66protected:
67 Rate adjustedFixing(Rate fixing = Null<Rate>()) const override;
68
69private:
70 Handle<QuantLib::BlackVolTermStructure> fxRateBlackVolatility_;
71 Handle<QuantLib::Quote> underlyingFxCorrelation_;
72};
73
74} // namespace QuantExt
75
76#endif
Handle< QuantLib::BlackVolTermStructure > fxRateBlackVolatility_
BlackIborQuantoCouponPricer(const Handle< QuantLib::BlackVolTermStructure > &fxRateBlackVolatility, const Handle< QuantLib::Quote > &underlyingFxCorrelation, const Handle< QuantLib::OptionletVolatilityStructure > &capletVolatility)
Rate adjustedFixing(Rate fixing=Null< Rate >()) const override
Handle< QuantLib::Quote > underlyingFxCorrelation_