QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
fdmaffinemodeltermstructure.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2011 Klaus Spanderen
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
23#ifndef quantlib_fdm_affine_model_termstructure_hpp
24#define quantlib_fdm_affine_model_termstructure_hpp
25
26#include <ql/math/array.hpp>
27#include <ql/termstructures/yieldtermstructure.hpp>
28
29namespace QuantLib {
30
31 class AffineModel;
32
34 public:
36 const Calendar& cal,
38 const Date& referenceDate,
39 const Date& modelReferenceDate,
40 ext::shared_ptr<AffineModel> model);
41
42 Date maxDate() const override;
43 void setVariable(const Array& r);
44
45 protected:
46 DiscountFactor discountImpl(Time) const override;
47
48 private:
50 const Time t_;
51 const ext::shared_ptr<AffineModel> model_;
52 };
53}
54#endif
1-D array used in linear algebra.
Definition: array.hpp:52
calendar class
Definition: calendar.hpp:61
Concrete date class.
Definition: date.hpp:125
day counter class
Definition: daycounter.hpp:44
const ext::shared_ptr< AffineModel > model_
DiscountFactor discountImpl(Time) const override
discount factor calculation
Date maxDate() const override
the latest date for which the curve can return values
virtual const Date & referenceDate() const
the date at which discount = 1.0 and/or variance = 0.0
virtual DayCounter dayCounter() const
the day counter used for date/time conversion
Interest-rate term structure.
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
Real DiscountFactor
discount factor between dates
Definition: types.hpp:66
Definition: any.hpp:35