File: class_quant_lib_1_1_term_structure.html

package info (click to toggle)
quantlib-refman-html 0.9.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 60,592 kB
  • ctags: 7,595
  • sloc: makefile: 30
file content (204 lines) | stat: -rw-r--r-- 18,793 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="robots" content="none">
<title>QuantLib: TermStructure Class Reference</title>
<link rel="stylesheet" href="quantlib.css" type="text/css">
<link rel="stylesheet" href="print.css" type="text/css" media="print">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>

<div id="container">
<div id="header">
<img class="titleimage"
 src="QL-title.jpg" width="212" height="47" border="0"
 alt="QuantLib">
<br>
<h3 class="subtitle">A free/open-source library for quantitative finance</h3>
</div>
<div id="menu">

<h3 class="navbartitle">Version 0.9.0</h3>

<hr>

<h3 class="navbartitle">Getting started</h3>
<ul class="navbarlist">
<li class="navlink"><a href="index.html">Introduction</a></li>
<li class="navlink"><a href="overview.html">Project overview</a></li>
<li class="navlink"><a href="where.html">Where to get QuantLib</a></li>
<li class="navlink"><a href="install.html">Installation</a></li>
<li class="navlink"><a href="config.html">Configuration</a></li>
<li class="navlink"><a href="usage.html">Usage</a></li>
<li class="navlink"><a href="history.html">Version history</a></li>
<li class="navlink"><a href="resources.html">Additional resources</a></li>
<li class="navlink"><a href="group.html">The QuantLib group</a></li>
<li class="navlink"><a href="license.html">Copyright and license</a></li>
</ul>

<hr>

<h3 class="navbartitle">Reference manual</h3>
<ul class="navbarlist">
<li class="navlink"><a href="modules.html">Modules</a></li>
<li class="navlink"><a href="hierarchy.html">Class Hierarchy</a></li>
<li class="navlink"><a href="annotated.html">Compound List</a></li>
<li class="navlink"><a href="files.html">File List</a></li>
<li class="navlink"><a href="functions.html">Compound Members</a></li>
<li class="navlink"><a href="globals.html">File Members</a></li>
<li class="navlink"><a href="bug.html">Known Bugs</a></li>
<li class="navlink"><a href="caveats.html">Caveats</a></li>
<li class="navlink"><a href="test.html">Test Suite</a></li>
<li class="navlink"><a href="examples.html">Examples</a></li>
</ul>
</div>

<div id="content">
<!--Doxygen-generated content-->

