Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
brlcdiswap.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/instruments/brlcdiswap.hpp
20 \brief Standard BRL CDI swap
21 \ingroup instruments
22*/
23
24#ifndef quantext_brl_cdi_swap_hpp
25#define quantext_brl_cdi_swap_hpp
26
27#include <ql/instruments/overnightindexedswap.hpp>
29
30namespace QuantExt {
31
32//! Standard BRL CDI swap
33class BRLCdiSwap : public QuantLib::OvernightIndexedSwap {
34public:
35 BRLCdiSwap(Type type, QuantLib::Real nominal, const QuantLib::Date& startDate, const QuantLib::Date& endDate,
36 QuantLib::Rate fixedRate, const QuantLib::ext::shared_ptr<BRLCdi>& overnightIndex, QuantLib::Spread spread = 0.0,
37 bool telescopicValueDates = false);
38
39 //! \name Results
40 //@{
41 QuantLib::Real fixedLegBPS() const;
42 QuantLib::Real fairRate() const;
43 //@}
44
45private:
46 QuantLib::Date startDate_;
47 QuantLib::Date endDate_;
48 //! QuantLib does not implement the method OvernightIndexedSwap::overnightIndex() so I need this.
49 QuantLib::ext::shared_ptr<QuantLib::OvernightIndex> index_;
50};
51
52} // namespace QuantExt
53
54#endif
BRL-CDI index.
Standard BRL CDI swap.
Definition: brlcdiswap.hpp:33
QuantLib::Real fairRate() const
Definition: brlcdiswap.cpp:78
QuantLib::Date endDate_
Definition: brlcdiswap.hpp:47
QuantLib::ext::shared_ptr< QuantLib::OvernightIndex > index_
QuantLib does not implement the method OvernightIndexedSwap::overnightIndex() so I need this.
Definition: brlcdiswap.hpp:49
QuantLib::Real fixedLegBPS() const
Definition: brlcdiswap.cpp:63
QuantLib::Date startDate_
Definition: brlcdiswap.hpp:46