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
|
<!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>CPICoupon 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="185" height="50" 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 1.2</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="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="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="examples.html">Examples</a></li>
</ul>
</div>
<div id="content">
<!--Doxygen-generated content-->
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>QuantLib</b> </li>
<li class="navelem"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html">CPICoupon</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-methods">Protected Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> </div>
<div class="headertitle">
<div class="title">CPICoupon Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="QuantLib::CPICoupon" --><!-- doxytag: inherits="QuantLib::InflationCoupon" -->
<p>Coupon paying the performance of a CPI (zero inflation) index
<a href="class_quant_lib_1_1_c_p_i_coupon.html#details">More...</a></p>
<p><code>#include <ql/cashflows/cpicoupon.hpp></code></p>
<div class="dynheader">
Inheritance diagram for CPICoupon:</div>
<div class="dyncontent">
<div class="center"><img src="class_quant_lib_1_1_c_p_i_coupon__inherit__graph.png" border="0" usemap="#_c_p_i_coupon_inherit__map" alt="Inheritance graph"/></div>
<map name="_c_p_i_coupon_inherit__map" id="_c_p_i_coupon_inherit__map">
<area shape="rect" id="node2" href="class_quant_lib_1_1_inflation_coupon.html" title="Base inflation-coupon class." alt="" coords="5,6,115,37"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="class_quant_lib_1_1_c_p_i_coupon-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2912608d42f1189af67009e7840a3bd5"></a><!-- doxytag: member="QuantLib::CPICoupon::CPICoupon" ref="a2912608d42f1189af67009e7840a3bd5" args="(Real baseCPI, const Date &paymentDate, Real nominal, const Date &startDate, const Date &endDate, Natural fixingDays, const boost::shared_ptr< ZeroInflationIndex > &index, const Period &observationLag, CPI::InterpolationType observationInterpolation, const DayCounter &dayCounter, Real fixedRate, Spread spread=0.0, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date())" -->
 </td><td class="memItemRight" valign="bottom"><b>CPICoupon</b> (<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> <a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a7076f32553ee48e0680b92904cf7cecd">baseCPI</a>, const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &paymentDate, <a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> nominal, const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &startDate, const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &endDate, <a class="el" href="group__types.html#ga7e529c39c477ba1f5a22264d93e8457a">Natural</a> <a class="el" href="class_quant_lib_1_1_inflation_coupon.html#a525a1bb58e63aa211a97c570b1aafc72">fixingDays</a>, const boost::shared_ptr< <a class="el" href="class_quant_lib_1_1_zero_inflation_index.html">ZeroInflationIndex</a> > &<a class="el" href="class_quant_lib_1_1_inflation_coupon.html#ab678aceb88e36713929969ea64794ad1">index</a>, const <a class="el" href="class_quant_lib_1_1_period.html">Period</a> &<a class="el" href="class_quant_lib_1_1_inflation_coupon.html#a44d0249f5e6de07f14d8b0255d499a38">observationLag</a>, CPI::InterpolationType <a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a62db405966d340dced7d2c24418e43d3">observationInterpolation</a>, const <a class="el" href="class_quant_lib_1_1_day_counter.html">DayCounter</a> &<a class="el" href="class_quant_lib_1_1_inflation_coupon.html#ac147d63df367bbe5282b76b1f98cb9be">dayCounter</a>, <a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> <a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a73f485121a325bf2585dc27479916da8">fixedRate</a>, <a class="el" href="group__types.html#gae7427f4743503002b0c6eeeefae91a3d">Spread</a> <a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a9180ec724c28efa1fac9bfe986bde5e8">spread</a>=0.0, const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &refPeriodStart=<a class="el" href="class_quant_lib_1_1_date.html">Date</a>(), const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &refPeriodEnd=<a class="el" href="class_quant_lib_1_1_date.html">Date</a>())</td></tr>
<tr><td colspan="2"><div class="groupHeader">Inspectors</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73f485121a325bf2585dc27479916da8"></a><!-- doxytag: member="QuantLib::CPICoupon::fixedRate" ref="a73f485121a325bf2585dc27479916da8" args="() const " -->
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a73f485121a325bf2585dc27479916da8">fixedRate</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">fixed rate that will be inflated by the index ratio <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9180ec724c28efa1fac9bfe986bde5e8"></a><!-- doxytag: member="QuantLib::CPICoupon::spread" ref="a9180ec724c28efa1fac9bfe986bde5e8" args="() const " -->
<a class="el" href="group__types.html#gae7427f4743503002b0c6eeeefae91a3d">Spread</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a9180ec724c28efa1fac9bfe986bde5e8">spread</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">spread paid over the fixing of the underlying index <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3fc865a7893694a17491eca24f7df3a0"></a><!-- doxytag: member="QuantLib::CPICoupon::adjustedFixing" ref="a3fc865a7893694a17491eca24f7df3a0" args="() const " -->
<a class="el" href="group__types.html#gaede435af51236692b1107d7639581d39">Rate</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a3fc865a7893694a17491eca24f7df3a0">adjustedFixing</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">adjusted fixing (already divided by the base fixing) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23cbd01fcfcd4d0077f26fca43fb9b41"></a><!-- doxytag: member="QuantLib::CPICoupon::indexFixing" ref="a23cbd01fcfcd4d0077f26fca43fb9b41" args="() const " -->
<a class="el" href="group__types.html#gaede435af51236692b1107d7639581d39">Rate</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a23cbd01fcfcd4d0077f26fca43fb9b41">indexFixing</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">allows for a different interpolation from the index <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#gaede435af51236692b1107d7639581d39">Rate</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a7076f32553ee48e0680b92904cf7cecd">baseCPI</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">base value for the CPI index <a href="#a7076f32553ee48e0680b92904cf7cecd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a62db405966d340dced7d2c24418e43d3"></a><!-- doxytag: member="QuantLib::CPICoupon::observationInterpolation" ref="a62db405966d340dced7d2c24418e43d3" args="() const " -->
CPI::InterpolationType </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a62db405966d340dced7d2c24418e43d3">observationInterpolation</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">how do you observe the index? as-is, flat, linear? <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5da913aeed0edf77297364893db12269"></a><!-- doxytag: member="QuantLib::CPICoupon::indexObservation" ref="a5da913aeed0edf77297364893db12269" args="(const Date &onDate) const " -->
<a class="el" href="group__types.html#gaede435af51236692b1107d7639581d39">Rate</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a5da913aeed0edf77297364893db12269">indexObservation</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &onDate) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">utility method, calls indexFixing <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d55ac3f4ee40d96136b8aab08ea81bd"></a><!-- doxytag: member="QuantLib::CPICoupon::cpiIndex" ref="a7d55ac3f4ee40d96136b8aab08ea81bd" args="() const " -->
boost::shared_ptr<br class="typebreak"/>
< <a class="el" href="class_quant_lib_1_1_zero_inflation_index.html">ZeroInflationIndex</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a7d55ac3f4ee40d96136b8aab08ea81bd">cpiIndex</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">index used <br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Visitability</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a896099363a2a409d2485c3ce9e4e4265"></a><!-- doxytag: member="QuantLib::CPICoupon::accept" ref="a896099363a2a409d2485c3ce9e4e4265" args="(AcyclicVisitor &)" -->
virtual void </td><td class="memItemRight" valign="bottom"><b>accept</b> (<a class="el" href="class_quant_lib_1_1_acyclic_visitor.html">AcyclicVisitor</a> &)</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a947620f9e884e010e17fc31dc1f2cef2"></a><!-- doxytag: member="QuantLib::CPICoupon::checkPricerImpl" ref="a947620f9e884e010e17fc31dc1f2cef2" args="(const boost::shared_ptr< InflationCouponPricer > &) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a947620f9e884e010e17fc31dc1f2cef2">checkPricerImpl</a> (const boost::shared_ptr< <a class="el" href="class_quant_lib_1_1_inflation_coupon_pricer.html">InflationCouponPricer</a> > &) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">makes sure you were given the correct type of pricer <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f486fb9074cbd62096628d79b804b04"></a><!-- doxytag: member="QuantLib::CPICoupon::indexFixing" ref="a2f486fb9074cbd62096628d79b804b04" args="(const Date &) const " -->
<a class="el" href="group__types.html#gaede435af51236692b1107d7639581d39">Rate</a> </td><td class="memItemRight" valign="bottom"><b>indexFixing</b> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &) const </td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abe43b8a81a0545ff4254dde4f2a8270e"></a><!-- doxytag: member="QuantLib::CPICoupon::baseCPI_" ref="abe43b8a81a0545ff4254dde4f2a8270e" args="" -->
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> </td><td class="memItemRight" valign="bottom"><b>baseCPI_</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e51ec575e6fdb1bcd83011ac371ec45"></a><!-- doxytag: member="QuantLib::CPICoupon::fixedRate_" ref="a7e51ec575e6fdb1bcd83011ac371ec45" args="" -->
<a class="el" href="group__types.html#ga4bdf4bfe76b9ffa6fa64c47d8bfa0c78">Real</a> </td><td class="memItemRight" valign="bottom"><b>fixedRate_</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6db15cb8f4db71dbdd282eb1a4a9bcd"></a><!-- doxytag: member="QuantLib::CPICoupon::spread_" ref="aa6db15cb8f4db71dbdd282eb1a4a9bcd" args="" -->
<a class="el" href="group__types.html#gae7427f4743503002b0c6eeeefae91a3d">Spread</a> </td><td class="memItemRight" valign="bottom"><b>spread_</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9868f55e165fea77c2a710d346fb713"></a><!-- doxytag: member="QuantLib::CPICoupon::observationInterpolation_" ref="ab9868f55e165fea77c2a710d346fb713" args="" -->
CPI::InterpolationType </td><td class="memItemRight" valign="bottom"><b>observationInterpolation_</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Coupon paying the performance of a CPI (zero inflation) index </p>
<p>The performance is relative to the index value on the base date.</p>
<p>The other inflation value is taken from the refPeriodEnd date with observation lag, so any roll/calendar etc. will be built in by the caller. By default this is done in the <a class="el" href="class_quant_lib_1_1_inflation_coupon.html" title="Base inflation-coupon class.">InflationCoupon</a> which uses ModifiedPreceding with fixing days assumed positive meaning earlier, i.e. always stay in same month (relative to referencePeriodEnd).</p>
<p>This is more sophisticated than an IndexedCashFlow because it does date calculations itself.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Possible enhancements:</a></b></dt><dd>we do not do any convexity adjustment for lags different to the natural ZCIIS lag that was used to create the forward inflation curve. </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7076f32553ee48e0680b92904cf7cecd"></a><!-- doxytag: member="QuantLib::CPICoupon::baseCPI" ref="a7076f32553ee48e0680b92904cf7cecd" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__types.html#gaede435af51236692b1107d7639581d39">Rate</a> <a class="el" href="class_quant_lib_1_1_c_p_i_coupon.html#a7076f32553ee48e0680b92904cf7cecd">baseCPI</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>base value for the CPI index </p>
<dl class="caveats"><dt><b><a class="el" href="caveats.html#_caveats000003">Warning:</a></b></dt><dd>make sure that the interpolation used to create this is what you are using for the fixing, i.e. the observationInterpolation. </dd></dl>
</div>
</div>
</div><!-- contents -->
</div>
<div class="footer">
<div class="endmatter">
Documentation generated by
<a href="http://www.doxygen.org">Doxygen</a> 1.7.6.1
</div>
</div>
</div>
</body>
</html>
|