<!-- Generated by Doxygen 1.5.4 -->
<div class="nav">
<a class="el" href="namespace_quant_lib.html">QuantLib</a>::<a class="el" href="class_quant_lib_1_1_term_structure.html">TermStructure</a></div>
<h1>TermStructure Class Reference</h1><!-- doxytag: class="QuantLib::TermStructure" --><!-- doxytag: inherits="QuantLib::Observer,QuantLib::Observable,QuantLib::Extrapolator" --><code>#include &lt;ql/termstructure.hpp&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for TermStructure:</div>
<div class="dynsection">
<p><center><img src="class_quant_lib_1_1_term_structure__inherit__graph.png" border="0" usemap="#_term_structure__inherit__map" alt="Inheritance graph"></center>
<map name="_term_structure__inherit__map">
<area shape="rect" href="class_quant_lib_1_1_inflation_term_structure.html" title="Interface for inflation term structures." alt="" coords="5,161,171,188"><area shape="rect" href="class_quant_lib_1_1_volatility_term_structure.html" title="Volatility term structure." alt="" coords="195,161,360,188"><area shape="rect" href="class_quant_lib_1_1_yield_term_structure.html" title="Interest&#45;rate term structure." alt="" coords="384,161,528,188"><area shape="rect" href="class_quant_lib_1_1_observer.html" title="Object that gets notified when a given observable changes." alt="" coords="127,7,207,33"><area shape="rect" href="class_quant_lib_1_1_observable.html" title="Object that notifies its changes to a set of observables." alt="" coords="231,7,324,33"><area shape="rect" href="class_quant_lib_1_1_extrapolator.html" title="base class for classes possibly allowing extrapolation" alt="" coords="348,7,449,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="class_quant_lib_1_1_term_structure-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Basic term-structure functionality. <table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<tr><td colspan="2"><div class="groupText">There are three ways in which a term structure can keep track of its reference date. The first is that such date is fixed; the second is that it is determined by advancing the current date of a given number of business days; and the third is that it is based on the reference date of some other structure.<p>
In the first case, the constructor taking a date is to be used; the default implementation of referenceDate() will then return such date. In the second case, the constructor taking a number of days and a calendar is to be used; referenceDate() will return a date calculated based on the current evaluation date, and the term structure and its observers will be notified when the evaluation date changes. In the last case, the referenceDate() method must be overridden in derived classes so that it fetches and return the appropriate date. <br><br></div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#4a8e0f324391a12454f11f5f5d5e66e8">TermStructure</a> (const <a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a> &amp;dc=<a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a>())</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">default constructor  <a href="#4a8e0f324391a12454f11f5f5d5e66e8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="44918f70ab345cad67a287d46641f20f"></a><!-- doxytag: member="QuantLib::TermStructure::TermStructure" ref="44918f70ab345cad67a287d46641f20f" args="(const Date &amp;referenceDate, const Calendar &amp;calendar=Calendar(), const DayCounter &amp;dc=DayCounter())" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#44918f70ab345cad67a287d46641f20f">TermStructure</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;referenceDate, const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;calendar=<a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a>(), const <a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a> &amp;dc=<a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a>())</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">initialize with a fixed reference date <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b72309c6d49bd4b6dc5b9ed09b67c7b9"></a><!-- doxytag: member="QuantLib::TermStructure::TermStructure" ref="b72309c6d49bd4b6dc5b9ed09b67c7b9" args="(Natural settlementDays, const Calendar &amp;, const DayCounter &amp;dc=DayCounter())" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#b72309c6d49bd4b6dc5b9ed09b67c7b9">TermStructure</a> (<a class="el" href="group__types.html#g7e529c39c477ba1f5a22264d93e8457a">Natural</a> settlementDays, const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;, const <a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a> &amp;dc=<a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a>())</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">calculate the reference date based on the global evaluation date <br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Dates</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c147d63df367bbe5282b76b1f98cb9be"></a><!-- doxytag: member="QuantLib::TermStructure::dayCounter" ref="c147d63df367bbe5282b76b1f98cb9be" args="() const " -->
virtual <a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#c147d63df367bbe5282b76b1f98cb9be">dayCounter</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the day counter used for date/time conversion <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d5c437961b8f9e30cffb723777ed7c6"></a><!-- doxytag: member="QuantLib::TermStructure::maxDate" ref="9d5c437961b8f9e30cffb723777ed7c6" args="() const =0" -->
virtual <a class="el" href="class_quant_lib_1_1_date.html">Date</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#9d5c437961b8f9e30cffb723777ed7c6">maxDate</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the latest date for which the curve can return values <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3b8677915d5a95b48578b82ed1d7508f"></a><!-- doxytag: member="QuantLib::TermStructure::maxTime" ref="3b8677915d5a95b48578b82ed1d7508f" args="() const " -->
virtual <a class="el" href="group__types.html#g14fb8fca43a68f4168654e1f9f7e22f7">Time</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#3b8677915d5a95b48578b82ed1d7508f">maxTime</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the latest time for which the curve can return values <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9ae6cc6009ac64d4f265065eab08be0"></a><!-- doxytag: member="QuantLib::TermStructure::referenceDate" ref="a9ae6cc6009ac64d4f265065eab08be0" args="() const " -->
virtual const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#a9ae6cc6009ac64d4f265065eab08be0">referenceDate</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the date at which discount = 1.0 and/or variance = 0.0 <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e9a0f3904cff2fe61596c593dd0b6448"></a><!-- doxytag: member="QuantLib::TermStructure::calendar" ref="e9a0f3904cff2fe61596c593dd0b6448" args="() const " -->
virtual <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#e9a0f3904cff2fe61596c593dd0b6448">calendar</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the calendar used for reference and/or option date calculation <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6506da60fec85c6f146f1b43116de70"></a><!-- doxytag: member="QuantLib::TermStructure::settlementDays" ref="b6506da60fec85c6f146f1b43116de70" args="() const " -->
virtual <a class="el" href="group__types.html#g7e529c39c477ba1f5a22264d93e8457a">Natural</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#b6506da60fec85c6f146f1b43116de70">settlementDays</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the settlementDays used for reference date calculation <br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Observer interface</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#c5c54df7ed3b930268c8d7752c101725">update</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="56d243294c1b34335d067270796f5668"></a><!-- doxytag: member="QuantLib::TermStructure::timeFromReference" ref="56d243294c1b34335d067270796f5668" args="(const Date &amp;date) const " -->
<a class="el" href="group__types.html#g14fb8fca43a68f4168654e1f9f7e22f7">Time</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#56d243294c1b34335d067270796f5668">timeFromReference</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;date) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">date/time conversion <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="176ae6900633bdc8f22af01b99e7165b"></a><!-- doxytag: member="QuantLib::TermStructure::checkRange" ref="176ae6900633bdc8f22af01b99e7165b" args="(const Date &amp;, bool extrapolate) const " -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#176ae6900633bdc8f22af01b99e7165b">checkRange</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;, bool extrapolate) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">date-range check <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="63453af27c24ca1149b8c41d86174290"></a><!-- doxytag: member="QuantLib::TermStructure::checkRange" ref="63453af27c24ca1149b8c41d86174290" args="(Time t, bool extrapolate) const " -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_term_structure.html#63453af27c24ca1149b8c41d86174290">checkRange</a> (<a class="el" href="group__types.html#g14fb8fca43a68f4168654e1f9f7e22f7">Time</a> t, bool extrapolate) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">time-range check <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3cfce9cb19de6f0604adee64b6d80a35"></a><!-- doxytag: member="QuantLib::TermStructure::moving_" ref="3cfce9cb19de6f0604adee64b6d80a35" args="" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>moving_</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="021eab7f1f44c1c71b8dfd29b9c4864b"></a><!-- doxytag: member="QuantLib::TermStructure::calendar_" ref="021eab7f1f44c1c71b8dfd29b9c4864b" args="" -->
<a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>calendar_</b></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="4a8e0f324391a12454f11f5f5d5e66e8"></a><!-- doxytag: member="QuantLib::TermStructure::TermStructure" ref="4a8e0f324391a12454f11f5f5d5e66e8" args="(const DayCounter &amp;dc=DayCounter())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_quant_lib_1_1_term_structure.html">TermStructure</a>           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>dc</em> = <code><a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a>()</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
default constructor 
<p>
<dl compact><dt><b><a class="el" href="caveats.html#_caveats000090">Warning:</a></b></dt><dd>term structures initialized by means of this constructor must manage their own reference date by overriding the <a class="el" href="class_quant_lib_1_1_term_structure.html#a9ae6cc6009ac64d4f265065eab08be0" title="the date at which discount = 1.0 and/or variance = 0.0">referenceDate()</a> method. </dd></dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="c5c54df7ed3b930268c8d7752c101725"></a><!-- doxytag: member="QuantLib::TermStructure::update" ref="c5c54df7ed3b930268c8d7752c101725" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void update           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes. 
<p>Implements <a class="el" href="class_quant_lib_1_1_observer.html#99b02345a8a15d3c5ea2844a2253f510">Observer</a>.</p>

