File: class_quant_lib_1_1_compound_forward.html

package info (click to toggle)
quantlib-refman-html 0.3.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 43,500 kB
  • ctags: 8,975
  • sloc: makefile: 31
file content (234 lines) | stat: -rw-r--r-- 17,235 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<meta name="robots" content="none">
<title>QuantLib: CompoundForward 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.3.14</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="faq.html">Frequently asked questions</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="todo.html">Todo List</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="deprecated.html">Deprecated Features</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.1 -->
<div class="nav">
<b>QuantLib</b>::<a class="el" href="class_quant_lib_1_1_compound_forward.html">CompoundForward</a></div>
<h1>CompoundForward Class Reference</h1><!-- doxytag: class="QuantLib::CompoundForward" --><!-- doxytag: inherits="QuantLib::ForwardRateStructure" --><code>#include &lt;ql/TermStructures/compoundforward.hpp&gt;</code>
<p>
Inheritance diagram for CompoundForward:<p><center><img src="class_quant_lib_1_1_compound_forward__inherit__graph.png" border="0" usemap="#_compound_forward__inherit__map" alt="Inheritance graph"></center>
<map name="_compound_forward__inherit__map">
<area href="class_quant_lib_1_1_forward_rate_structure.html" shape="rect" coords="77,231,245,255" alt="">
<area href="class_quant_lib_1_1_yield_term_structure.html" shape="rect" coords="87,156,236,180" alt="">
<area href="class_quant_lib_1_1_term_structure.html" shape="rect" coords="103,81,220,105" alt="">
<area href="class_quant_lib_1_1_observer.html" shape="rect" coords="5,7,88,31" alt="">
<area href="class_quant_lib_1_1_observable.html" shape="rect" coords="112,7,211,31" alt="">
<area href="class_quant_lib_1_1_extrapolator.html" shape="rect" coords="235,7,339,31" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_quant_lib_1_1_compound_forward-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
compound-forward structure 
<p>
<dl compact><dt><b><a class="el" href="test.html#_test000124">Tests:</a></b></dt><dd><ul>
<li>the correctness of the curve is tested by reproducing the input data.</li><li>the correctness of the curve is tested by checking the consistency between returned rates and swaps priced on the curve.</li></ul>
</dd></dl>
<dl compact><dt><b><a class="el" href="bug.html#_bug000011">Bug:</a></b></dt><dd>swap rates are not reproduced exactly when using indexed coupons. Apparently, some assumption about the swap fixings is hard-coded into the bootstrapping algorithm. </dd></dl>

