\documentclass[]{amsart}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{color}
\usepackage[
   pagebackref=true,
   colorlinks=true,
   urlcolor=ogblue,
   citecolor=oggreen,
   linkcolor=ogblue]{hyperref}
%\usepackage{epsfig}
%\usepackage{subfigure}
\usepackage{natbib}
\usepackage{pgf}

\pgfdeclareimage[height=0.7cm]{oglogo}{../OpenGammaLogo}

\definecolor{ogblue}{RGB}{0,85,129}
\definecolor{oggreen}{RGB}{93,194,164}
\definecolor{ogbluelight}{RGB}{17,116,158}
\definecolor{ogred}{RGB}{204,44,0}
\definecolor{oggray}{RGB}{178,178,178}
\definecolor{oggraylight}{RGB}{234,234,234}

\setlength{\oddsidemargin}{0.5cm}
\setlength{\evensidemargin}{0.5cm}
\setlength{\textwidth}{15cm}
\setlength{\textheight}{22cm}

\newcommand{\TODO}[1]%
   {{\sffamily \textbf{\color{oggreen}\noindent TO DO}\marginpar{\hspace*{0.5cm}
     \sffamily \textbf{\color{oggreen}TO DO}}: #1}}

\newtheorem{theo}{Theorem}

\newcommand{\rem}{\par\noindent \textit{Remark:} }
\newcommand{\class}[1]{{\texttt{#1}}}
\newcommand{\spot}{{\operatorname{Spot}}}
\newcommand{\pv}{{\operatorname{PV}}}
\newcommand{\rr}{{\operatorname{RR}}}
\newcommand{\str}{{\operatorname{SS}}}
\newcommand{\atm}{{\operatorname{ATM}}}
\newcommand{\E}[2]{\operatorname{E}^{#1}\left[#2\right]}
%\newcommand{\N}{{\mathbb N}}

\title[Forex options]%
   {Forex option}

\author[M. Henrard]%
   {Marc Henrard}

\date{First version: 10 June 2011; this version: 21 June 2011}

\thanks{Version 1.1}

\address{Marc Henrard \\ Quantitative Research \\ OpenGamma}

\email{marc@opengamma.com}

\begin{document}

\maketitle

\begin{center}
\pgfuseimage{oglogo}
\end{center}

\begin{abstract}
Pricing of vanilla Forex options using a Black formula and a delta and time dependent volatility.
\end{abstract}

\section{Introduction}

The note presents the pricing of vanilla Forex European options. The data is described by the standard figures in the Forex market with the smile represented by the ATM volatility, risk reversals and strangles.

A Forex transaction is represented by an amount in foreign currency $N_1$ and amount in domestic currency $N_2$ (also called quote currency) and a payment date $t_p$ ($N_1$ and $N_2$ have opposite signs). The option on the forex transaction is represented by the underlying Forex transaction, a strike $K$, the expiry $\theta \leq t_p$ and a call/put feature. The strike is relate to the amounts by $K = -N_2/N_1$.

There are two currencies involved and thus two discounting curves. They are denoted $P_D$ for the domestic currency and $P_F$ for the foreign currency. The $P_F$ used here should not be confused with the $P^F$ used in interest rate modelling where the $F$ refers to forward curves.

For a EURUSD transaction, buying EUR at a rate of 1.47 and for a nominal of 1,000,000 EUR, the domestic currency is USD and the foreign currency is EUR. The amounts are $N_1=1,000,000$ and $N_2=-1,470,000$.

\section{Preliminaries}

In this note (and in the implementation), we consider that the exchange rate used is today's exchange rate (and not spot exchange rate).

The options present value are computed from a Black formula with strike and expiry dependent volatility. The forward rate for (payment) date $t$ and today rate $S_0$ is given by
\[
F^{t}_0 = \frac{P_F(0,t)}{P_D(0,t)} S_0.
\]

The present value is computed in the domestic currency.
The present value with the Black formula and a volatility $\sigma$ is
\[
\pv = N_1 P_D(0,t_p) \omega \left( F^{t_p}_0 N(\omega d_+) - K N(\omega d_-)\right)
\]
where $\omega = 1$ for a call, $\omega = -1$ for a put and
\[
d_{\pm} = \frac{\ln\left(\frac{F^{t_p}_0}{K}\right) \pm \frac12 \sigma^2 t}{ \sigma \sqrt{t}}.
\]

The delta of the forward value with respect to the forward rate is given by
\begin{equation}
\label{EqnDeltaForward}
\Delta_F = \omega N(\omega d_+).
\end{equation}
The delta of the present value with respect to the today's rate is given by
\[
\Delta_\spot = \omega P_F(0,t) N(\omega d_+).
\]

\section{Smile}

The smile is the description of the implied volatility for each strike, i.e. of a volatility function $\sigma = \sigma(K)$.
A standard smile description is done with the at-the-money (ATM) volatility, risk reversals (RR) and smile strangles (SS) (see \cite{CLA.2011.1} for more details and other possibilities).

The delta used here is the delta forward described in (\ref{EqnDeltaForward}).
The \emph{at-the-money} (ATM) used is the ATM - Delta Neutral Straddle (DNS), i.e. the strike for which the straddle has 0 delta forward. It is denoted $K_\atm$.

The risk reversals and strangles are given for some deltas, in general for delta 0.10 and 0.25. It means that the figures given are related to puts with deltas -0.10 and -0.25 and to calls with deltas 0.25 and 0.10. All the options are out-of-the-money; the puts have strikes below the ATM strikes and calls have strikes above the ATM strike. The strikes are denoted $K_{x,T}$ with $x$ the absolute value of the delta and $T$ the type ($C$ for call and $P$ for put).

The risk reversals contain information about the skew (or slope) of the smile. The risk reversal figure is the difference between the volatility at the call and the volatility at the put:
\[
\rr(x) = \sigma(K_{x,C}) - \sigma(K_{x,P}).
\]

The strangles contain information about the curvature of the smile. The strangle figure is the difference between the average of the volatility out-of-the-money and volatility at-the-money:
\[
\str(x) = \frac12 \left(\sigma(K_{x,C}) + \sigma(K_{x,P})\right) - \sigma(K_{\atm}).
\]

The strike can be computed explicitly from the forward delta by
\begin{equation}
\label{EqnDelta}
K = F \exp\left( -(\sigma \sqrt{t} \omega N^{-1}(\omega \Delta) - \frac12 \sigma^2 t)  \right).
\end{equation}

The smile is described with the figures
\begin{enumerate}
\item Deltas (usually 0.25 and 0.10).
\item ATM volatility.
\item Risk reversal for each delta.
\item Strangle for each delta.
\end{enumerate}
The strikes/volatilities table is obtained through
\begin{enumerate}
\item Compute the wing volatilities from the risk reversals and strangles.
\item Compute the ATM strike from the ATM volatility.
\item Compute the put/call strikes for each delta from the wing volatilities with (\ref{EqnDelta}).
\end{enumerate}

In the current implementation, the volatility is interpolated linearly on strikes and extrapolated flat beyond the extreme strikes.

\TODO{Add a smooth interpolation approach.}

\section{Currency exposure}

For non-forex instruments and forex forward transactions, the currency risk is simply the present value in each currency.

This is obviously not the case for currency options. For currency options it is the amount in each currency required to neutralise the currency movements. The neutrality will depend on the model used for the option valuation. Here we use the Black model (with the volatility provided by the smile description). By using the Black model, the change of volatility implied by the change of spot is not taken into account.

For vanilla options the currency exposure is computed in the following way: for the foreign currency the exposure is
\[
\Delta_\spot N_1
\]
and for the domestic currency it is
\[
-\Delta_\spot N_1 \spot + \pv.
\]

In other world, if one buys an option at the fair price and at the same time sells $\Delta_\spot N_1$ foreign currency unit against receiving $\Delta_\spot N_1 \spot$ domestic currency unit, he will have no currency position. The $\pv$ part of the currency exposure hedges the premium paid in the domestic currency.

\section{Implementation}

The class implementing the computation of the implied strike from a delta and a volatility is
\class{BlackImpliedStrikeFromDeltaFormula}.

The smile data for one time to expiry can be stored in the class
\class{SmileDeltaParameter}. It can be constructed from deltas, ATM, strangles and risk reversals as described above.

The term structure version of the data consisting of an array of the previous parameters and an array of times to expiry can be stored in the class
\class{SmileDeltaTermStructureParameter}.

The pricing method for vanilla Forex option is \class{ForexOptionVanillaMethod}. There is a present value method and a currency exposure method.

\bibliography{../bibtex/finance}
\bibliographystyle{apa}

\tableofcontents

\end{document}


\section{Verifying Strategies}

The problem of \emph{verifying strategies} is to decide whether a given partition $(W'_0, W'_1)$ of a parity
game $G$ along with two strategies $\sigma_0: W'_0 \cap V_0 \rightarrow V$ and
$\sigma_1: W'_1 \cap V_1 \rightarrow V$ matches the partition into winning sets, i.e. whether $W'_0 = W_0$
and $W'_1 = W_1$ as well as $\sigma_0$ and $\sigma_1$ ensure the win of the respective player in the
respective winning set.

The verification process basically traverses three phases. The algorithm verifies in the first phase that
$\sigma_0$ and $\sigma_1$ are welldefined in the sense that a strategy actually uses valid transitions in
the game graph. In the second phase the algorithm checks whether the strategies stay in their winning
regions, i.e. $\sigma_i[W'_i] \subseteq W'_i$ for both player $i$, as well as whether the winning regions
are closed w.r.t. the respective player.

The third phase finally checks whether the given strategies are winning strategies. In order to solve this
problem, the algorithm computes the subgames $G_i := (G|_{W'_i})|_{\sigma_i}$ induced by the respective sets
and strategies in question. Note that both $G_i$ are special games, namely one-player games. Hence, they
can be solved as described above.

Since $\sigma_i$ is a winning strategy on $W'_i$ iff $\sigma_i$ is a winning strategy on $G_i$, it suffices
to check whether the computed winning set $W^{G_i}_i$ correspond with
$W'_i$, and if they do not, the counter strategy for player $1 - i$ can be used to extract a cycle in $G$
following strategy $\sigma_i$ that is won by $1-i$.

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:


\pageId{pmathmlEnhancement}

\newcommand{\ue}[1]{\upConversionExample{#1}}

The first part of the up-conversion process takes the rather flat MathML normally
output by SnuggleTeX and creates ``enhanced'' presentation MathML that displays in the
same way whilst having a structure that is more amenable to further up-conversion,
such as the conversion to Content MathML and Maxima input syntax.

Generally speaking, the enhancements made are as follows:

\begin{itemize}
\item Precedence of infix operators is inferred, as described in the table
below, using \verb|<mrow>...</mrow>| to make groupings and delimit inferred arguments.
\item Implicit multiplications are inferred, using \verb|<mo></mo>|
(a.k.a.\ \verb|<mo></mo>| or \verb|<mo></mo>|)
to represent this in the resulting MathML.
\item Applications of pre-defined functions like \verb|sin| and explicitly assumed
functions are inferred, using
\verb|<mo></mo>| (a.k.a.\ \verb|<mo></mo>| or \verb|<mo></mo>|)
to represent this.
\end{itemize}

\subsection*{Precedence Table}

The enhancement process works on a list of one or more adjacent MathML element siblings by applying
each test in the table below, in the order shown. When the first match occurs,
the siblings are mapped into a new form, with the process being repeated in each of the operands.

\begin{tabular}{|c|c|c|}
\hline
Test & Result & Live Example \\
\hline
Infix $,$ & Grouped into a \verb|<mfenced>| with empty opener and closer and a child for each operand & \ue{\verb|x,y,z+1|} \\
Infix $\vee$ & Associative Grouping & \ue{\verb|x\vee \lnot y|} \\
Infix $\wedge$ & Associative Grouping & \ue{\verb|x\vee y \wedge z|} \\
Infix relation operator(s) & Associative Grouping (all at same level) & \ue{\verb|1\leq x-a < 2|} \\
Infix $\cup$ & Associative Grouping & \ue{\verb|A\cup B \cap C|} \\
Infix $\cap$ & Associative Grouping & \ue{\verb|A\cup B \cap C|} \\
Infix $\setminus$ & Left-associative Grouping & \ue{\verb|A\setminus B+x|} \\
Infix $+$ & Associative Grouping & \ue{\verb|x-1+y-2|} \\
Infix $-$ & Left-associative Grouping & \ue{\verb|--x-y-z|} \\
Infix $*$, $\times$ and $\cdot$ & Associative Grouping (all at same level) & \ue{\verb|2x+5\times (y-4)|} \\
Infix $/$ and $\div$ & Left-associative Grouping & \ue{\verb|a/b/c/(1 \div x)|} \\
``Space'' operators (i.e. anything producing \verb|<mspace/>|) & Treated as explicit multiplication, grouped associatively & \ue{\verb|a\,b|} \\
Any infix operator in unary context & Operator ``applied'' by wrapping in \verb|<mrow/>| & \ue{\verb|-+x|} \\
No Infix Operator present & Split into subgroups (as defined below) and apply implicit product & \ue{\verb|\sin x\cos y|} \\
``Atoms'' & Kept, applying conversion process to children & \ue{\verb|\sqrt{x}|} \\
\hline
\end{tabular}

\subsection*{``No Infix Operator'' Handling}

Groups of two or more MathML siblings elements that do not contain any infix
operators are treated as an implicit product of adjacent sibling subgroups
starting with MathML elements satisfying any of the following conditions:

\begin{itemize}
\item The first sibling
\item The first sibling after an \verb|<mfenced/>|
\item The first of one or more prefix operator or function siblings
\item The first non-postfix operator after one or more postfix operator siblings
\end{itemize}

The handling of these subgroups is described below. The following examples
hopefully illuminate this process in more detail:

\subsubsection*{Grouping Examples}

\begin{tabular}{|c|c|c|}
\hline
Input & Subgroups & Live Example \\
\hline
\verb|xy| & Kept together as one subgroup & \ue{\verb|xy|} \\
\verb|\sin 2x\cos y| & Split into \verb|\sin 2x| and \verb|\cos y| & \ue{\verb|\sin 2x\cos y|} \\
\verb|\sin f(x)| & Treated as \verb|\sin (f(x))|. (\verb|f| is assumed to be a function in these examples; this is configurable) & \ue{\verb|\sin f(x)|} \\
\verb|\min(x,y)z| & Split into \verb|\min(x,y)| and \verb|z|. This demonstrates the rule for handling fences and is appears reasonable here & \ue{\verb|\min(x,y)z|} \\
\verb|\sin(x+1)z| & Split into \verb|\sin(x+1)| and \verb|z|. This is perhaps contentious, but allows brackets to be used to explicitly delimit function arguments & \ue{\verb|\sin(x+1)z|} \\
\verb|x!y!| & Split into \verb|x!| and \verb|y!| & \ue{\verb|x!y!|} \\
\verb|\cos x!y!| & Split into \verb|cos x!| and \verb|y!| & \ue{\verb|\cos x!y!|} \\
\verb|\sin\cos x| & Kept together & \ue{\verb|\sin\cos x|} \\
\verb|xy\sin\cos 2ax!y!\min(x,y)a| & Split into \verb|xy|, \verb|\sin\cos 2ax!|, \verb|y!|, \verb|\min(x,y)| and \verb|a| & \ue{\verb|xy\sin\cos 2ax!y!\min(x,y)a|} \\
\hline
\end{tabular}

\subsection*{Sibling Subgroup Handling}

Once subgroups have been identified (as described above), each of these
subgroups is then split into:

\begin{itemize}
\item Zero or more prefix operators or unary/n-ary functions
\item Zero or more adjacent ``atoms''
\item Zero or more postfix operators
\end{itemize}

These are then treated as follows:

\begin{itemize}

\item Any postfix operators are ``applied'' from right to left to the
the atoms before them, using a \verb|<mo></mo>| to represent the
operator applications.

Note that the factorial operator is handled specially in that it only
gets applied to the preceding item, so that \verb|2ax!| is treated as
\verb|2a(x!)|, which fits in with common conventions.)

\ue{\verb|x!!|}

\item The atoms resulting after applying postfix operators are treated as an
implicit multiplication.

Revisiting the \verb|2ax!| example, we end up with a product of \verb|2|,
\verb|a| and \verb|x!|.

\ue{\verb|2ax!|}

\item Any prefix functions (e.g. \verb|\sin|) and operators
(e.g. \verb|\lnot|) are ``applied'' from left to right to
whatever is left, using a \verb|<mo></mo>| to represent the
function applications.

So, \verb|\sin\cos 2ax!| is handled as it if were \verb|\sin(\cos(2ax!))|.

\ue{\verb|\sin\cos 2ax!|}

\end{itemize}