QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
indexes
swap
gbpliborswap.cpp
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) 2006, 2007, 2008, 2011 Ferdinando Ametrano
5
Copyright (C) 2006 Chiara Fornarola
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
#include <
ql/indexes/swap/gbpliborswap.hpp
>
22
#include <
ql/indexes/ibor/gbplibor.hpp
>
23
#include <
ql/time/calendars/target.hpp
>
24
#include <
ql/time/daycounters/actual365fixed.hpp
>
25
#include <
ql/currencies/europe.hpp
>
26
27
namespace
QuantLib
{
28
29
GbpLiborSwapIsdaFix::GbpLiborSwapIsdaFix
(
30
const
Period
& tenor,
31
const
Handle<YieldTermStructure>
& h)
32
:
SwapIndex
(
"GbpLiborSwapIsdaFix"
,
// familyName
33
tenor,
34
0,
// settlementDays
35
GBPCurrency
(),
36
UnitedKingdom
(
UnitedKingdom
::Exchange),
37
tenor > 1*
Years
?
// fixedLegTenor
38
6*
Months
: 1*
Years
,
39
ModifiedFollowing
,
// fixedLegConvention
40
Actual365Fixed
(),
// fixedLegDaycounter
41
tenor > 1*
Years
?
42
ext::shared_ptr<
IborIndex
>(new
GBPLibor
(6*
Months
, h)) :
43
ext::shared_ptr<
IborIndex
>(new
GBPLibor
(3*
Months
, h))) {}
44
45
GbpLiborSwapIsdaFix::GbpLiborSwapIsdaFix
(
46
const
Period
& tenor,
47
const
Handle<YieldTermStructure>
& forwarding,
48
const
Handle<YieldTermStructure>
& discounting)
49
:
SwapIndex
(
"GbpLiborSwapIsdaFix"
,
// familyName
50
tenor,
51
0,
// settlementDays
52
GBPCurrency
(),
53
UnitedKingdom
(
UnitedKingdom
::Exchange),
54
tenor > 1*
Years
?
// fixedLegTenor
55
6*
Months
: 1*
Years
,
56
ModifiedFollowing
,
// fixedLegConvention
57
Actual365Fixed
(),
// fixedLegDaycounter
58
tenor > 1*
Years
?
59
ext::shared_ptr<
IborIndex
>(new
GBPLibor
(6*
Months
, forwarding)) :
60
ext::shared_ptr<
IborIndex
>(new
GBPLibor
(3*
Months
, forwarding)),
61
discounting) {}
62
63
}
actual365fixed.hpp
Actual/365 (Fixed) day counter.
QuantLib::Actual365Fixed
Actual/365 (Fixed) day count convention.
Definition:
actual365fixed.hpp:45
QuantLib::GBPCurrency
British pound sterling.
Definition:
europe.hpp:134
QuantLib::GBPLibor
GBP LIBOR rate
Definition:
gbplibor.hpp:40
QuantLib::GbpLiborSwapIsdaFix::GbpLiborSwapIsdaFix
GbpLiborSwapIsdaFix(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition:
gbpliborswap.cpp:29
QuantLib::Handle
Shared handle to an observable.
Definition:
handle.hpp:41
QuantLib::IborIndex
base class for Inter-Bank-Offered-Rate indexes (e.g. Libor, etc.)
Definition:
iborindex.hpp:35
QuantLib::Period
Definition:
period.hpp:44
QuantLib::SwapIndex
base class for swap-rate indexes
Definition:
swapindex.hpp:41
QuantLib::UnitedKingdom
United Kingdom calendars.
Definition:
unitedkingdom.hpp:91
europe.hpp
European currencies.
gbplibor.hpp
GBP LIBOR rate
gbpliborswap.hpp
GBP Libor Swap indexes
QuantLib::Months
@ Months
Definition:
timeunit.hpp:39
QuantLib::Years
@ Years
Definition:
timeunit.hpp:40
QuantLib::ModifiedFollowing
@ ModifiedFollowing
Definition:
businessdayconvention.hpp:45
QuantLib
Definition:
any.hpp:35
target.hpp
TARGET calendar.
Generated by
Doxygen
1.9.5