QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
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
25
26namespace QuantLib {
27
29 const Period& tenor,
31 : SwapIndex("UsdLiborSwapIsdaFixAm", // familyName
32 tenor,
33 2, // settlementDays
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
42 const Period& tenor,
43 const Handle<YieldTermStructure>& forwarding,
44 const Handle<YieldTermStructure>& discounting)
45 : SwapIndex("UsdLiborSwapIsdaFixAm", // familyName
46 tenor,
47 2, // settlementDays
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
57 const Period& tenor,
59 : SwapIndex("UsdLiborSwapIsdaFixPm", // familyName
60 tenor,
61 2, // settlementDays
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
70 const Period& tenor,
71 const Handle<YieldTermStructure>& forwarding,
72 const Handle<YieldTermStructure>& discounting)
73 : SwapIndex("UsdLiborSwapIsdaFixPm", // familyName
74 tenor,
75 2, // settlementDays
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}
American currencies.
Shared handle to an observable.
Definition: handle.hpp:41
base class for Inter-Bank-Offered-Rate indexes (e.g. Libor, etc.)
Definition: iborindex.hpp:35
base class for swap-rate indexes
Definition: swapindex.hpp:41
30/360 day count convention
Definition: thirty360.hpp:76
U.S. dollar.
Definition: america.hpp:162
USD LIBOR rate
Definition: usdlibor.hpp:42
United States calendars.
UsdLiborSwapIsdaFixAm(const Period &tenor, const Handle< YieldTermStructure > &h={})
UsdLiborSwapIsdaFixPm(const Period &tenor, const Handle< YieldTermStructure > &h={})
Definition: any.hpp:35
TARGET calendar.
30/360 day counters
USD LIBOR rate
USD Libor Swap indexes