QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
bmaswap.hpp
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
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
32namespace QuantLib {
33
35 class BMASwap : public Swap {
36 public:
42 // Libor leg
43 const Schedule& liborSchedule,
46 const ext::shared_ptr<IborIndex>& liborIndex,
47 const DayCounter& liborDayCount,
48 // BMA leg
49 const Schedule& bmaSchedule,
50 const ext::shared_ptr<BMAIndex>& bmaIndex,
51 const DayCounter& bmaDayCount);
52
54
55 Real liborFraction() const;
56 Spread liborSpread() const;
57 Real nominal() const;
59 Type type() const;
60 const Leg& bmaLeg() const;
61 const Leg& liborLeg() const;
63
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;
74
75 private:
80 };
81
82}
83
84#endif
85
swap paying Libor against BMA coupons
Definition: bmaswap.hpp:35
Real bmaLegNPV() const
Definition: bmaswap.cpp:136
Real liborFraction() const
Definition: bmaswap.cpp:77
Spread fairLiborSpread() const
Definition: bmaswap.cpp:124
Real liborLegNPV() const
Definition: bmaswap.cpp:108
Rate fairLiborFraction() const
Definition: bmaswap.cpp:114
const Leg & bmaLeg() const
Definition: bmaswap.cpp:97
Type type() const
"Payer" or "Receiver" refers to the BMA leg
Definition: bmaswap.cpp:89
Real liborLegBPS() const
Definition: bmaswap.cpp:102
Real nominal() const
Definition: bmaswap.cpp:85
Spread liborSpread() const
Definition: bmaswap.cpp:81
Real bmaLegBPS() const
Definition: bmaswap.cpp:130
const Leg & liborLeg() const
Definition: bmaswap.cpp:93
day counter class
Definition: daycounter.hpp:44
Payment schedule.
Definition: schedule.hpp:40
Interest rate swap.
Definition: swap.hpp:41
QL_REAL Real
real number
Definition: types.hpp:50
Real Spread
spreads on interest rates
Definition: types.hpp:74
Real Rate
interest rates
Definition: types.hpp:70
Definition: any.hpp:35
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Definition: cashflow.hpp:78