File: class_quant_lib_1_1_settings.html

package info (click to toggle)
quantlib-refman-html 1.20-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 103,140 kB
  • sloc: javascript: 13,408; makefile: 35
file content (257 lines) | stat: -rw-r--r-- 17,810 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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QuantLib: Settings Class Reference</title>
<link href='https://fonts.googleapis.com/css?family=Merriweather+Sans:800' rel='stylesheet' type='text/css'>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="quantlibextra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://quantlib.org">
       <img alt="QuantLib" src="QL-title.jpg"></a>
   <div id="projectbrief">A free/open-source library for quantitative finance</div>
   <div id="projectnumber">Reference manual - version 1.20</div>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_quant_lib.html">QuantLib</a></li><li class="navelem"><a class="el" href="class_quant_lib_1_1_settings.html">Settings</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_quant_lib_1_1_settings-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Settings Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>global repository for run-time library settings  
 <a href="class_quant_lib_1_1_settings.html#details">More...</a></p>

<p><code>#include &lt;ql/settings.hpp&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Settings:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="class_quant_lib_1_1_settings__inherit__graph.png" border="0" usemap="#a_settings_inherit__map" alt="Inheritance graph"/></div>
<map name="_settings_inherit__map" id="a_settings_inherit__map">
<area shape="rect" title="global repository for run&#45;time library settings" alt="" coords="44,80,115,107"/>
<area shape="rect" href="class_quant_lib_1_1_singleton.html" title="Basic support for the singleton pattern." alt="" coords="5,5,153,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a95055e9410ed0465a5f30d3ffc90c1d3"><td class="memItemLeft" align="right" valign="top">DateProxy &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_settings.html#a95055e9410ed0465a5f30d3ffc90c1d3">evaluationDate</a> ()</td></tr>
<tr class="memdesc:a95055e9410ed0465a5f30d3ffc90c1d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">the date at which pricing is to be performed.  <a href="class_quant_lib_1_1_settings.html#a95055e9410ed0465a5f30d3ffc90c1d3">More...</a><br /></td></tr>
<tr class="separator:a95055e9410ed0465a5f30d3ffc90c1d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53ca1bc16becf29ea05425947b3dd87e"><td class="memItemLeft" align="right" valign="top"><a id="a53ca1bc16becf29ea05425947b3dd87e"></a>
const DateProxy &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>evaluationDate</b> () const</td></tr>
<tr class="separator:a53ca1bc16becf29ea05425947b3dd87e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9aa8356b35815cebac2f917f6d4e6b4f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_settings.html#a9aa8356b35815cebac2f917f6d4e6b4f">anchorEvaluationDate</a> ()</td></tr>
<tr class="separator:a9aa8356b35815cebac2f917f6d4e6b4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d83ddb191bf74ffee552d9dd9fc2d3f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_settings.html#a3d83ddb191bf74ffee552d9dd9fc2d3f">resetEvaluationDate</a> ()</td></tr>
<tr class="separator:a3d83ddb191bf74ffee552d9dd9fc2d3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42985b53935a1455fae87abac7897abe"><td class="memItemLeft" align="right" valign="top">bool &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_settings.html#a42985b53935a1455fae87abac7897abe">includeReferenceDateEvents</a> ()</td></tr>
<tr class="separator:a42985b53935a1455fae87abac7897abe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefaffd0bfa9c38d659c3f689945c773f"><td class="memItemLeft" align="right" valign="top"><a id="aefaffd0bfa9c38d659c3f689945c773f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>includeReferenceDateEvents</b> () const</td></tr>
<tr class="separator:aefaffd0bfa9c38d659c3f689945c773f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3bc274d0c10bfa3b2c27380eb000032"><td class="memItemLeft" align="right" valign="top">boost::optional&lt; bool &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_settings.html#ae3bc274d0c10bfa3b2c27380eb000032">includeTodaysCashFlows</a> ()</td></tr>
<tr class="separator:ae3bc274d0c10bfa3b2c27380eb000032"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4215247b7f3d286bc1e68f070c53785e"><td class="memItemLeft" align="right" valign="top"><a id="a4215247b7f3d286bc1e68f070c53785e"></a>
boost::optional&lt; bool &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>includeTodaysCashFlows</b> () const</td></tr>
<tr class="separator:a4215247b7f3d286bc1e68f070c53785e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af595a253588ed5bb7d32db3ea376343a"><td class="memItemLeft" align="right" valign="top"><a id="af595a253588ed5bb7d32db3ea376343a"></a>
bool &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>enforcesTodaysHistoricFixings</b> ()</td></tr>
<tr class="separator:af595a253588ed5bb7d32db3ea376343a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a380639d740a4fc4f59ef6eac627e8188"><td class="memItemLeft" align="right" valign="top"><a id="a380639d740a4fc4f59ef6eac627e8188"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>enforcesTodaysHistoricFixings</b> () const</td></tr>
<tr class="separator:a380639d740a4fc4f59ef6eac627e8188"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a91c99b41b2e91d182b86ccc958e3248e"><td class="memItemLeft" align="right" valign="top"><a id="a91c99b41b2e91d182b86ccc958e3248e"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>Singleton&lt; Settings &gt;</b></td></tr>
<tr class="separator:a91c99b41b2e91d182b86ccc958e3248e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7372fd0b783fb5d23e60a661934d1203"><td class="memItemLeft" align="right" valign="top"><a id="a7372fd0b783fb5d23e60a661934d1203"></a>
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (std::ostream &amp;, const DateProxy &amp;)</td></tr>
<tr class="separator:a7372fd0b783fb5d23e60a661934d1203"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_class_quant_lib_1_1_singleton"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_class_quant_lib_1_1_singleton')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="class_quant_lib_1_1_singleton.html">Singleton&lt; T &gt;</a></td></tr>
<tr class="memitem:ab7455b7e1235d292c444095842349291 inherit pub_static_methods_class_quant_lib_1_1_singleton"><td class="memItemLeft" align="right" valign="top"><a id="ab7455b7e1235d292c444095842349291"></a>
static T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_singleton.html#ab7455b7e1235d292c444095842349291">instance</a> ()</td></tr>
<tr class="memdesc:ab7455b7e1235d292c444095842349291 inherit pub_static_methods_class_quant_lib_1_1_singleton"><td class="mdescLeft">&#160;</td><td class="mdescRight">access to the unique instance <br /></td></tr>
<tr class="separator:ab7455b7e1235d292c444095842349291 inherit pub_static_methods_class_quant_lib_1_1_singleton"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>global repository for run-time library settings </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a95055e9410ed0465a5f30d3ffc90c1d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95055e9410ed0465a5f30d3ffc90c1d3">&#9670;&nbsp;</a></span>evaluationDate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Settings::DateProxy &amp; evaluationDate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>the date at which pricing is to be performed. </p>
<p>Client code can inspect the evaluation date, as in: </p><div class="fragment"><div class="line">Date d = <a class="code" href="class_quant_lib_1_1_singleton.html#ab7455b7e1235d292c444095842349291" title="access to the unique instance">Settings::instance</a>().evaluationDate();</div>
</div><!-- fragment --><p> where today's date is returned if the evaluation date is set to the null date (its default value;) can set it to a new value, as in: </p><div class="fragment"><div class="line"><a class="code" href="class_quant_lib_1_1_singleton.html#ab7455b7e1235d292c444095842349291" title="access to the unique instance">Settings::instance</a>().evaluationDate() = d;</div>
</div><!-- fragment --><p> and can register with it, as in: </p><div class="fragment"><div class="line">registerWith(<a class="code" href="class_quant_lib_1_1_singleton.html#ab7455b7e1235d292c444095842349291" title="access to the unique instance">Settings::instance</a>().<a class="code" href="class_quant_lib_1_1_settings.html#a95055e9410ed0465a5f30d3ffc90c1d3" title="the date at which pricing is to be performed.">evaluationDate</a>());</div>
</div><!-- fragment --><p> to be notified when it is set to a new value. </p><dl class="caveats"><dt><b><a class="el" href="caveats.html#_caveats000154">Warning:</a></b></dt><dd>a notification is not sent when the evaluation date changes for natural causes&mdash;i.e., a date was not explicitly set (which results in today's date being used for pricing) and the current date changes as the clock strikes midnight. </dd></dl>

</div>
</div>
<a id="a9aa8356b35815cebac2f917f6d4e6b4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9aa8356b35815cebac2f917f6d4e6b4f">&#9670;&nbsp;</a></span>anchorEvaluationDate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void anchorEvaluationDate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call this to prevent the evaluation date to change at midnight (and, incidentally, to gain quite a bit of performance.) If no evaluation date was previously set, it is equivalent to setting the evaluation date to <a class="el" href="class_quant_lib_1_1_date.html#aa3b3414c408337e640d21c0936602c66" title="today&#39;s date.">Date::todaysDate()</a>; if an evaluation date other than Date() was already set, it has no effect. </p>

</div>
</div>
<a id="a3d83ddb191bf74ffee552d9dd9fc2d3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d83ddb191bf74ffee552d9dd9fc2d3f">&#9670;&nbsp;</a></span>resetEvaluationDate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void resetEvaluationDate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call this to reset the evaluation date to <a class="el" href="class_quant_lib_1_1_date.html#aa3b3414c408337e640d21c0936602c66" title="today&#39;s date.">Date::todaysDate()</a> and allow it to change at midnight. It is equivalent to setting the evaluation date to Date(). This comes at the price of losing some performance, since the evaluation date is re-evaluated each time it is read. </p>

</div>
</div>
<a id="a42985b53935a1455fae87abac7897abe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42985b53935a1455fae87abac7897abe">&#9670;&nbsp;</a></span>includeReferenceDateEvents()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool &amp; includeReferenceDateEvents </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This flag specifies whether or not Events occurring on the reference date should, by default, be taken into account as not happened yet. It can be overridden locally when calling the <a class="el" href="class_quant_lib_1_1_event.html#aaaf1737e3e49815615baf2e6fb0acbc4" title="returns true if an event has already occurred before a date">Event::hasOccurred</a> method. </p>

</div>
</div>
<a id="ae3bc274d0c10bfa3b2c27380eb000032"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3bc274d0c10bfa3b2c27380eb000032">&#9670;&nbsp;</a></span>includeTodaysCashFlows()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boost::optional&lt; bool &gt; &amp; includeTodaysCashFlows </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If set, this flag specifies whether or not <a class="el" href="class_quant_lib_1_1_cash_flows.html" title="cashflow-analysis functions">CashFlows</a> occurring on today's date should enter the NPV. When the NPV date (i.e., the date at which the cash flows are discounted) equals today's date, this flag overrides the behavior chosen for includeReferenceDate. It cannot be overridden locally when calling the <a class="el" href="class_quant_lib_1_1_cash_flow.html#a63142c7253e86adcdd9da972165a4b8d" title="returns true if an event has already occurred before a date">CashFlow::hasOccurred</a> method. </p>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="http://www.doxygen.org/index.html">Doxygen</a>
1.8.20
</small></address>
</body>
</html>