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
or discount factor. The \lstinline!Conventions! node contains the ID of a node in the {\tt conventions.xml} file
161
161
described in section \ref{sec:conventions}. The \lstinline!Conventions! node associates conventions with the quotes.
162
162
163
-
For \emph{Discount} type segments, the quotes can be given using a wildcard. Any valid and matching quotes will then be loaded from the provided market data. An example wildcard is:
163
+
For both \emph{Zero} and \emph{Discount} type segments, the quotes can be given using a wildcard. Any valid and matching quotes will then be loaded from the provided market data. Example wildcards are:
164
164
\begin{itemize}
165
-
\item {DISCOUNT/RATE/EUR/EUR3M/*}
165
+
\item {ZERO/RATE/EUR/*} - matches all EUR zero rate quotes
166
+
\item {DISCOUNT/RATE/EUR/EUR3M/*} - matches all EUR discount factor quotes for the EUR3M curve
demonstrates how ORE provides functionality to calibrate the mean reversion speed($\kappa$) and volatility($\sigma$) parameters for the Hull-White $n$-factor model using historical market data. Two approaches are available:
1822
+
1823
+
\begin{enumerate}
1824
+
\item Full Calibration Using Historical Data
1825
+
\begin{itemize}
1826
+
\item ORE performs Principal Component Analysis (PCA) on historical interest rate curves and FX spot data.
1827
+
\item Based on PCA results, ORE will use eigenvalues and eigenvectors to calibrate constant parameters for the HW $n$-factor model, including $\kappa$ and $\sigma$.
1828
+
\end{itemize}
1829
+
1830
+
\item Mean Reversion Calibration Only
1831
+
\begin{itemize}
1832
+
\item Users can provide their own eigenvalues and eigenvectors for each curve.
1833
+
\item ORE will then perform mean reversion calibration using these inputs without recalculating PCA.
1834
+
\end{itemize}
1835
+
\end{enumerate}
1836
+
1808
1837
1809
1838
\subsection{Netting Set Exposure and Collateral}\label{example:exposurewithcollateral}
\item {\tt model:} The model for Calibration, can be either {\tt CAM} or {\tt HW}, default to {\tt CAM} when left blank or omitted.
505
+
\item {\tt mode:} The calibration mode, must be {\tt historical} for now. Will be ignored if {\tt model} node set to {\tt CAM}.
506
+
\item {\tt foreignCurrencies:} The list of foreign currencies that need the calibration. Will be ignored if {\tt model} node set to {\tt CAM}.
507
+
\item {\tt curveTenors:} The list of tenors for each IR curve when providing historical discount factors or the tenor list of each value in eigenvectors. Will be ignored if {\tt model} node set to {\tt CAM}.
508
+
\item {\tt useForwardOrZeroRate:} When {\tt pcaCalibration} set to {\tt true}, this means whether zero rate or forward rate will be used to calculate the covariance matrix for PCA calibration. When {\tt pcaCalibration} set to {\tt false}, this means whether zero rate or forward rate should be used to parse the provided PCA eigenvectors for mean reversion calibration.
509
+
\item {\tt pcaCalibration:} When set to {\tt true}, ORE will read the historical discount factors and perform PCA calibration. Will be ignored if {\tt model} node set to {\tt CAM}.
510
+
\item {\tt scenarioInputFile:} The path to the file which contains the historical discount factors and historical FX spot rates. Must be in the scenario.csv ORE format. Only needed when {\tt pcaCalibration} set to {\tt true}.
511
+
\item {\tt startDate:} Start date of the historical data that will be used in calibration. Only needed when {\tt pcaCalibration} set to {\tt true}.
512
+
\item {\tt endDate:} End date of the historical data that will be used in calibration. Only needed when {\tt pcaCalibration} set to {\tt true}.
513
+
\item {\tt lambda:} The lambda used on exponentially-weighted historical rates diffs when computing the covariance matrix. The covariance matrix will be equally weighted when {\tt lambda} is set to {\tt 1}. Only needed when {\tt pcaCalibration} set to {\tt true}.
514
+
\item {\tt varianceRetained:} The ratio between the combined variance of retained principal components and total variance. This decides how many principal components will be retained. Only needed when {\tt pcaCalibration} set to {\tt true}.
515
+
\item {\tt pcaOutputFileName:} The output file name of eigenvalues and eigenvectors retained for each currency.
516
+
\item {\tt pcaInputFileName:} The list of file names where eigenvalues and eigenvectors are provided for mean reversion calibration. The files should be one curve per file. Only needed when {\tt pcaCalibration} is set to {\tt false} and {\tt meanReversionCalibration} is set to {\tt true}.
517
+
\item {\tt meanReversionCalibration:} When set to {\tt true}, ORE will perform mean reversion calibration on principal components retained either from previous pca calibration step or from input files.
518
+
\item {\tt basisFunctionNumber:} Number of basis functions used in mean reversion calibration.
519
+
\item {\tt kappaUpperBound:} The upper bound of kappa during mean reversion calibration.
520
+
\item {\tt haltonMaxGuess:} Number of max guess in optimization in mean reversion calibration.
521
+
\item {\tt meanReversionOutputFileName:} The output file name for kappa and v for each curve.
522
+
\end{itemize}
523
+
524
+
For both CAM and HW model calibration, output is the Cross Asset Model data written to {\tt calibration.xml} in the usual output directory, which contains the calibration
465
525
results in place of the initial values for all parametrizations covered so far (IR, FX, EQ, INF, COM). In a subsequent run one could replace
466
526
the {\tt CrossAssetModel} section in {\tt simulation.xml} with the output in {\tt calibration.xml} to re-run without re-calibration.
467
527
Note that the {\tt Calibrate} flags in the output Cross Asset Model data are set to {\tt false}.
468
528
469
529
Additionally, the Cross Asset Model XML is written as a single XML string to the calibration report {\tt calibration.csv}, also held in
470
530
memory for further processing e.g. via ORE's Python interface.
471
531
472
-
See {\tt Example\_8} for a demonstration.
532
+
For HW model, there is an additional output {\tt calibration\_StatisticalWithRiskNeutralVolatility.xml} which is used for multi-factor sigma risk neutral calibration. Similarly, {\tt calibration\_StatisticalWithRiskNeutralVolatility.csv} is also outputted.
Copy file name to clipboardExpand all lines: Docs/UserGuide/tradedata/extendedfxforwardswap.tex
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@ \subsubsection{Extended Fx Forward Swap}
2
2
3
3
Extended Fx Forward Swap are represented as scripted trades, refer to appendix A for an introduction. Listing \ref{lst:extendedfxforwardswap} shows the structure of an example.
4
4
5
+
An Extended Fx Forward Swap is like an FxAccumulator with regular and conditional observation and settlement dates. After the regular observation dates a European barrier is applied on the Extension Decision Date. If the barrier is hit the trade terminates, otherwise the trade continues with cashflows generated on the conditional observation dates.
6
+
5
7
\begin{listing}[H]
6
8
\begin{minted}[fontsize=\footnotesize]{xml}
7
9
<Trade id="ExtendedForward">
@@ -63,6 +65,13 @@ \subsubsection{Extended Fx Forward Swap}
63
65
<Date>2020-03-31</Date>
64
66
<Date>2020-04-30</Date>
65
67
<Date>2020-05-29</Date>
68
+
\end{minted}
69
+
\caption{Extended Fx Forward Swap Representation}
70
+
\label{lst:extendedfxforwardswap}
71
+
\end{listing}
72
+
73
+
\begin{listing}[H]
74
+
\begin{minted}[fontsize=\footnotesize]{xml}
66
75
<Date>2020-06-30</Date>
67
76
<Date>2020-07-31</Date>
68
77
<Date>2020-08-31</Date>
@@ -115,8 +124,8 @@ \subsubsection{Extended Fx Forward Swap}
115
124
</ScriptedTradeData>
116
125
</Trade>
117
126
\end{minted}
118
-
\caption{Extended Fx Forward Swap Representation}
119
-
\label{lst:extendedfxforwardswap}
127
+
\caption{Extended Fx Forward Swap Representation, continued}
128
+
\label{lst:extendedfxforwardswap2}
120
129
\end{listing}
121
130
122
131
The meanings and allowable values of the elements in the \verb+Extended Fx Forward Swap+ representation follow below.
Copy file name to clipboardExpand all lines: Docs/UserGuide/tradedata/totalReturnSwap.tex
+31-2Lines changed: 31 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -55,10 +55,13 @@ \subsubsection{Generic Total Return Swap / Contract for Difference (CFD)}
55
55
\item CBO: See \ref{ss:CBOData}, the trade data is given in a CBOData sub node.
56
56
\item CommodityPosition: See \ref{ss:commodity_position}, the trade data is given in a CommodityPositionData sub node.
57
57
\item ConvertibleBond: See \ref{ss:convertible_bond}, the trade data is given in a ConvertibleBondData sub
58
-
node. When using reference data, a TRS on a convertible bond can also be captured as a TRS on a bond, i.e. there is
59
-
no need to distinguish between a TRS on a Bond and a TRS on a convertible Bond in this case, the pricer will figure
58
+
node. When using reference data, a TRS on a Convertible Bond can also be captured as a TRS on a Bond, i.e. there is
59
+
no need to distinguish between a TRS on a Bond and a TRS on a Convertible Bond in this case, the pricer will figure
60
60
out which underlying to set up based on the type of reference data that is set up for the ISIN referenced in the
61
61
security id field.
62
+
\item CallableBond: See \ref{ss:callable_bond}, the trade data is given in a CallableBond sub node. When using reference data,
63
+
a TRS on a Callable Bond can also be captured as a TRS on a bond, i.e. there is no need to distinguish between a TRS on a Bond and a TRS on a Callable Bond.
64
+
The pricer will figure out which underlying to set up based on the type of reference data that is set up for the ISIN referenced in the security id field.
62
65
\item EquityPosition: See \ref{ss:equity_position}, the trade data is given in a EquityPositionData sub
63
66
node. Notice that the equities given in the basket must be available as quoted market data. To represent a TRS on an Equity Futures position, one or multiple EquityPosition underlyings are used, where the equity positions cover the underlying equity of the futures position.
64
67
@@ -324,6 +327,32 @@ \subsubsection{Generic Total Return Swap / Contract for Difference (CFD)}
0 commit comments