Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
brlcdicouponpricer.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2019 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/brlcdicouponpricer.hpp
20 \brief Coupon pricer for a BRL CDI coupon
21*/
22
23#ifndef quantext_brl_cdi_coupon_pricer_hpp
24#define quantext_brl_cdi_coupon_pricer_hpp
25
28
29#include <ql/cashflows/couponpricer.hpp>
30#include <ql/cashflows/overnightindexedcoupon.hpp>
31
32namespace QuantExt {
33
34//! BRL CDI coupon pricer
35
36class BRLCdiCouponPricer : public QuantLib::FloatingRateCouponPricer {
37public:
38 //! \name FloatingRateCouponPricer interface
39 //@{
40 virtual QuantLib::Rate swapletRate() const override;
41 virtual void initialize(const QuantLib::FloatingRateCoupon& coupon) override;
42
43 virtual QuantLib::Real swapletPrice() const override;
44 virtual QuantLib::Real capletPrice(QuantLib::Rate effectiveCap) const override;
45 virtual QuantLib::Rate capletRate(QuantLib::Rate effectiveCap) const override;
46 virtual QuantLib::Real floorletPrice(QuantLib::Rate effectiveFloor) const override;
47 virtual QuantLib::Rate floorletRate(QuantLib::Rate effectiveFloor) const override;
48 //@}
49
50private:
51 /*! The coupon to be priced, for now we support both QuantLib::OvernightIndexedCoupon
52 and QuantExt::OvernightIndexedCoupon, see ORE ticket 1159 */
53 const QuantLib::OvernightIndexedCoupon* couponQl_;
55
56 //! The index underlying the coupon to be priced
57 QuantLib::ext::shared_ptr<BRLCdi> index_;
58};
59
60} // namespace QuantExt
61
62#endif
BRL-CDI index.
QuantLib::ext::shared_ptr< BRLCdi > index_
The index underlying the coupon to be priced.
virtual QuantLib::Real capletPrice(QuantLib::Rate effectiveCap) const override
const QuantExt::OvernightIndexedCoupon * couponQle_
virtual QuantLib::Real floorletPrice(QuantLib::Rate effectiveFloor) const override
virtual QuantLib::Rate floorletRate(QuantLib::Rate effectiveFloor) const override
virtual QuantLib::Rate capletRate(QuantLib::Rate effectiveCap) const override
const QuantLib::OvernightIndexedCoupon * couponQl_
virtual QuantLib::Rate swapletRate() const override
virtual void initialize(const QuantLib::FloatingRateCoupon &coupon) override
virtual QuantLib::Real swapletPrice() const override
coupon paying the compounded daily overnight rate, copy of QL class, added includeSpread flag