QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
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
31
32namespace 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 */
42 // Libor leg
43 Schedule liborSchedule,
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:
80 };
81
82}
83
84#endif
Bond Market Association index.
swap paying Libor against BMA coupons
Definition: bmaswap.hpp:35
Real bmaLegNPV() const
Definition: bmaswap.cpp:138
Real liborFraction() const
Definition: bmaswap.cpp:79
Spread fairLiborSpread() const
Definition: bmaswap.cpp:126
Real liborLegNPV() const
Definition: bmaswap.cpp:110
Rate fairLiborFraction() const
Definition: bmaswap.cpp:116
const Leg & bmaLeg() const
Definition: bmaswap.cpp:99
Type type() const
"Payer" or "Receiver" refers to the BMA leg
Definition: bmaswap.cpp:91
Real liborLegBPS() const
Definition: bmaswap.cpp:104
Real nominal() const
Definition: bmaswap.cpp:87
Spread liborSpread() const
Definition: bmaswap.cpp:83
Real bmaLegBPS() const
Definition: bmaswap.cpp:132
const Leg & liborLeg() const
Definition: bmaswap.cpp:95
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
base class for Inter-Bank-Offered-Rate indexes
Definition: any.hpp:35
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Definition: cashflow.hpp:78
Interest rate swap.