Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
jyyoyinflationcouponpricer.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 qle/cashflows/jyyoyinflationcouponpricer.hpp
20 \brief Jarrow Yildrim (JY) pricer for capped or floored year on year (YoY) inflation coupons
21*/
22
23#pragma once
24
26#include <ql/cashflows/inflationcouponpricer.hpp>
27#include <ql/cashflows/yoyinflationcoupon.hpp>
28
29namespace QuantExt {
30
31//! JY pricer for YoY inflation coupons.
32class JyYoYInflationCouponPricer : public QuantLib::YoYInflationCouponPricer {
33public:
34 /*! Constructor
35 \param model the cross asset model to be used in the valuation.
36 \param index the index of the inflation component to use within the cross asset model.
37 */
38 JyYoYInflationCouponPricer(const QuantLib::ext::shared_ptr<CrossAssetModel>& model,
39 QuantLib::Size index);
40
41private:
42 QuantLib::ext::shared_ptr<CrossAssetModel> model_;
43 QuantLib::Size index_;
44
45 QuantLib::Real optionletRate(QuantLib::Option::Type optionType, QuantLib::Real effStrike) const override;
46
47 QuantLib::Rate adjustedFixing(QuantLib::Rate fixing = QuantLib::Null<QuantLib::Rate>()) const override;
48};
49
50/*! Return the expected value of the inflation index ratio \f$I(T)/I(S)\f$ under Jarrow Yildrim where
51 \f$ 0 < S < T \f$. The value is given in Section 13 of <em>Modern Derivatives Pricing and Credit Exposure
52 Analysis, 2015</em> by the following:
53 \f[
54 \frac{P_r(0,T)}{P_n(0,T)} \frac{P_n(0,S)}{P_r(0,S)} e^{C(S,T)}
55 \f]
56*/
57QuantLib::Real jyExpectedIndexRatio(const QuantLib::ext::shared_ptr<CrossAssetModel>& model,
58 QuantLib::Size index, QuantLib::Time S, QuantLib::Time T, bool indexIsInterpolated);
59
60}
JY pricer for YoY inflation coupons.
QuantLib::ext::shared_ptr< CrossAssetModel > model_
QuantLib::Rate adjustedFixing(QuantLib::Rate fixing=QuantLib::Null< QuantLib::Rate >()) const override
QuantLib::Real optionletRate(QuantLib::Option::Type optionType, QuantLib::Real effStrike) const override
cross asset model
Real jyExpectedIndexRatio(const QuantLib::ext::shared_ptr< CrossAssetModel > &model, Size index, Time S, Time T, bool indexIsInterpolated)