Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
subperiodscouponpricer.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 subperiodscouponpricer.hpp
20 \brief Pricer for sub-period coupons
21
22 \ingroup cashflows
23*/
24
25#ifndef quantext_sub_periods_coupon_pricer_hpp
26#define quantext_sub_periods_coupon_pricer_hpp
27
28#include <ql/cashflows/couponpricer.hpp>
29
31
32namespace QuantExt {
33using namespace QuantLib;
34//! Pricer for sub-period coupons
35/*! \ingroup cashflows
36 \todo merge into QuantLib
37 */
38class SubPeriodsCouponPricer1 : public FloatingRateCouponPricer {
39public:
41
42 void initialize(const FloatingRateCoupon& coupon) override;
43 Rate swapletRate() const override;
44
45 Real swapletPrice() const override { QL_FAIL("swapletPrice not available"); }
46 Real capletPrice(Rate) const override { QL_FAIL("capletPrice not available"); }
47 Rate capletRate(Rate) const override { QL_FAIL("capletRate not available"); }
48 Real floorletPrice(Rate) const override { QL_FAIL("floorletPrice not available"); }
49 Rate floorletRate(Rate) const override { QL_FAIL("floorletRate not available"); }
50
51protected:
53 Spread spread_;
55 QuantLib::ext::shared_ptr<InterestRateIndex> index_;
58
60};
61} // namespace QuantExt
62
63#endif
Pricer for sub-period coupons.
void initialize(const FloatingRateCoupon &coupon) override
QuantLib::ext::shared_ptr< InterestRateIndex > index_
Coupon with a number of sub-periods.