QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
indexes
swap
usdliborswap.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) 2008, 2011 Ferdinando Ametrano
5
6
This file is part of QuantLib, a free-software/open-source library
7
for financial quantitative analysts and developers - http://quantlib.org/
8
9
QuantLib is free software: you can redistribute it and/or modify it
10
under the terms of the QuantLib license. You should have received a
11
copy of the license along with this program; if not, please email
12
<quantlib-dev@lists.sf.net>. The license is also available online at
13
<http://quantlib.org/license.shtml>.
14
15
This program is distributed in the hope that it will be useful, but WITHOUT
16
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
FOR A PARTICULAR PURPOSE. See the license for more details.
18
*/
19
20
#include <
ql/indexes/swap/usdliborswap.hpp
>
21
#include <
ql/indexes/ibor/usdlibor.hpp
>
22
#include <
ql/time/calendars/target.hpp
>
23
#include <
ql/time/daycounters/thirty360.hpp
>
24
#include <
ql/currencies/america.hpp
>
25
26
namespace
QuantLib
{
27
28
UsdLiborSwapIsdaFixAm::UsdLiborSwapIsdaFixAm
(
29
const
Period
& tenor,
30
const
Handle<YieldTermStructure>
& h)
31
:
SwapIndex
(
"UsdLiborSwapIsdaFixAm"
,
// familyName
32
tenor,
33
2,
// settlementDays
34
USDCurrency
(),
35
UnitedStates
(
UnitedStates
::GovernmentBond),
36
6*
Months
,
// fixedLegTenor
37
ModifiedFollowing
,
// fixedLegConvention
38
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
39
ext::shared_ptr<
IborIndex
>(new
USDLibor
(3*
Months
, h))) {}
40
41
UsdLiborSwapIsdaFixAm::UsdLiborSwapIsdaFixAm
(
42
const
Period
& tenor,
43
const
Handle<YieldTermStructure>
& forwarding,
44
const
Handle<YieldTermStructure>
& discounting)
45
:
SwapIndex
(
"UsdLiborSwapIsdaFixAm"
,
// familyName
46
tenor,
47
2,
// settlementDays
48
USDCurrency
(),
49
UnitedStates
(
UnitedStates
::GovernmentBond),
50
6*
Months
,
// fixedLegTenor
51
ModifiedFollowing
,
// fixedLegConvention
52
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
53
ext::shared_ptr<
IborIndex
>(new
USDLibor
(3*
Months
, forwarding)),
54
discounting) {}
55
56
UsdLiborSwapIsdaFixPm::UsdLiborSwapIsdaFixPm
(
57
const
Period
& tenor,
58
const
Handle<YieldTermStructure>
& h)
59
:
SwapIndex
(
"UsdLiborSwapIsdaFixPm"
,
// familyName
60
tenor,
61
2,
// settlementDays
62
USDCurrency
(),
63
UnitedStates
(
UnitedStates
::GovernmentBond),
64
6*
Months
,
// fixedLegTenor
65
ModifiedFollowing
,
// fixedLegConvention
66
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
67
ext::shared_ptr<
IborIndex
>(new
USDLibor
(3*
Months
, h))) {}
68
69
UsdLiborSwapIsdaFixPm::UsdLiborSwapIsdaFixPm
(
70
const
Period
& tenor,
71
const
Handle<YieldTermStructure>
& forwarding,
72
const
Handle<YieldTermStructure>
& discounting)
73
:
SwapIndex
(
"UsdLiborSwapIsdaFixPm"
,
// familyName
74
tenor,
75
2,
// settlementDays
76
USDCurrency
(),
77
UnitedStates
(
UnitedStates
::GovernmentBond),
78
6*
Months
,
// fixedLegTenor
79
ModifiedFollowing
,
// fixedLegConvention
80
Thirty360
(
Thirty360
::BondBasis),
// fixedLegDaycounter
81
ext::shared_ptr<
IborIndex
>(new
USDLibor
(3*
Months
, forwarding)),
82
discounting) {}
83
84
}
america.hpp
American currencies.
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::Thirty360
30/360 day count convention
Definition:
thirty360.hpp:76
QuantLib::USDCurrency
U.S. dollar.
Definition:
america.hpp:162
QuantLib::USDLibor
USD LIBOR rate
Definition:
usdlibor.hpp:42
QuantLib::UnitedStates
United States calendars.
Definition:
unitedstates.hpp:156
QuantLib::UsdLiborSwapIsdaFixAm::UsdLiborSwapIsdaFixAm
UsdLiborSwapIsdaFixAm(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition:
usdliborswap.cpp:28
QuantLib::UsdLiborSwapIsdaFixPm::UsdLiborSwapIsdaFixPm
UsdLiborSwapIsdaFixPm(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition:
usdliborswap.cpp:56
QuantLib::Months
@ Months
Definition:
timeunit.hpp:39
QuantLib::ModifiedFollowing
@ ModifiedFollowing
Definition:
businessdayconvention.hpp:45
QuantLib
Definition:
any.hpp:35
target.hpp
TARGET calendar.
thirty360.hpp
30/360 day counters
usdlibor.hpp
USD LIBOR rate
usdliborswap.hpp
USD Libor Swap indexes
Generated by
Doxygen
1.9.5