QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
overnightindexfuture.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) 2018 Roy Zywina
5 Copyright (C) 2019 Eisuke Tani
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
21/*! \file overnightindexfuture.hpp
22 \brief Overnight Index Future
23*/
24
25#ifndef quantlib_overnightindexfuture_hpp
26#define quantlib_overnightindexfuture_hpp
27
31
32namespace QuantLib {
33
34 /*! Future on a compounded overnight index investment.
35
36 Compatible with SOFR futures and Sonia futures available on
37 CME and ICE exchanges.
38 */
40 public:
42 ext::shared_ptr<OvernightIndex> overnightIndex,
43 const Date& valueDate,
44 const Date& maturityDate,
47
49 bool isExpired() const override;
50 const ext::shared_ptr<OvernightIndex>& overnightIndex() const { return overnightIndex_; }
51 Date valueDate() const { return valueDate_; }
52 Date maturityDate() const { return maturityDate_; }
53 private:
54 void performCalculations() const override;
55 Real rate() const;
56 Real averagedRate() const;
57 Real compoundedRate() const;
58 ext::shared_ptr<OvernightIndex> overnightIndex_;
62 };
63
64}
65
66#endif
Concrete date class.
Definition: date.hpp:125
Shared handle to an observable.
Definition: handle.hpp:41
Abstract instrument class.
Definition: instrument.hpp:44
ext::shared_ptr< OvernightIndex > overnightIndex_
void performCalculations() const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
const ext::shared_ptr< OvernightIndex > & overnightIndex() const
Base forward class.
QL_REAL Real
real number
Definition: types.hpp:50
base class for Inter-Bank-Offered-Rate indexes
Definition: any.hpp:35
rate-averaging method