## Put-Call Parity

Put-Call parity is a simple result connecting the prices of puts and calls in a model-independent way via the forward price.

Consider the three graphs below, showing independently the payoff at expiry of a vanilla call, a vanilla put, and a forward contract. We can see that the payoff of a long call plus the payoff of a short put will precisely overlap the forward contract payoff (assuming they have the same strike and expiry…).

This can be seen from the algebra as well:

\begin{align*}&space;C_{\rm&space;call}(T)&space;-&space;C_{\rm&space;put}(T)\&space;&&space;=&space;\big(&space;S(T)&space;-&space;K&space;\big)^+&space;-&space;\big(&space;K&space;-&space;S(T)&space;\big)^+&space;\\&space;&&space;=&space;S(T)&space;-&space;K&space;\\&space;&&space;=&space;F(T,T)&space;\end{align*}

If two portfolios have the same payoff, it’s a fundamental rule of derivatives pricing that they must have the same price, which gives the fundamental put-call parity relationship

$C_{\rm&space;call}(t)&space;-&space;C_{\rm&space;put}(t)\&space;=&space;Z(t,T)\cdot\Big(&space;F(t,T)&space;-&space;K\Big)$

We can take the BS expressions for put and call prices given in a previous post and observe that they obey the relationship [since $\inline&space;\Phi(x)&space;+&space;\Phi(-x)&space;=&space;1$], but importantly this result is model independent. As long as there is a forward contract available with the strike and expiry of the options, then this result MUST hold in ANY model.

One implication of this is that if we use a model to determine the price of a call option, put-call parity fixes the price of the put option to be

$C_{\rm&space;put}(t)&space;=&space;C_{\rm&space;call}(t)&space;-&space;Z(t,T)\cdot\Big(&space;F(t,T)&space;-&space;K\Big)$

We can actually use this to improve our code. Out-of-the-money options typically require more paths to converge in Monte Carlo simulations because they rely on the detailed behaviour of a few paths that travel a long way. However, we can calculate in-the-money prices quickly and due to put-call parity these will lock the price of the matching out-of-the-money options.

Put-call parity is also an important test of the implementation of a model – if the prices that we are getting out don’t obey this relationship then we’ve done something seriously wrong [as long as both prices have converged!]. An equivalent statement is that the implied BS volatility of matching puts and calls should be exactly the same in any model, since the implied vol is the BS vol that would produce the given price for a put/call, and this is locked by put-call parity.

We can get some other similar relationships between put and call prices that I’ll look at in the future. Also note that put-call parity holds for european-style options, but not for many more complicated path-dependent options or those with early exercise features like American options.

## Stochastic Rates Models

In a previous post, I introduced the Black-Scholes model, in which the price of an underlying stock is modeled with a stochastic variable that changes unpredictably with time. I’ve also discussed the basic model-independent rates products whose value can be determined at the present time exactly. However, to progress further with interest rate derivatives, we’re going to need to model interest rates more carefully. We’ve assumed rates are deterministic so far, but of course this isn’t true – just like stocks, they change with time in an uncertain manner, so we need to allow them to become stochastic as well.

One way of doing this is by analogy with the BS case, by allowing the short rate (which is the instantaneous risk-neutral interest rate ) to become stochastic as well, and then integrating it over the required period of time to calculate forward rates.

A very basic example of this is the Vasicek Model. In this model the short rate is defined to be stochastic, with behaviour governed by the following SDE

where  and  are constants and  is the standard Wiener increment as described before. This is marginally more complicated than the BS model, but still belongs to the small family of SDEs that are analytically tractable. Unlike stock prices, we expect rates to be mean-reverting – stock price variance grows with time, but we expect the distribution of rates to be confined to a fairly narrow range by comparison. The term in square brackets above achieves this, since if  is greater than  then it will be negative and cause the rate to be pulled down, while if it is below the term will be positive and push the rate up towards .

Solving the equation requires a trick, which is instead of thinking about the rate alone to think about the quantity . This is equal to , and substituting in the incremental rate term from the original equation we have

note that the term in  has been cancelled out, and the remaining terms can be integrated directly from a starting time to a finishing time

where  is the initial rate. This is simply a gaussian distribution with mean and variance given by

Where the variance is calculated using the “Ito isometry

as stated above. Note that this allows the possibility of rates going negative, which is generally considered to be a weakness of the model, but the chance is usually rather small.

