QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
instruments
bmaswap.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) 2007 Roland Lichters
5
Copyright (C) 2007 StatPro Italia srl
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 bmaswap.hpp
22
\brief swap paying Libor against BMA coupons
23
*/
24
25
#ifndef quantlib_bma_swap_hpp
26
#define quantlib_bma_swap_hpp
27
28
#include <
ql/instruments/swap.hpp
>
29
#include <
ql/indexes/iborindex.hpp
>
30
#include <
ql/indexes/bmaindex.hpp
>
31
32
namespace
QuantLib
{
33
34
//! swap paying Libor against BMA coupons
35
class
BMASwap
:
public
Swap
{
36
public
:
37
/*! In this constructor, the type (Payer or Receiver) refers
38
to the BMA leg.
39
*/
40
BMASwap
(
Type
type
,
41
Real
nominal
,
42
// Libor leg
43
Schedule
liborSchedule,
44
Rate
liborFraction
,
45
Rate
liborSpread
,
46
const
ext::shared_ptr<IborIndex>& liborIndex,
47
const
DayCounter
& liborDayCount,
48
// BMA leg
49
Schedule
bmaSchedule,
50
const
ext::shared_ptr<BMAIndex>& bmaIndex,
51
const
DayCounter
& bmaDayCount);
52
53
//! \name Inspectors
54
//@{
55
Real
liborFraction
()
const
;
56
Spread
liborSpread
()
const
;
57
Real
nominal
()
const
;
58
//! "Payer" or "Receiver" refers to the BMA leg
59
Type
type
()
const
;
60
const
Leg
&
bmaLeg
()
const
;
61
const
Leg
&
liborLeg
()
const
;
62
//@}
63
64
//! \name Results
65
//@{
66
Real
liborLegBPS
()
const
;
67
Real
liborLegNPV
()
const
;
68
Rate
fairLiborFraction
()
const
;
69
Spread
fairLiborSpread
()
const
;
70
71
Real
bmaLegBPS
()
const
;
72
Real
bmaLegNPV
()
const
;
73
//@}
74
75
private
:
76
Type
type_
;
77
Real
nominal_
;
78
Rate
liborFraction_
;
79
Rate
liborSpread_
;
80
};
81
82
}
83
84
#endif
bmaindex.hpp
Bond Market Association index.
QuantLib::BMASwap
swap paying Libor against BMA coupons
Definition:
bmaswap.hpp:35
QuantLib::BMASwap::nominal_
Real nominal_
Definition:
bmaswap.hpp:77
QuantLib::BMASwap::bmaLegNPV
Real bmaLegNPV() const
Definition:
bmaswap.cpp:138
QuantLib::BMASwap::liborFraction
Real liborFraction() const
Definition:
bmaswap.cpp:79
QuantLib::BMASwap::fairLiborSpread
Spread fairLiborSpread() const
Definition:
bmaswap.cpp:126
QuantLib::BMASwap::liborLegNPV
Real liborLegNPV() const
Definition:
bmaswap.cpp:110
QuantLib::BMASwap::fairLiborFraction
Rate fairLiborFraction() const
Definition:
bmaswap.cpp:116
QuantLib::BMASwap::liborSpread_
Rate liborSpread_
Definition:
bmaswap.hpp:79
QuantLib::BMASwap::bmaLeg
const Leg & bmaLeg() const
Definition:
bmaswap.cpp:99
QuantLib::BMASwap::type
Type type() const
"Payer" or "Receiver" refers to the BMA leg
Definition:
bmaswap.cpp:91
QuantLib::BMASwap::liborLegBPS
Real liborLegBPS() const
Definition:
bmaswap.cpp:104
QuantLib::BMASwap::nominal
Real nominal() const
Definition:
bmaswap.cpp:87
QuantLib::BMASwap::liborSpread
Spread liborSpread() const
Definition:
bmaswap.cpp:83
QuantLib::BMASwap::liborFraction_
Rate liborFraction_
Definition:
bmaswap.hpp:78
QuantLib::BMASwap::bmaLegBPS
Real bmaLegBPS() const
Definition:
bmaswap.cpp:132
QuantLib::BMASwap::liborLeg
const Leg & liborLeg() const
Definition:
bmaswap.cpp:95
QuantLib::BMASwap::type_
Type type_
Definition:
bmaswap.hpp:76
QuantLib::DayCounter
day counter class
Definition:
daycounter.hpp:44
QuantLib::Schedule
Payment schedule.
Definition:
schedule.hpp:40
QuantLib::Swap
Interest rate swap.
Definition:
swap.hpp:41
QuantLib::Swap::Type
Type
Definition:
swap.hpp:50
QuantLib::Real
QL_REAL Real
real number
Definition:
types.hpp:50
QuantLib::Spread
Real Spread
spreads on interest rates
Definition:
types.hpp:74
QuantLib::Rate
Real Rate
interest rates
Definition:
types.hpp:70
iborindex.hpp
base class for Inter-Bank-Offered-Rate indexes
QuantLib
Definition:
any.hpp:35
QuantLib::Leg
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Definition:
cashflow.hpp:78
swap.hpp
Interest rate swap.
Generated by
Doxygen
1.9.5