/src/quantlib/ql/termstructures/yield/flatforward.cpp
Line | Count | Source |
1 | | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | |
3 | | /* |
4 | | Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl |
5 | | Copyright (C) 2003, 2004, 2005, 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 | | <https://www.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/quotes/simplequote.hpp> |
22 | | #include <ql/termstructures/yield/flatforward.hpp> |
23 | | #include <utility> |
24 | | |
25 | | namespace QuantLib { |
26 | | |
27 | | FlatForward::FlatForward(const Date& referenceDate, |
28 | | Handle<Quote> forward, |
29 | | const DayCounter& dayCounter, |
30 | | Compounding compounding, |
31 | | Frequency frequency) |
32 | 1.94k | : YieldTermStructure(referenceDate, Calendar(), dayCounter), forward_(std::move(forward)), |
33 | 1.94k | compounding_(compounding), frequency_(frequency) { |
34 | 1.94k | registerWith(forward_); |
35 | 1.94k | } Unexecuted instantiation: QuantLib::FlatForward::FlatForward(QuantLib::Date const&, QuantLib::Handle<QuantLib::Quote>, QuantLib::DayCounter const&, QuantLib::Compounding, QuantLib::Frequency) QuantLib::FlatForward::FlatForward(QuantLib::Date const&, QuantLib::Handle<QuantLib::Quote>, QuantLib::DayCounter const&, QuantLib::Compounding, QuantLib::Frequency) Line | Count | Source | 32 | 1.94k | : YieldTermStructure(referenceDate, Calendar(), dayCounter), forward_(std::move(forward)), | 33 | 1.94k | compounding_(compounding), frequency_(frequency) { | 34 | 1.94k | registerWith(forward_); | 35 | 1.94k | } |
|
36 | | |
37 | | FlatForward::FlatForward(const Date& referenceDate, |
38 | | Rate forward, |
39 | | const DayCounter& dayCounter, |
40 | | Compounding compounding, |
41 | | Frequency frequency) |
42 | 13.4k | : YieldTermStructure(referenceDate, Calendar(), dayCounter), |
43 | 13.4k | forward_(ext::shared_ptr<Quote>(new SimpleQuote(forward))), |
44 | 13.4k | compounding_(compounding), frequency_(frequency) {}Unexecuted instantiation: QuantLib::FlatForward::FlatForward(QuantLib::Date const&, double, QuantLib::DayCounter const&, QuantLib::Compounding, QuantLib::Frequency) QuantLib::FlatForward::FlatForward(QuantLib::Date const&, double, QuantLib::DayCounter const&, QuantLib::Compounding, QuantLib::Frequency) Line | Count | Source | 42 | 13.4k | : YieldTermStructure(referenceDate, Calendar(), dayCounter), | 43 | 13.4k | forward_(ext::shared_ptr<Quote>(new SimpleQuote(forward))), | 44 | 13.4k | compounding_(compounding), frequency_(frequency) {} |
|
45 | | |
46 | | FlatForward::FlatForward(Natural settlementDays, |
47 | | const Calendar& calendar, |
48 | | Handle<Quote> forward, |
49 | | const DayCounter& dayCounter, |
50 | | Compounding compounding, |
51 | | Frequency frequency) |
52 | 0 | : YieldTermStructure(settlementDays, calendar, dayCounter), forward_(std::move(forward)), |
53 | 0 | compounding_(compounding), frequency_(frequency) { |
54 | 0 | registerWith(forward_); |
55 | 0 | } Unexecuted instantiation: QuantLib::FlatForward::FlatForward(unsigned int, QuantLib::Calendar const&, QuantLib::Handle<QuantLib::Quote>, QuantLib::DayCounter const&, QuantLib::Compounding, QuantLib::Frequency) Unexecuted instantiation: QuantLib::FlatForward::FlatForward(unsigned int, QuantLib::Calendar const&, QuantLib::Handle<QuantLib::Quote>, QuantLib::DayCounter const&, QuantLib::Compounding, QuantLib::Frequency) |
56 | | |
57 | | FlatForward::FlatForward(Natural settlementDays, |
58 | | const Calendar& calendar, |
59 | | Rate forward, |
60 | | const DayCounter& dayCounter, |
61 | | Compounding compounding, |
62 | | Frequency frequency) |
63 | 0 | : YieldTermStructure(settlementDays, calendar, dayCounter), |
64 | 0 | forward_(ext::shared_ptr<Quote>(new SimpleQuote(forward))), |
65 | 0 | compounding_(compounding), frequency_(frequency) {}Unexecuted instantiation: QuantLib::FlatForward::FlatForward(unsigned int, QuantLib::Calendar const&, double, QuantLib::DayCounter const&, QuantLib::Compounding, QuantLib::Frequency) Unexecuted instantiation: QuantLib::FlatForward::FlatForward(unsigned int, QuantLib::Calendar const&, double, QuantLib::DayCounter const&, QuantLib::Compounding, QuantLib::Frequency) |
66 | | |
67 | | } |