As we know the distribution of the short rate, we can calculate some other relevant quantities. Of primary importance are the Zero Coupon Bonds, which are required for calculation of forward interest rates. A ZCB is a derivative that pays $1 at a future time , and we can price this using the Risk-Neutral Valuation technique. According to the fundamental theorem of asset pricing, the current price of a derivative divided by our choice of numeraire must be equal to it’s future expected price at any time divided by the value of the numeraire at that time, with the expectation taken in the probability measure corresponding to the choice of numeraire. In the risk-neutral measure, the numeraire is just a unit of currency, initially worth$1 but continually re-invested at the instantaneous short rate, so that its price at time is $1 . Now, the price of the ZCB is given by Although the RHS is true at any time, we only know the value of the ZCB exactly at a single time at the moment – the expiry date , at which it is worth exactly$1. Plugging in these values we have

So the ZCB is given by the expectation of the integral of the rate over a period of time. Since the rate is itself gaussian, and an integral is the limit of a sum, it’s not surprising that this quantity is also gaussian (it’s effectively the sum of many correlated gaussians, which is also gaussian, as discussed before), but it’s rather tricky to calculate, I’ve included the derivation at the bottom of the post to same space here. The mean and variance are given by

where

The ZCB is given by the expectation of the exponential of a gaussian variable – and we’ve seen on several occasions that

So the ZCB prices are

with  as defined above and

and as these expressions only depend on the rates at the initial time, we can calculate ZCB bond prices and hence forward rates for any future expiry dates at any given time if we have the current instantaneous rate.

Although we can calculate a discount curve for a given set of parameters, the Vasicek model can’t calibrate to an initial ZCB curve taken from the market, which is a serious disadvantage. There are more advanced generalisations which can, and I’ll discuss some soon, but they will use all of the same tricks and algebra that I’ve covered here.

I’ve written enough for one day here – in later posts I’ll discuss changing to the t-forward measure, in which the ZCB forms the numeraire instead of a unit of currency, which simplifies many calculations, and I’ll use it to price caplets under stochastic rates, and show that these are equivalent to european options on ZCBs.

An alternate approach to the short-rate model approach discussed today which is very popular these days is the Libor Market Model (LMM) approach, in which instead of simulating the short rate and calculating the required forwards, the different forwards required are instead computed directly and in tandem – I’ll look further at this approach in another post.

Here is the calculation of the distribution of the integral of the instantaneous rate over the period to :

and splitting this into the terms that contribute to the expectation and the variance we have

to calculate the variance, we first need to deal with the following term

we use stochastic integration by parts

and we’re now in a position to try and find the variance of the integral

where Ito’s isometry has been used again, and several more lines of routine algebra leads to the result

## Bootstrapping the Discount Curve from Swap Rates

Today’s post will be a short one about calculation of discount curves from swap rates. I’ve discussed both swaps and discount curves in previous posts, you should read those before this one or it might not make much sense!

Although bonds can be used to calculate discount bond prices, typically swaps are the most liquid products on the market and will go to the longest expiry times (often 80+ years for major currencies), so these are used to calculate many of the points on the discount curve [and often both of these can be done simultaneously to give better reliability].

In the previous post on swaps, I calculated the swap rate that makes swaps zero-valued at the current time