<p>
<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 class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea5f640544d70a8b27b921dff04e940e"></a><!-- doxytag: member="QuantLib::CompoundForward::CompoundForward" ref="ea5f640544d70a8b27b921dff04e940e" args="(const Date &amp;referenceDate, const std::vector&lt; Date &gt; &amp;dates, const std::vector&lt; Rate &gt; &amp;forwards, const Calendar &amp;calendar, const BusinessDayConvention conv, const Integer compounding, const DayCounter &amp;dayCounter)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>CompoundForward</b> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;referenceDate, const std::vector&lt; <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &gt; &amp;dates, const std::vector&lt; Rate &gt; &amp;forwards, const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;calendar, const <a class="el" href="group__datetime.html#gff46c5ae9385d20709bedade86edd368">BusinessDayConvention</a> conv, const Integer compounding, const <a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a> &amp;dayCounter)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="38e235178eb0a7749c37a16d71f4762f"></a><!-- doxytag: member="QuantLib::CompoundForward::calendar" ref="38e235178eb0a7749c37a16d71f4762f" args="() const" -->
<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_compound_forward.html#38e235178eb0a7749c37a16d71f4762f">calendar</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the calendar used for reference date calculation <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db162cdfeed00aeb62b8cac19f5d0948"></a><!-- doxytag: member="QuantLib::CompoundForward::businessDayConvention" ref="db162cdfeed00aeb62b8cac19f5d0948" args="() const" -->
<a class="el" href="group__datetime.html#gff46c5ae9385d20709bedade86edd368">BusinessDayConvention</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>businessDayConvention</b> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d49654ea33055b03f8666910acc13880"></a><!-- doxytag: member="QuantLib::CompoundForward::dayCounter" ref="d49654ea33055b03f8666910acc13880" args="() const" -->
<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_compound_forward.html#d49654ea33055b03f8666910acc13880">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="fd60925ade3ce74d594cfcf846163553"></a><!-- doxytag: member="QuantLib::CompoundForward::compounding" ref="fd60925ade3ce74d594cfcf846163553" args="() const" -->
Integer&nbsp;</td><td class="memItemRight" valign="bottom"><b>compounding</b> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6fa1d746e67f372c6e09e4ec9ad8973b"></a><!-- doxytag: member="QuantLib::CompoundForward::maxDate" ref="6fa1d746e67f372c6e09e4ec9ad8973b" args="() const" -->
<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_compound_forward.html#6fa1d746e67f372c6e09e4ec9ad8973b">maxDate</a> () const</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="4950639c8f60a60050efe2772e1d6a2a"></a><!-- doxytag: member="QuantLib::CompoundForward::maxTime" ref="4950639c8f60a60050efe2772e1d6a2a" args="() const" -->
Time&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_compound_forward.html#4950639c8f60a60050efe2772e1d6a2a">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="9c05af40300cb8466ae21f698a15f728"></a><!-- doxytag: member="QuantLib::CompoundForward::times" ref="9c05af40300cb8466ae21f698a15f728" args="() const" -->
const std::vector&lt; Time &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>times</b> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53d21e09ca3857d3c49b13b23d1bd65d"></a><!-- doxytag: member="QuantLib::CompoundForward::dates" ref="53d21e09ca3857d3c49b13b23d1bd65d" args="() const" -->
const std::vector&lt; <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>dates</b> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="425df6bb060ba1284a9d3e613b573a95"></a><!-- doxytag: member="QuantLib::CompoundForward::forwards" ref="425df6bb060ba1284a9d3e613b573a95" args="() const" -->
const std::vector&lt; Rate &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>forwards</b> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d9d7f87aabe9e1dc47f063d8d08c4f0a"></a><!-- doxytag: member="QuantLib::CompoundForward::discountCurve" ref="d9d7f87aabe9e1dc47f063d8d08c4f0a" args="() const" -->
boost::shared_ptr&lt; <a class="el" href="class_quant_lib_1_1_extended_discount_curve.html">ExtendedDiscountCurve</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>discountCurve</b> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0ccd2dbaa2db1f93d86e3e63e5077ccb"></a><!-- doxytag: member="QuantLib::CompoundForward::compoundForward" ref="0ccd2dbaa2db1f93d86e3e63e5077ccb" args="(const Date &amp;d1, Integer f, bool extrapolate=false) const" -->
Rate&nbsp;</td><td class="memItemRight" valign="bottom"><b>compoundForward</b> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;d1, Integer f, bool extrapolate=false) const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5f04dfa96b85a90d02250f102f9246e5"></a><!-- doxytag: member="QuantLib::CompoundForward::compoundForward" ref="5f04dfa96b85a90d02250f102f9246e5" args="(Time t1, Integer f, bool extrapolate=false) const" -->
Rate&nbsp;</td><td class="memItemRight" valign="bottom"><b>compoundForward</b> (Time t1, Integer f, bool extrapolate=false) const</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="3958d2b1192753f49975ffc9271fdee0"></a><!-- doxytag: member="QuantLib::CompoundForward::calibrateNodes" ref="3958d2b1192753f49975ffc9271fdee0" args="() const" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>calibrateNodes</b> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fbbf8d1a0702765127c1d0f8c4eaabde"></a><!-- doxytag: member="QuantLib::CompoundForward::bootstrap" ref="fbbf8d1a0702765127c1d0f8c4eaabde" args="() const" -->
boost::shared_ptr&lt; <a class="el" href="class_quant_lib_1_1_yield_term_structure.html">YieldTermStructure</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>bootstrap</b> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">Rate&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_compound_forward.html#0a6051c0be9de7feadb867c45518e611">zeroYieldImpl</a> (Time) const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__types.html#g642a971a0bcbbd2fb26c35e1a06e5761">DiscountFactor</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_compound_forward.html#08c98cafd406e91aa8e17cedb889c99d">discountImpl</a> (Time) const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0582c4bb1ce59b8a27380ef44a418e70"></a><!-- doxytag: member="QuantLib::CompoundForward::referenceNode" ref="0582c4bb1ce59b8a27380ef44a418e70" args="(Time) const" -->
Size&nbsp;</td><td class="memItemRight" valign="bottom"><b>referenceNode</b> (Time) const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d8e9c90a41569f10f77acf80f22385b3"></a><!-- doxytag: member="QuantLib::CompoundForward::forwardImpl" ref="d8e9c90a41569f10f77acf80f22385b3" args="(Time) const" -->
Rate&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_compound_forward.html#d8e9c90a41569f10f77acf80f22385b3">forwardImpl</a> (Time) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">instantaneous forward-rate calculation <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4bc4cfec066cf66ae788382c3766496d"></a><!-- doxytag: member="QuantLib::CompoundForward::compoundForwardImpl" ref="4bc4cfec066cf66ae788382c3766496d" args="(Time, Integer) const " -->
Rate&nbsp;</td><td class="memItemRight" valign="bottom"><b>compoundForwardImpl</b> (Time, Integer) const </td></tr>

