QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
arithmeticoisratehelper.hpp
Go to the documentation of this file.
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
20/*! \file arithmeticoisratehelper.hpp
21 \brief Arithmetic Average Overnight Indexed Swap rate helpers
22*/
23
24#ifndef quantlib_arithmeticoisratehelper_hpp
25#define quantlib_arithmeticoisratehelper_hpp
26
29
30namespace QuantLib {
31
32 //! Rate helper for bootstrapping over Overnight Indexed Swap rates
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
48 //! \name RateHelper interface
49 //@{
50 Real impliedQuote() const override;
52 //@}
53 //! \name inspectors
54 //@{
55 // NOLINTNEXTLINE(cppcoreguidelines-noexcept-swap,performance-noexcept-swap)
56 ext::shared_ptr<ArithmeticAverageOIS> swap() const { return swap_; }
57 //@}
58 //! \name Visitability
59 //@{
60 void accept(AcyclicVisitor&) override;
61 //@}
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
Overnight index swap paying arithmetic average of overnight vs. fixed.
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:117
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
deposit, FRA, futures, and various swap rate helpers