where the ‘s here represent the fixing dates of the swap (although payment is made at the beginning of the following period, so the ‘th period is received at .

Consider the sequence of times  for which a sequence of swaps are quoted on the markets, with swap rates  for the swap running from up to . We can back out the discount factor at each time as follows:

and we can see from this the general procedure, calculating another ZCB from each successive swap rate using the expression

These swaps and ZCBs are called co-initial because they both started at the same time .

Now imagine that instead the swaps  have the first fixing at time  and their final fixing at time  for  – such swaps are called co-terminal swaps as they start at different times but finish at the same one. Once again we can calculate the discount factors up to a constant factor, this time by working backwards:

and so on, the dcfs can be backed out.

To specify the exact values of co-terminal swaps, we need to know at least one dcf exactly. In general the co-initial case will also require this – I implicitly assumed that they started fixing at  where we know , but for general co-initial swaps we would also have this issue.

## Solving the Heat Equation

This post follows on from my earlier post on the BS Equation from Delta Hedging. In that post, I showed how delta hedging arguments within the BS model lead to the heat equation

${1\over&space;2}\sigma^2&space;{\partial^2&space;D\over&space;\partial&space;y^2}&space;-&space;{\partial&space;D&space;\over&space;\partial&space;\tau}&space;=&space;0$

where $\inline&space;D&space;=&space;C&space;e^{-r&space;\tau}$, C(S,t) is the derivative price, $\inline&space;y&space;=&space;\ln&space;S&space;+&space;\big(&space;r&space;-&space;{1\over&space;2}\sigma^2&space;\big)\tau$, and $\inline&space;\tau&space;=&space;T&space;-&space;t$. In this post I’m going to solve this equation to give the BS option price for a vanilla call. S can only take positive values, but due the the logarithm y runs from $\inline&space;-\infty$ to $\inline&space;\infty$.

In physics, this equation is usually encountered with periodic boundary conditions coming from the boundaries of the region of interest, but here we don’t have that luxury so will need to be more careful. In this post I’m going to solve the equation using the method of separation of variables, in a later post I’ll re-solve it using the method of Fourier transforms.

The heat equation is linear, which means that if $\inline&space;f(y,\tau)$ and $\inline&space;g(y,\tau)$ are both solutions, then so is the sum $\inline&space;\big(&space;f(y,\tau)&space;+&space;g(y,\tau)&space;\big)$. This means that if we can find a selection of possible solutions, we can combine them to match the boundary condition given by the known form of $\inline&space;D(y,\tau&space;=&space;0)$ at expiry (coming from $\inline&space;C(S,\tau&space;=&space;0)&space;=&space;\big(&space;S&space;-&space;K&space;\big)^+$). We look for separable solutions, which are those of the form $\inline&space;f(y,\tau)&space;=&space;Y(y)T(\tau)$, in which case the derivatives in the heat equation only act on their respective terms:

${1\over&space;2}\sigma^2&space;T(\tau){\partial^2&space;Y(y)\over&space;\partial&space;y^2}&space;-&space;Y(y){\partial&space;T(\tau)&space;\over&space;\partial&space;\tau}&space;=&space;0$

${1\over&space;2}\sigma^2&space;Y''T&space;=&space;Y&space;\dot{T}$

${1\over&space;2}\sigma^2&space;{Y''\over&space;Y}&space;=&space;{\dot{T}&space;\over&space;T}&space;=&space;\lambda^2$

where a dash denotes differentiation by y and a dot differentiation by tau, In the final equation, both sides depend only on independent variables y and tau respectively – the only way this can be true is if both sides are equal to some constant, which we call $\inline&space;\lambda^2$.

In general, we should consider the possibilities that $\inline&space;\lambda^2$ is zero or negative, but it turns out that these won’t matter in this example so I ignore them for brevity. Two equations can be extracted, linked by $\inline&space;\lambda^2$

$Y''&space;-&space;2&space;{\lambda^2&space;\over&space;\sigma^2}&space;Y&space;=&space;0$

$\dot{T}&space;-&space;\lambda^2&space;T&space;=&space;0$

Solving these equations,

$Y_\lambda(y)&space;=&space;Y_{0,\lambda}&space;e^{\sqrt{2}{\lambda&space;\over&space;\sigma&space;}y}$

$T_\lambda&space;(\tau)&space;=&space;e^{\lambda^2&space;\tau}$

with any positive value of lambda allowed. We first try to find the fundamental solution of the heat equation, which is the solution that satisfies $\inline&space;f(y,\tau&space;=&space;0)&space;=&space;\delta(y-a)$ where $\inline&space;\delta$ is the Dirac delta function, and I’ll use this to find the particular solution for a vanilla call at the end. At $\inline&space;\tau&space;=&space;0$ all of the functions T are 1, so these can be neglected, and we simply sum up the right number of Y terms, each with a different value of $\inline&space;\lambda$ which we index with n, to produce the delta function:

$\sum_n&space;Y_{0,\lambda_n}&space;e^{\sqrt{2}{\lambda_n&space;\over&space;\sigma&space;}y}&space;=&space;\delta(y-a)$because $\inline&space;\lambda$ can take any value on the continuous interval $\inline&space;-\infty&space;<&space;\lambda&space;<&space;\infty$, we change the sum to an integral, and also express the delta function using its integral representation and compare co-efficient to equate the two expressions

$\int_{-\infty}^{\infty}&space;Y_{0,\lambda_n}&space;e^{\sqrt{2}{\lambda_n&space;\over&space;\sigma&space;}y}dn&space;=&space;{1&space;\over&space;2\pi}&space;\int_{-\infty}^{\infty}&space;e^{in(y-a)}dn$

so

$Y_{0,n}&space;=&space;{1&space;\over&space;2\pi}e^{-in&space;a}&space;\quad&space;;&space;\quad&space;\lambda_n&space;=&space;{1&space;\over&space;\sqrt{2}}\sigma&space;i&space;n$

And plugging these into our earlier expressions for Y and T, and combining these in the same way for $\inline&space;\tau&space;>&space;0$ to provide the temporal behavior, we arrive at

$f(y,\tau)&space;=&space;\int_{-\infty}^{\infty}&space;Y_{\lambda_n}(y)&space;T_{\lambda_n}(\tau)&space;dn$

$=&space;{1\over&space;2\pi}&space;\int_{-\infty}^{\infty}&space;e^{in(y-a)}&space;e^{-{\sigma^2&space;n^2&space;\tau&space;\over&space;2}}dn$

and once again, this is a gaussian integral that we’ll tackle by completing the square…

$=&space;{1\over&space;2\pi}&space;\int_{-\infty}^{\infty}&space;\exp\Big\{&space;-{1&space;\over&space;2}&space;\sigma^2&space;\tau&space;\Big(&space;n^2&space;-&space;2&space;{i(y-a)\over&space;\sigma^2&space;\tau}&space;+&space;\big(&space;{i(y-a)\over&space;\sigma^2&space;\tau}\big)^2-\big(&space;{i(y-a)\over&space;\sigma^2&space;\tau}\big)^2&space;\Big)&space;\Big\}&space;dn$

$=&space;{1\over&space;2\pi}&space;\int_{-\infty}^{\infty}&space;\exp\Big\{&space;-{1&space;\over&space;2}&space;\sigma^2&space;\tau&space;\Big(n-&space;\big(&space;{i(y-a)\over&space;\sigma}\big)&space;\Big)^2&space;\Big\}&space;\cdot&space;\exp{-(y-a)^2&space;\over&space;2&space;\sigma^2&space;\tau}&space;dn$

$=&space;{1\over&space;2\pi}\cdot\sqrt{2\pi&space;\over&space;\sigma^2&space;\tau}\cdot&space;\exp{-(y-a)^2&space;\over&space;2&space;\sigma^2&space;\tau}$

$=&space;{1\over&space;\sqrt{2\pi&space;\sigma^2&space;\tau}}\cdot&space;\exp{-(y-a)^2&space;\over&space;2&space;\sigma^2&space;\tau}$

and this is the fundamental solution given at the end of the first post and also at wikipedia. Note that although we used separation of variables to find the forms of the functions Y and T, the separability hasn’t been carried through the summation of many different T-Y combinations – the fundamental solution that we’ve arrived at ISN’T separable!

The fundamental solution is the time and space evolution of a function that is initially a delta-function, such that the evolution always obeys the heat equation. We can use the following property of the delta function to construct specific solutions for particular payoff functions:

$f(y)&space;=&space;\int_{-\infty}^{\infty}&space;\delta(y-a)&space;f(a)&space;da$

So, because the fundamental solution $\inline&space;f(y,\tau=0)&space;=&space;\delta(y-a)$, we can construct the payoff function using this integral at $\inline&space;\tau&space;=&space;0$

$D(y,\tau=0)&space;=&space;\int_{-\infty}^{\infty}&space;f(a,\tau=0)&space;D(a,\tau=0)&space;da$

and consequently, at later times

$D(y,\tau)&space;=&space;\int_{-\infty}^{\infty}&space;f(a,\tau)&space;D(a,\tau=0)&space;da$and we can solve this for the specific case that $\inline&space;C(S,\tau&space;=&space;0)&space;=&space;\big(&space;S(\tau=0)&space;-&space;K&space;\big)^+$ as follows (denoting a as y’)

$D(y,\tau)&space;=&space;{e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{-\infty}^{\infty}&space;\exp\Big\{&space;-&space;{(y'-y)^2&space;\over&space;2\sigma^2&space;\tau}&space;\Big\}&space;\cdot&space;\big(&space;e^{y'}&space;-&space;K&space;\big)^+&space;dy'$

The second factor is only non-zero when $\inline&space;y'&space;>&space;\ln&space;K&space;=&space;y_L$, so we can absorb this condition into the lower limit

$=&space;{e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{y_L}^{\infty}&space;\exp\Big\{&space;-&space;{(y'-y)^2&space;\over&space;2\sigma^2&space;\tau}&space;\Big\}&space;\cdot&space;\big(&space;e^{y'}&space;-&space;K&space;\big)&space;dy'$and splitting this into two integrals, which we do in turn

$=&space;{e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{y_L}^{\infty}&space;K\exp\Big\{&space;-&space;{(y'-y)^2&space;\over&space;2\sigma^2&space;\tau}&space;\Big\}&space;dy'&space;=&space;e^{-r\tau}\cdot&space;K\cdot&space;\Phi\Big({y&space;-&space;y_L&space;\over&space;\sigma&space;\sqrt{\tau}}\Big)$

and

${e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{y_L}^{\infty}&space;\exp\Big\{&space;-&space;{(y'-y)^2&space;\over&space;2\sigma^2&space;\tau}&space;\Big\}&space;\cdot&space;e^{y'}&space;dy'$

$=&space;{e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{y_L}^{\infty}&space;\exp\Big\{&space;-&space;{1\over&space;2\sigma^2&space;\tau}\Big(&space;y'^2&space;+&space;y^2&space;-&space;2y'y&space;-2y'\sigma^2\tau&space;\pm&space;(&space;y&space;+&space;\sigma^2\tau&space;)^2&space;\Big)&space;\Big\}&space;dy'$

$=&space;{e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{y_L}^{\infty}&space;\exp\Big\{&space;-&space;{1\over&space;2\sigma^2&space;\tau}\Big(&space;\big(y'-(y+\sigma^2&space;\tau)\big)^2&space;-&space;\big(y&space;+&space;\sigma^2&space;\tau\big)^2&space;+&space;y^2\Big)&space;\Big\}&space;dy'$

$=&space;{e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{y_L}^{\infty}&space;\exp\Big\{&space;-&space;{1\over&space;2\sigma^2&space;\tau}\Big(&space;\big(y'-(y+\sigma^2&space;\tau)\big)^2&space;-&space;\sigma^2\tau\big(2y&space;+&space;\sigma^2&space;\tau\big)\Big)&space;\Big\}&space;dy'$

$=&space;{e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{y_L}^{\infty}&space;\exp\Big\{&space;-&space;{\big(y'-(y+\sigma^2&space;\tau)\big)^2\over&space;2\sigma^2&space;\tau}\Big\}\cdot&space;S&space;e^{r\tau}&space;dy'$

$=&space;e^{-r\tau}&space;\cdot&space;F&space;\cdot&space;\Phi&space;\Big(&space;{y&space;-&space;y_L&space;+&space;\sigma^2&space;\tau&space;\over&space;\sigma&space;\sqrt{\tau}}&space;\Big)$

where as usual, $\inline&space;\Phi(x)$ is the cumulative normal distribution; and we’ve used the expression $\inline&space;y&space;=&space;\ln&space;S&space;+&space;(r&space;-&space;{1\over&space;2}\sigma^2)\tau$ and also $\inline&space;y&space;+&space;{1&space;\over&space;2}\sigma^2&space;\tau&space;=&space;S&space;e^{r\tau}&space;=&space;F$. Putting all of this together, we finally arrive at the Black-Scholes expression for a vanilla call price,

${e^{-r\tau}&space;\over&space;\sqrt{2\pi\sigma^2\tau}}\int_{y_L}^{\infty}&space;\exp\Big\{&space;-&space;{(y'-y)^2&space;\over&space;2\sigma^2&space;\tau}&space;\Big\}&space;\cdot&space;\big(&space;e^{y'}&space;-&space;K&space;\big)&space;dy'$

$=&space;e^{-r\tau}&space;\Big(&space;F&space;\cdot&space;\Phi(d_1)&space;-&space;K\cdot&space;\Phi(d_2)\Big)$

Wow! Finally! Hopefully this will convince you that the method of risk-neutral valuation is a bit more straight-forward!

## Digital Options

Today I’m going to talk about the valuation of another type of option, the digital (or binary) option. This can be seen as a bit of a case study, as I’ll present the option payoff and the analytical price and greeks under BS assumptions, and give add-ons to allow pricing with the MONTE CARLO pricer. I’ve also updated the ANALYTICAL pricer to calculate the price and greeks of these options.

Digital options are very straight-forward, they are written on an underlying S and expire at a particular date t, at which point digital calls pay $1 if S is greater than a certain strike K or$0 if it is below that, and digital puts pay the reverse – ie. the payoff is

$P_{\rm&space;dig\&space;call}&space;=&space;\Big\{&space;\&space;\begin{matrix}&space;\1&space;\quad&space;S&space;\geq&space;K\\&space;\0&space;\quad&space;S&space;<&space;K\end{matrix}$

We can calculate the price exactly in the BS approximation using the same method that I used to calculate vanilla option prices by risk-neutral valuation as follows

$C_{\rm&space;dig\&space;call}(0)&space;=&space;\delta(0,t)\&space;{\mathbb&space;E}[&space;C_{\rm&space;dig\&space;call}(t)&space;]$

where $\inline&space;C_{\rm&space;dig\&space;call}(t')$ is the price of the option at time $\inline&space;t'$, and we know that this must converge to the payoff as $\inline&space;t&space;\to&space;t'$, so $\inline&space;C_{\rm&space;dig\&space;call}(t)&space;=&space;P_{\rm&space;dig\&space;call}$

$=&space;\delta(0,t)\&space;\int^{\infty}_{-\infty}&space;P_{\rm&space;dig\&space;call}&space;\cdot&space;e^{-{1\over&space;2}x^2}&space;dx$

$\inline&space;P_{\rm&space;dig\&space;call}$ is zero if $\inline&space;S&space;=&space;S_0&space;e^{(r&space;-&space;{1\over&space;2}\sigma^2)t&space;+&space;\sigma&space;\sqrt{t}&space;x}&space;<&space;K$ which corresponds to $\inline&space;x&space;<&space;{\ln{K&space;\over&space;S_0}&space;-&space;(r-{1\over&space;2}\sigma^2)t&space;\over&space;\sigma&space;\sqrt{t}}&space;=&space;-d_2$

$=&space;\delta(0,t)\&space;\cdot&space;\1&space;\cdot&space;\int^{\infty}_{-d_2}&space;e^{-{1\over&space;2}x^2}&space;dx$

$=&space;\&space;\delta(0,t)\cdot&space;\Phi(d_2)$

where

$d_1&space;=&space;{\ln{S\over&space;K}+(r+{1\over&space;2}\sigma^2)t&space;\over&space;\sigma&space;\sqrt{t}}&space;\quad&space;;\quad&space;d_2&space;=&space;{\ln{S\over&space;K}+(r-{1\over&space;2}\sigma^2)t&space;\over&space;\sigma&space;\sqrt{t}}$

Since we have an analytical price, we can also calculate an expression for the GREEKS of this option by differentiating by the various parameters that appear in the price. Analytical expressions for a digital call’s greeks are:

$\Delta&space;=&space;{\partial&space;C&space;\over&space;\partial&space;S}&space;=&space;e^{-rt}\cdot&space;{\phi(d_2)\over&space;S\sigma&space;\sqrt{t}}$

$\nu&space;=&space;{\partial&space;C&space;\over&space;\partial&space;\sigma}&space;=&space;-e^{-rt}\cdot&space;{d_1&space;\&space;\phi(d_2)\over&space;\sigma}$

$\gamma&space;=&space;{\partial^2&space;C\over&space;\partial&space;S^2}&space;=&space;-e^{-rt}\cdot&space;{d_1&space;\&space;\phi(d_2)\over&space;S^2&space;\sigma^2&space;t}&space;=&space;-e^{-rt}\cdot&space;{d_1\&space;\phi(d_1)\over&space;S&space;K&space;\sigma^2&space;t}$

${\rm&space;Vanna}&space;=&space;{\partial^2&space;C&space;\over&space;\partial&space;S&space;\partial&space;\sigma}&space;=e^{-rt}\cdot&space;{\phi(d_2)\over&space;S&space;\sigma^2&space;\sqrt{t}}\Big(&space;d_1&space;d_2&space;-&space;1&space;\Big)$

${\rm&space;Volga}&space;=&space;{\partial^2&space;C&space;\over&space;\partial&space;\sigma^2}&space;=&space;e^{-rt}\cdot&space;{\phi(d_2)\over&space;\sigma^2}\cdot&space;\Big(&space;d_1&space;+&space;d_2&space;-&space;d_1^2&space;d_2&space;\Big)$

where

$\phi(d_1)&space;=&space;{1\over&space;\sqrt{2&space;\pi}}\&space;{e^{-{1\over&space;2}d_1^2}&space;}$

Holding a binary put and a binary call with the same strike is just the same as holding a zero-coupon bond, since we are guaranteed to receive \$1 wherever the spot ends up, so the price of a binary put must be

$e^{-rt}&space;=&space;e^{-rt}\cdot&space;\Phi(d_2)&space;+&space;C_{\rm&space;dig\&space;put}(t'=0)\quad&space;\quad&space;\quad&space;\quad&space;[1]$

$C_{\rm&space;dig\&space;put}(0)&space;=&space;e^{-rt}&space;\cdot&space;\Phi(-d_2)$

Moreover, differentiating equation [1] above shows that the greeks of a digital put are simply the negative of the greeks of a digital call with the same strike.

Graphs of these are shown for a typical binary option in the following graphs. Unlike vanilla options, these option prices aren’t monotonic in volatility: if they’re in-the-money, increasing vol will actually DECREASE the price since it makes them more likely to end out-of-the-money!

One final point on pricing, note that the payoff of a digital call is the negative of the derivative of a vanilla call payoff wrt. strike; and the payoff of a digital put is the positive of the derivative of a vanilla put payoff wrt. strike. This means that any binary greek can be calculated from the corresponding vanilla greek as follows

$\Omega_{\rm&space;dig\&space;call}&space;=&space;-{\partial&space;\Omega_{\rm&space;call}\over&space;\partial&space;K}$

$\Omega_{\rm&space;dig\&space;put}&space;=&space;{\partial&space;\Omega_{\rm&space;put}\over&space;\partial&space;K}$

where here $\inline&space;\Omega$ represents a general greek.

If you haven’t yet installed the MONTE CARLO pricer, you can find some instructions for doing so in a previous post. The following links give the header and source files for binary calls and puts which can be dropped in to the project in your C++ development environment

These will register the option types with the option factory and allow monte carlo pricing of the options (so far, all of the options in the factory also have analytical expressions, but I’ll soon present some options that can only be priced by Monte Carlo).

## Interview Quesions III

Today’s question will test some of the statistics and correlation I’ve discussed in the last couple of months. Assume throughout that  and  are jointly normally distributed such that

a) Calculate
b) Calculate

The first expectation is of a lognormal variate, and the second is of a lognormal variate conditional on some earlier value of the variate having been a particular value – these are very typical of the sorts of quantities that a quant deals with every day, so the solution will be quite instructive! Before reading the solution have a go at each one, the following posts may be useful: SDEs pt. 1, SDEs pt. 2, Results for Common Distributions

a) Here, we use the standard result for expectations

b) This one is a little tougher, so first of all I’ll discuss what it means and some possible plans of attack. We want to calculate the expectation of , given that takes a value of . Of course, if and were independent, this wouldn’t make any difference and the result would be the same. However, because they are correlated, the realised value of will have an effect on the distribution of .

To demonstrate this, I’ve plotted a few scatter-graphs illustrating the effect of specifying on , with and uncorrelated and then becoming increasing more correlated.

The simplest way of attempting this calculation is to use the result for jointly normal variates given in an earlier post, which says that if and have correlation , we can express in terms of and a new variate  which is uncorrelated with

so

Since the value of is already determined (ie. = ), I’ve separated this term out and the only thing I have to calculate is the expectation of the second term in . Since and are independent, we can calculate the expectation of the , which is the same process as before but featuring slightly more complicated pre-factors

We can check the limiting values of this – if  then and are independent [this is not a general result by the way – see wikipedia for example – but it IS true for jointly normally distributed variables], in this case  just as above. If , , which also makes sense since in this case , so fully determines the expectation of .

The more general way to solve this is to use the full 2D joint normal distribution as given in the previous post mentioned before,

This is the joint probability function of and , but it’s not quite what we need – the expectation we are trying to calculate is

So we need to calculate the conditional expectation of given , for which we need Bayes’ theorem

Putting this together, we have

This integral is left as an exercise to the reader, but it is very similar to those given above and should give the same answer as the previous expression for  after some simplification!