QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
chfliborswap.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
26
27namespace QuantLib {
28
30 const Period& tenor,
32 : SwapIndex("ChfLiborSwapIsdaFix", // familyName
33 tenor,
34 2, // settlementDays
36 TARGET(),
37 1*Years, // fixedLegTenor
38 ModifiedFollowing, // fixedLegConvention
39 Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
40 tenor > 1*Years ?
41 ext::shared_ptr<IborIndex>(new CHFLibor(6*Months, h)) :
42 ext::shared_ptr<IborIndex>(new CHFLibor(3*Months, h))) {}
43
45 const Period& tenor,
46 const Handle<YieldTermStructure>& forwarding,
47 const Handle<YieldTermStructure>& discounting)
48 : SwapIndex("ChfLiborSwapIsdaFix", // familyName
49 tenor,
50 2, // settlementDays
52 TARGET(),
53 1*Years, // fixedLegTenor
54 ModifiedFollowing, // fixedLegConvention
55 Thirty360(Thirty360::BondBasis), // fixedLegDaycounter
56 tenor > 1*Years ?
57 ext::shared_ptr<IborIndex>(new CHFLibor(6*Months, forwarding)) :
58 ext::shared_ptr<IborIndex>(new CHFLibor(3*Months, forwarding)),
59 discounting) {}
60
61}
CHF LIBOR rate
CHF Libor Swap indexes
Swiss franc.
Definition: europe.hpp:79
CHF LIBOR rate
Definition: chflibor.hpp:43
ChfLiborSwapIsdaFix(const Period &tenor, const Handle< YieldTermStructure > &h={})
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
TARGET calendar
Definition: target.hpp:50
30/360 day count convention
Definition: thirty360.hpp:76
European currencies.
Definition: any.hpp:35
TARGET calendar.
30/360 day counters