QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
arithmeticoisratehelper.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2016 Stefano Fondi
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_arithmeticoisratehelper_hpp
25#define quantlib_arithmeticoisratehelper_hpp
26
27#include <ql/termstructures/yield/ratehelpers.hpp>
28#include <ql/experimental/averageois/arithmeticaverageois.hpp>
29
30namespace QuantLib {
31
34 public:
36 Natural settlementDays,
37 const Period& tenor, // swap maturity
38 Frequency fixedLegPaymentFrequency,
39 const Handle<Quote>& fixedRate,
40 ext::shared_ptr<OvernightIndex> overnightIndex,
41 Frequency overnightLegPaymentFrequency,
42 Handle<Quote> spread,
43 Real meanReversionSpeed = 0.03,
44 Real volatility = 0.00, // NO convexity adjustment by default
45 bool byApprox = false, // TRUE to use Katsumi Takada approximation
46 // exogenous discounting curve
49
50 Real impliedQuote() const override;
53
55 // NOLINTNEXTLINE(cppcoreguidelines-noexcept-swap,performance-noexcept-swap)
56 ext::shared_ptr<ArithmeticAverageOIS> swap() const { return swap_; }
58
60 void accept(AcyclicVisitor&) override;
62 protected:
63 void initializeDates() override;
64
67 ext::shared_ptr<OvernightIndex> overnightIndex_;
68
69 ext::shared_ptr<ArithmeticAverageOIS> swap_;
71
74
78
82
83 };
84
85}
86
87#endif
degenerate base class for the Acyclic Visitor pattern
Definition: visitor.hpp:33
Rate helper for bootstrapping over Overnight Indexed Swap rates.
ext::shared_ptr< OvernightIndex > overnightIndex_
RelinkableHandle< YieldTermStructure > discountRelinkableHandle_
void setTermStructure(YieldTermStructure *) override
RelinkableHandle< YieldTermStructure > termStructureHandle_
ext::shared_ptr< ArithmeticAverageOIS > swap() const
Handle< YieldTermStructure > discountHandle_
void accept(AcyclicVisitor &) override
ext::shared_ptr< ArithmeticAverageOIS > swap_
Shared handle to an observable.
Definition: handle.hpp:41
Bootstrap helper with date schedule relative to global evaluation date.
Relinkable handle to an observable.
Definition: handle.hpp:112
Interest-rate term structure.
Frequency
Frequency of events.
Definition: frequency.hpp:37
QL_REAL Real
real number
Definition: types.hpp:50
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Definition: any.hpp:35