</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0a6051c0be9de7feadb867c45518e611"></a><!-- doxytag: member="QuantLib::CompoundForward::zeroYieldImpl" ref="0a6051c0be9de7feadb867c45518e611" args="(Time) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Rate zeroYieldImpl           </td>
          <td>(</td>
          <td class="paramtype">Time&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the zero yield rate for the given date calculating it from the instantaneous forward rate.<p>
<dl compact><dt><b><a class="el" href="caveats.html#_caveats000083">Warning:</a></b></dt><dd>This is just a default, highly inefficient and possibly wildly inaccurate implementation. Derived classes should implement their own zeroYield method. </dd></dl>

<p>
Reimplemented from <a class="el" href="class_quant_lib_1_1_forward_rate_structure.html#0a6051c0be9de7feadb867c45518e611">ForwardRateStructure</a>.
</div>
</div><p>
<a class="anchor" name="08c98cafd406e91aa8e17cedb889c99d"></a><!-- doxytag: member="QuantLib::CompoundForward::discountImpl" ref="08c98cafd406e91aa8e17cedb889c99d" args="(Time) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#g642a971a0bcbbd2fb26c35e1a06e5761">DiscountFactor</a> discountImpl           </td>
          <td>(</td>
          <td class="paramtype">Time&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the discount factor for the given date calculating it from the instantaneous forward rate. 
<p>
Reimplemented from <a class="el" href="class_quant_lib_1_1_forward_rate_structure.html#08c98cafd406e91aa8e17cedb889c99d">ForwardRateStructure</a>.
</div>
</div><p>

</div>

<div class="footer">

<table align="top" width="100%">
<tr>
<td align="middle" width="33%">
<strong>QuantLib.org</strong><br>
<a href="http://quantlib.org/">
<img src="QL-small.jpg" alt="QuantLib" align="middle" border=0>
</a>
</td>
<td align="middle" width="33%">
<strong>Hosted by</strong><br>
<a href="http://sourceforge.net"><img src=
"sfnetlogo.png" width="88" height="31"
border="0" alt="SourceForge.net Logo"></a>
</td>
<td align="middle" width="33%">
<strong>Documentation generated by</strong><br>
<a href="http://www.doxygen.org">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53>
</a></td>
</tr>
</table>
</div>

</div>

</body>
</html>