|
| 1 | +\documentclass[12pt, a4paper]{article} |
| 2 | + |
| 3 | +%\usepackage[urlcolor=blue]{hyperref} |
| 4 | + |
| 5 | +\usepackage[disable]{todonotes} |
| 6 | +\usepackage{todonotes} |
| 7 | + |
| 8 | +\usepackage{booktabs} |
| 9 | +\usepackage{pbox} |
| 10 | + |
| 11 | +\usepackage{listings} |
| 12 | +\usepackage{amsmath}% |
| 13 | +\usepackage{amsfonts}% |
| 14 | +\usepackage{amssymb}% |
| 15 | +\usepackage{graphicx} |
| 16 | +\usepackage[miktex]{gnuplottex} |
| 17 | +\ShellEscapetrue |
| 18 | +\usepackage{epstopdf} |
| 19 | +\usepackage{longtable} |
| 20 | +\usepackage{floatrow} |
| 21 | +\usepackage{minted} |
| 22 | +\usepackage{textcomp} |
| 23 | +\usepackage{color,soul} |
| 24 | +\usepackage[font={small,it}]{caption} |
| 25 | +\floatsetup[listing]{style=Plaintop} |
| 26 | +\usepackage[utf8]{inputenc} |
| 27 | + |
| 28 | +% Turn off indentation but allow \indent command to still work. |
| 29 | +\newlength\tindent |
| 30 | +\setlength{\tindent}{\parindent} |
| 31 | +\setlength{\parindent}{0pt} |
| 32 | +\renewcommand{\indent}{\hspace*{\tindent}} |
| 33 | + |
| 34 | +\addtolength{\textwidth}{0.8in} |
| 35 | +\addtolength{\oddsidemargin}{-.4in} |
| 36 | +\addtolength{\evensidemargin}{-.4in} |
| 37 | +\addtolength{\textheight}{1.6in} |
| 38 | +\addtolength{\topmargin}{-.8in} |
| 39 | + |
| 40 | +\usepackage{longtable,supertabular} |
| 41 | +\usepackage{footnote} |
| 42 | +\usepackage{listings} |
| 43 | +\lstset{ |
| 44 | + frame=top,frame=bottom, |
| 45 | + basicstyle=\ttfamily, |
| 46 | + language=XML, |
| 47 | + tabsize=2, |
| 48 | + belowskip=2\medskipamount |
| 49 | +} |
| 50 | + |
| 51 | +%\usepackage{float} |
| 52 | +\usepackage{tabu} |
| 53 | +\tabulinesep=1.0mm |
| 54 | +\restylefloat{table} |
| 55 | + |
| 56 | +\usepackage{siunitx} |
| 57 | +\usepackage{hyperref} |
| 58 | +\hypersetup{ |
| 59 | + colorlinks=true, %set true if you want colored links |
| 60 | + linktoc=all, %set to all if you want both sections and subsections linked |
| 61 | + linkcolor=blue, %choose some color if you want links to stand out |
| 62 | +} |
| 63 | + |
| 64 | +%\usepackage[colorlinks=true]{hyperref} |
| 65 | + |
| 66 | +\renewcommand\P{\ensuremath{\mathbb{P}}} |
| 67 | +\newcommand\E{\ensuremath{\mathbb{E}}} |
| 68 | +\newcommand\Q{\ensuremath{\mathbb{Q}}} |
| 69 | +\newcommand\I{\mathds{1}} |
| 70 | +\newcommand\F{\ensuremath{\mathcal F}} |
| 71 | +\newcommand\V{\ensuremath{\mathbb{V}}} |
| 72 | +\newcommand\YOY{{\rm YOY}} |
| 73 | +\newcommand\Prob{\ensuremath{\mathbb{P}}} |
| 74 | +\newcommand{\D}[1]{\mbox{d}#1} |
| 75 | +\newcommand{\NPV}{\mathit{NPV}} |
| 76 | +\newcommand{\CVA}{\mathit{CVA}} |
| 77 | +\newcommand{\DVA}{\mathit{DVA}} |
| 78 | +\newcommand{\FVA}{\mathit{FVA}} |
| 79 | +\newcommand{\COLVA}{\mathit{COLVA}} |
| 80 | +\newcommand{\FCA}{\mathit{FCA}} |
| 81 | +\newcommand{\FBA}{\mathit{FBA}} |
| 82 | +\newcommand{\KVA}{\mathit{KVA}} |
| 83 | +\newcommand{\MVA}{\mathit{MVA}} |
| 84 | +\newcommand{\PFE}{\mathit{PFE}} |
| 85 | +\newcommand{\EE}{\mathit{EE}} |
| 86 | +\newcommand{\EPE}{\mathit{EPE}} |
| 87 | +\newcommand{\ENE}{\mathit{ENE}} |
| 88 | +\newcommand{\PD}{\mathit{PD}} |
| 89 | +\newcommand{\LGD}{\mathit{LGD}} |
| 90 | +\newcommand{\DIM}{\mathit{DIM}} |
| 91 | +\newcommand{\bs}{\textbackslash} |
| 92 | +\newcommand{\REDY}{\color{red}Y} |
| 93 | +\newcommand\enforce{\,\raisebox{0.8 ex}{$\substack{!\\\displaystyle=}$} \,} |
| 94 | + |
| 95 | + |
| 96 | +\begin{document} |
| 97 | + |
| 98 | +\title{ORE Formula Based Coupon Module} |
| 99 | +\author{Quaternion Risk Management} |
| 100 | +\date{20 Feburary 2019} |
| 101 | +\maketitle |
| 102 | + |
| 103 | +\newpage |
| 104 | + |
| 105 | +%------------------------------------------------------------------------------- |
| 106 | +\section*{Document History} |
| 107 | + |
| 108 | +\begin{center} |
| 109 | +\begin{supertabular}{|l|l|l|p{7cm}|} |
| 110 | +\hline |
| 111 | +ORE+ Release & Date & Author & Comment \\ |
| 112 | +\hline |
| 113 | +na & 29 August 2018 & Peter Caspers& initial version\\ |
| 114 | +1.8.4.0 & 20 February 2019 & Sarp Kaya Acar & add examples \\ |
| 115 | +\hline |
| 116 | +\end{supertabular} |
| 117 | +\end{center} |
| 118 | + |
| 119 | +\vspace{3cm} |
| 120 | + |
| 121 | +\newpage |
| 122 | + |
| 123 | +\tableofcontents |
| 124 | +\vfill |
| 125 | + |
| 126 | +\textcircled{c} 2019 Quaternion Risk Management Limited. All rights reserved. |
| 127 | +Quaternion\textsuperscript{\textregistered} is a trademark of Quaternion Risk Management Limited and is also registered |
| 128 | +at the UK Intellectual Property Office and the U.S. Patent and Trademark Office. All other trademarks are the property |
| 129 | +of their respective owners. Open Source Risk Engine\textsuperscript{\textcircled{c}} (ORE) is sponsored by Quaternion |
| 130 | +Risk Management Limited. |
| 131 | + |
| 132 | +\newpage |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | +%------------------------------------------------------------------------------- |
| 137 | +\section{Summary} |
| 138 | + |
| 139 | +This document describes the formula based coupon implemented in ORE+. |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | +\section{Methodology} |
| 144 | +\label{ssection_FormulaBasedLeg} |
| 145 | +\subsection{Introduction} |
| 146 | + |
| 147 | +We consider a generalised structured coupon which at time $T$ pays |
| 148 | + |
| 149 | +\begin{equation} \tau f(R_1(t), \ldots, R_n(t)) |
| 150 | +\end{equation} |
| 151 | + |
| 152 | +where $\tau$ is the year fraction of the coupon, $R_i$'s are IBOR and/or CMS rates fixed at time $t<T$ and $f$ is a |
| 153 | +payoff function. Moreover we assume that the currency of the coupon can be different than the currency of the rates, |
| 154 | +i.e. the quanto-payoffs are allowed. For instance, let us consider the below example |
| 155 | +% |
| 156 | +\begin{equation} |
| 157 | +f(R_1, R_2) = 1_{\{R_3>0.03\}}\max\{\min\{9\cdot (R_2-R_1)+0.02,0.08\},0.0\}, |
| 158 | +\label{eq:FBCpayoff} |
| 159 | +\end{equation} |
| 160 | +% |
| 161 | +with $R_1=$GBP-CMS-2Y, $R_2=$EUR-CMS-10Y, $R_3=$USD-CMS-5Y. With the Formula-Based-Coupon module it is possible to price |
| 162 | +such kind of coupons by using the Monte-Carlo simulation technique. In the next section, we will present the underlying |
| 163 | +pricing model. |
| 164 | + |
| 165 | +\subsection{Pricing Model} |
| 166 | +\label{ssection_FormulaBasedLegPricingModel} |
| 167 | +For non-callable structured coupons, we generalise the model in |
| 168 | +\cite{brigo}, 13.16.2. We assume the rates |
| 169 | +to evolve with a shifted lognormal dynamics under the $T$-forward |
| 170 | +measure in the respective currency of $R_i$ as |
| 171 | + |
| 172 | +\begin{equation}\label{lndyn} dR_i = \mu_i (R_i + d_i) dt + \sigma_i |
| 173 | +(R_i + d_i) dZ_i |
| 174 | +\end{equation} |
| 175 | + |
| 176 | +with displacements $d_i>0$, drifts $\mu_i$ and volatilities $\sigma_i$ |
| 177 | +or alternatively with normal dynamics |
| 178 | + |
| 179 | +\begin{equation}\label{ndyn} dR_i = \mu_i dt + \sigma_i dZ_i |
| 180 | +\end{equation} |
| 181 | + |
| 182 | +for $i=1,\ldots,n$ where in both cases $Z_i$ are correlated Brownian |
| 183 | +motions |
| 184 | + |
| 185 | +\begin{equation} dZ_i dZ_j = \rho_{i,j} dt |
| 186 | +\end{equation} |
| 187 | + |
| 188 | +with a positive semi-definite correlation matrix $( \rho_{i,j})$. The |
| 189 | +drifts $\mu_i$ are determined using given convexity adjustments |
| 190 | + |
| 191 | +\begin{equation} c_i = E^T(R_i(t)) - R_i(0) |
| 192 | +\end{equation} |
| 193 | + |
| 194 | +where the expectation is taken in the $T$-forward measure in the |
| 195 | +currency of the respective rate $R_i$. Slightly abusing notation $c_i$ |
| 196 | +can be computed both using a model consistent with \ref{lndyn} |
| 197 | +resp. \ref{ndyn} (i.e. a Black76 style model) or also a different |
| 198 | +model like e.g. a full smile TSR model to compute CMS |
| 199 | +adjustments. While the latter choice formally introduces a model |
| 200 | +inconsistency it might still produce more market consistent prices at |
| 201 | +the end of the day, since it centers the distributions of the $R_i$ |
| 202 | +around a mean that better captures the market implied convexity |
| 203 | +adjustments of the rates $R_i$ entering the structured coupon payoff. |
| 204 | + |
| 205 | +Under shifted lognormal dynamics the average drift is then given by |
| 206 | + |
| 207 | +\begin{equation} \mu_i = \frac{\log( (R_i(0)+d_i+c_i) / (R_i(0)+d_i) |
| 208 | +)}{t} |
| 209 | +\end{equation} |
| 210 | + |
| 211 | +and under normal dynamics |
| 212 | + |
| 213 | +\begin{equation} \mu_i = c_i / t |
| 214 | +\end{equation} |
| 215 | + |
| 216 | +The NPV $\nu$ of the coupon is now given by |
| 217 | + |
| 218 | +\begin{equation}\label{struccpnnpv} \nu = P(0,T) \tau E^T ( f(R_1(t), |
| 219 | +\ldots, R_n(t)) ) |
| 220 | +\end{equation} |
| 221 | + |
| 222 | +where $P(0,T)$ is the applicable discount factor for the payment time |
| 223 | +in the domestic currency and the expectation is taken in the |
| 224 | +$T$-forward measure in the domestic currency. To adjust \ref{lndyn} |
| 225 | +resp. \ref{ndyn} for the measure change between the currency of $R_i$ |
| 226 | +and the domestic currency (if applicable), we apply the usual Black |
| 227 | +quanto adjustment |
| 228 | + |
| 229 | +\begin{equation} |
| 230 | + \mu_i \rightarrow \mu_i + \sigma_i \sigma_{i,X} \rho_{i,X} |
| 231 | +\end{equation} |
| 232 | + |
| 233 | +where $\sigma_{i,X}$ is the volatility of the applicable FX rate and |
| 234 | +$\rho_{i,X}$ is the correlation between the Brownian motion driving |
| 235 | +the FX process and $Z_i$. |
| 236 | + |
| 237 | +To evaluate the expectation in \ref{struccpnnpv} a Monte Carlo |
| 238 | +simulation can be used to generate samples of the distribution of |
| 239 | +$(R_1, \ldots, R_n)$, evaluate $f$ on these samples and average the |
| 240 | +results. |
| 241 | + |
| 242 | +\section{Parametrisation} |
| 243 | + |
| 244 | +%\subsection{Trade Components} |
| 245 | + |
| 246 | +\subsection{Formula Based Leg Data} |
| 247 | + |
| 248 | +The formula based leg data allows to use complex formulas to describe coupon payoffs. Its {\tt LegType} is {\tt |
| 249 | + FormulaBased}, and it has the data section {\tt FormulaBasedLegData}. It supports IBOR and CMS based payoffs with |
| 250 | +quanto and digital features. The following examples shows the definition of a coupon paying a capped / floored cross |
| 251 | +currency EUR-GBP CMS Spread contingent on a USD CMS barrier. |
| 252 | + |
| 253 | + |
| 254 | + |
| 255 | +The {\tt Index} field supports operations of the following kind: |
| 256 | +\begin{itemize} |
| 257 | +\item indices like IBOR and CMS indices, and constants as factors, |
| 258 | + spreads and/or cap/floor values; |
| 259 | +\item basic operations: $+$, $-$, $\cdot$, $/$; |
| 260 | +\item operators gtZero() (greater than zero) and geqZero() (greater than or equal zero) yielding $1$ if the argument is |
| 261 | + $>0$ (resp. $\geq 0$) and zero otherwise |
| 262 | +\item functions: abs(), exp(), log(), min(), max(), pow() |
| 263 | +\end{itemize} |
| 264 | +% |
| 265 | +In listing \ref{lst:FBLegdata}, we present the {\tt FormulaBasedLegData} of the payoff in equation \ref{eq:FBCpayoff}. |
| 266 | +% |
| 267 | +\begin{listing} |
| 268 | +\begin{minted}[fontsize=\footnotesize]{xml} |
| 269 | +<LegData> |
| 270 | + <LegType>FormulaBased</LegType> |
| 271 | + <Payer>true</Payer> |
| 272 | + <Currency>EUR</Currency> |
| 273 | + ... |
| 274 | + <FormulaBasedLegData> |
| 275 | + <Index>gtZero({USD-CMS-5Y}-0.03)* |
| 276 | + max(min(9.0*({EUR-CMS-10Y}-{GBP-CMS-2Y})+0.02,0.08),0.0)</Index> |
| 277 | + <IsInArrears>false</IsInArrears> |
| 278 | + <FixingDays>2</FixingDays> |
| 279 | + </FormulaBasedLegData> |
| 280 | + ... |
| 281 | +</LegData> |
| 282 | +\end{minted} |
| 283 | +\caption{FormulaBasedLegData configuration.} |
| 284 | +\label{lst:FBLegdata} |
| 285 | +\end{listing} |
| 286 | +% |
| 287 | +\section{Pricing Engine settings} |
| 288 | + |
| 289 | +The configuration of the pricing engine for the model introduced in section \ref{ssection_FormulaBasedLegPricingModel} |
| 290 | +is given in listing \ref{lst:FBCpricer}. |
| 291 | + |
| 292 | +\begin{itemize} |
| 293 | +\item The formula based coupon pricer uses the pricing engine configuration for { \tt CapFlooredIborLeg} and {\tt CMS}. |
| 294 | + For the configuration of these coupon pricers we refer to sections 7.3, 7.7.3 and 7.74 in \cite{oreug}. |
| 295 | +\item The parameter \verb+FXSource+ specifies the FX index tag to be used to look up FX-Ibor or FX-CMS correlations, see |
| 296 | + also 7.10.2 in \cite{oreug}. |
| 297 | +\end{itemize} |
| 298 | +% |
| 299 | +\begin{listing} |
| 300 | +\begin{minted}[fontsize=\footnotesize]{xml} |
| 301 | + <!-- Formula Based Coupons --> |
| 302 | + <Product type="FormulaBasedCoupon"> |
| 303 | + <Model>BrigoMercurio</Model> |
| 304 | + <ModelParameters> |
| 305 | + <Parameter name="FXSource">ECB</Parameter> |
| 306 | + </ModelParameters> |
| 307 | + <Engine>MC</Engine> |
| 308 | + <EngineParameters> |
| 309 | + <Parameter name="Samples">1000</Parameter> |
| 310 | + <Parameter name="Seed">42</Parameter> |
| 311 | + <Parameter name="Sobol">Y</Parameter> |
| 312 | + <Parameter name="SalvageCorrelationMatrix">Y</Parameter> |
| 313 | + </EngineParameters> |
| 314 | + </Product> |
| 315 | +\end{minted} |
| 316 | +\caption{Pricing engine configuration for formula based coupon pricer.} |
| 317 | +\label{lst:FBCpricer} |
| 318 | +\end{listing} |
| 319 | +% |
| 320 | +\section{Market Data} |
| 321 | +
|
| 322 | +The relevant market data for the formula based coupon pricer encompasses |
| 323 | +
|
| 324 | +\begin{enumerate} |
| 325 | +\item rate curves (for index projection and cashflow discounting) |
| 326 | +\item cap / floor volatilities (for Ibor coupon pricers in the relevant currencies) |
| 327 | +\item swaption volatilities (for CMS coupon pricers in the relevant currencies) |
| 328 | +\item correlation curves for the relevant Ibor-Ibor, Ibor-CMS, CMS-CMS, Ibor-FX, CMS-FX pairs |
| 329 | +\end{enumerate} |
| 330 | +
|
| 331 | +See \cite{oreug} for details on the setup and configuration of this market data. |
| 332 | +
|
| 333 | +\section{Examples} |
| 334 | +
|
| 335 | +\subsection{CMS Spread} |
| 336 | +We demonstrate a single currency Swap (currency EUR, maturity 20y, notional 10m, receive fixed $0.011244\%$ annual, pay |
| 337 | +$\max \left\{ \text{CMS-EUR-10Y}- \text{CMS-EUR-1Y}, 0.0 \right \}$ semi-annual). |
| 338 | +% |
| 339 | +We simulate the exposure with 1000 Monte-Carlo paths by using the formula based coupon pricer and the analytical |
| 340 | +CMS-Spread pricer [section 7.10.8, \cite{oreug}]. The number of Monte-Carlo paths in formula based coupon pricer is |
| 341 | +1000. EPE profiles with both runs are given in figure \ref{fig:MC1K}. We observed that the run with the formula based |
| 342 | +coupon pricer is approximately $2.5$ times slower than the analytical one. |
| 343 | +% |
| 344 | +\begin{figure} |
| 345 | +\includegraphics[scale=0.55]{MC1K.pdf} |
| 346 | +\caption{20Y EUR interest rate swap with floored CMS spread leg, i.e. |
| 347 | + $\max(\text{EUR-CMS-10Y} - \text{EUR-CMS-1Y},\, $0.5\%$) $ } |
| 348 | +\label{fig:MC1K} |
| 349 | +\end{figure} |
| 350 | +
|
| 351 | +\subsection{Digital CMS Spread} |
| 352 | +As a second example, we demonstrate a single currency Swap (currency EUR, maturity 20y, notional 10m, receive fixed |
| 353 | +$0.011244\%$ annual, pay |
| 354 | +$\left(\text{CMS-EUR-10Y}- \text{CMS-EUR-1Y} \right)+ 0.01 * 1_{\left\{\text{CMS-EUR-10Y}- |
| 355 | + \text{CMS-EUR-1Y}>0.0\right\}} $ semi-annual). |
| 356 | +
|
| 357 | +\begin{figure} |
| 358 | + \includegraphics[scale=0.55]{Digital_MC1K_2.pdf} |
| 359 | + \caption{20Y EUR interest rate swap with digital CMS spread leg, i.e. |
| 360 | + $\left(\text{CMS-EUR-10Y}- \text{CMS-EUR-1Y} \right)+ 0.01 * 1_{\left\{\text{CMS-EUR-10Y}- |
| 361 | + \text{CMS-EUR-1Y}>0.0\right\}} $ } |
| 362 | +\label{fig:Digital:MC1K} |
| 363 | +\end{figure} |
| 364 | +
|
| 365 | +
|
| 366 | +
|
| 367 | +\pagebreak |
| 368 | +%\appendix |
| 369 | +%\section*{Appendices} |
| 370 | +%\addcontentsline{toc}{section}{Appendices} |
| 371 | +\renewcommand{\thesubsection}{\Alph{subsection}} |
| 372 | +%\section{Appendix} |
| 373 | +
|
| 374 | +%\subsection{Test}\label{ss_LGM} |
| 375 | +
|
| 376 | +
|
| 377 | +
|
| 378 | +\begin{thebibliography}{1} |
| 379 | +
|
| 380 | +\bibitem{oreug} ORE User Guide, |
| 381 | + \url{http://www.opensourcerisk.org/documentation/} |
| 382 | +% \bibitem{AP}Andersen, Leif B. G., Piterbarg, Vladimir V.: Interest |
| 383 | +% Rate Modeling -- Vol. 3: Products and Risk Management, Atlantic |
| 384 | +% Financial Press, 2010 |
| 385 | +\bibitem{brigo}Brigo, Damiano; Mercurio, Fabio: Interest Rate Models - Theory and |
| 386 | + Practice, 2nd Edition, Springer, 2006 |
| 387 | +% \bibitem{Hagan}Hagan, Patrick: Convexity Conundrums, Wilmott, 2003 |
| 388 | +% \bibitem {Hfb}Heidorn, Schmidt, \textit{LIBOR in Arrears}, 1998, Frankfurt School of Finance |
| 389 | +% \bibitem{LSG}Lichters, Roland; Stamm, Roland; Gallgher, Donal: Modern |
| 390 | +% Derivatives Pricing, Palgrave Macmillan, 2015 |
| 391 | +% \bibitem {Papa}Papaioannou Denis, \textit{Applied Multidimensional |
| 392 | +% Girsanov Theorem}, Electronic copy available at: |
| 393 | +% http://ssrn.com/abstract=1805984 |
| 394 | +
|
| 395 | +
|
| 396 | +
|
| 397 | +\end{thebibliography} |
| 398 | +
|
| 399 | +\end{document} |
0 commit comments