You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/ComputeEnvironment/computeenvironment.tex
+21-15Lines changed: 21 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -277,7 +277,7 @@ \subsection{Implementation of the ComputeContext interface}\label{implComputeCon
277
277
operations is described in \ref{randomVariableOpCodes}
278
278
\item\verb+freeVariable()+: indicate that the variable with the given id will no longer be referenced in subsequent
279
279
calculations. The variable id can be reused as a new variable.
280
-
\item\verb+declareOutputVariable()+: declare a variable with given id as part of the output vector
280
+
\item\verb+declareOutputVariable()+: declare a variable with given id as part of the output vector.
281
281
\item\verb+finalizeCalculation()+: execute the calculation and populate the given vector of vector of floats with the
282
282
result. The inner vector is given as a raw pointer and must have the size of the calculation. The outer vector matches
283
283
the output variables in the order they were declared before.
@@ -289,12 +289,17 @@ \subsection{Implementation of the ComputeContext interface}\label{implComputeCon
289
289
290
290
\begin{enumerate}
291
291
\item\verb+initiateCalculation()+: once
292
-
\item\verb+createInputVariable()+: never, once, or several times
293
-
\item\verb+createInputVariates()+: never, once, or several times
294
-
\item\verb+applyOperation()+: only called if the current calculation is not replayed from a previous calculation, then can be called never, once, or several times
295
-
\item\verb+freeVariable()+: only called if the current calculation is not replayed, then can be called never, once, or several times
296
-
\item\verb+declareOutputVariable()+: only called if the current calculation is not replayed, then can be called never, once, or several times
297
-
\item\verb+finalizeCalculation()+: never or once
292
+
\item\verb+createInputVariable()+: never, once, or several times, if a calc is replayed, the same number and type of
293
+
input variables must be created (just with possibly different values)
294
+
\item\verb+createInputVariates()+: called if the current calculation is not replayed from a previous calculation, then
295
+
can be called never, once or several times
296
+
\item\verb+applyOperation()+: only called if the current calculation is not replayed from a previous calculation, then
297
+
can be called never, once, or several times
298
+
\item\verb+freeVariable()+: only called if the current calculation is not replayed, then can be called never, once, or
299
+
several times
300
+
\item\verb+declareOutputVariable()+: only called if the current calculation is not replayed, then can be called never,
301
+
once, or several times
302
+
\item\verb+finalizeCalculation()+: once
298
303
\end{enumerate}
299
304
300
305
\subsection{Random Variable Op Codes}\label{randomVariableOpCodes}
@@ -417,16 +422,17 @@ \subsection{Populating the input variables}
417
422
418
423
\subsection{Populating the input variates}
419
424
420
-
The next step is the creating of random variates
425
+
The next step is the creating of random variates (if this is a new calculation and not replayed):
421
426
422
427
\begin{minted}[fontsize=\footnotesize]{xml}
423
-
auto gen = ComputeEnvironment::instance().context()
Copy file name to clipboardExpand all lines: Docs/UserGuide/tradedata/bond.tex
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ \subsubsection{Bond}
60
60
An alphanumeric string of the form [CCY]-[INDEX]-[TERM]. CCY, INDEX and TERM must be separated by dashes (-). CCY and INDEX must be among the supported currency and index combinations. TERM must be an integer followed by D, W, M or Y. See Table \ref{tab:indices}.
61
61
62
62
For currencies without available ibor indices: \\
63
-
An alphanumeric string of the form [CCY]BENCHMARK-[CCY]-TERM, matching a benchmark curve set up in the market data configuration.
63
+
An alphanumeric string, matching a benchmark curve set up in the market data configuration in {\tt todaysmarket.xml} Yield curves section.
The example in folder {\tt Examples/Example\_18} computes NPVs and cash flow projections for a vanilla bond portfolio
2135
-
consisting of a range of bond products, in particular demonstrating amortisation features:
2135
+
consisting of a range of bond products, in particular demonstrating amortisation features. Also, pricing using a benchmark bond price curve (bond definitions in referencedata.xml) is demonstrated:
2136
2136
\begin{itemize}
2137
2137
\item fixed rate bond
2138
2138
\item floating rate bond linked to Euribor 6M
@@ -2143,6 +2143,7 @@ \subsection{Bonds and Amortisation Structures}% Example 18
2143
2143
\item bond with fixed annuity amortisation
2144
2144
\item bond with floating annuity amortisation (this example needs QuantLib 1.10 or higher to work, in particular the amount() method in the Coupon class needs to be virtual)
2145
2145
\item bond with fixed amount amortisation followed by percentage amortisation relative to previous notional
2146
+
\item fixed rate bond using a benchmark bond price curve instead of the benchmark yield curve
2146
2147
\end{itemize}
2147
2148
2148
2149
After running the example, the results of the computation can be found in the output files {\tt npv.csv} and {\tt
0 commit comments