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
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.
0 commit comments