<p>Reimplemented in <a class="el" href="class_quant_lib_1_1_abcd_atm_vol_curve.html#c5c54df7ed3b930268c8d7752c101725">AbcdAtmVolCurve</a>, <a class="el" href="class_quant_lib_1_1_sabr_vol_surface.html#cd36d7881ea8503d5c5824e7a5ad6c7e">SabrVolSurface</a>, <a class="el" href="class_quant_lib_1_1_extended_discount_curve.html#c5c54df7ed3b930268c8d7752c101725">ExtendedDiscountCurve</a>, <a class="el" href="class_quant_lib_1_1_piecewise_yo_y_inflation_curve.html#c5c54df7ed3b930268c8d7752c101725">PiecewiseYoYInflationCurve</a>, <a class="el" href="class_quant_lib_1_1_piecewise_zero_inflation_curve.html#c5c54df7ed3b930268c8d7752c101725">PiecewiseZeroInflationCurve</a>, <a class="el" href="class_quant_lib_1_1_cap_floor_term_vol_curve.html#c5c54df7ed3b930268c8d7752c101725">CapFloorTermVolCurve</a>, <a class="el" href="class_quant_lib_1_1_cap_floor_term_vol_surface.html#c5c54df7ed3b930268c8d7752c101725">CapFloorTermVolSurface</a>, <a class="el" href="class_quant_lib_1_1_fitted_bond_discount_curve.html#c5c54df7ed3b930268c8d7752c101725">FittedBondDiscountCurve</a>, <a class="el" href="class_quant_lib_1_1_flat_forward.html#c5c54df7ed3b930268c8d7752c101725">FlatForward</a>, and <a class="el" href="class_quant_lib_1_1_piecewise_zero_spreaded_term_structure.html#c5c54df7ed3b930268c8d7752c101725">PiecewiseZeroSpreadedTermStructure</a>.</p>

</div>
</div><p>

</div>

<div class="footer">
<div class="endmatter">
Documentation generated by
<a href="http://www.doxygen.org">Doxygen</a> 1.5.4
</div>
</div>

</div>

</body>
</html>