Saturday 20 April 2013

Jumping into Black-Scholes III: Calculating the Expected Value

We take off from where Jumping into Black-Scholes II: Know your contract and Asset left off,
in that we have established a probability distribution for our future asset price \(S(T)\). With this, let's take a look at the expected value of our options payoff. Let \(p(Z)\) be the pdf (probability density function) of \(Z\). Thus, using our prob-know-how, we have
\begin{eqnarray}
\mathbf{E}\left[  \max\left\{K-S_T,0\right\}\right] &= &
\mathbf{E}\left[  \max\left\{K-S_0 e^{(r-\sigma^2/2)T+\sigma\sqrt{T} Z},0\right\} \right] \nonumber \\
 &= &  \int_{-\infty}^{\infty} \max\left\{K-S_0 e^{(r-\sigma^2/2)T+\sigma\sqrt{T} Z},0\right\} p(Z) dZ \nonumber \\
&= & \int^{-d_2}_{- \infty} \left(K-S_0 e^{(r-\sigma^2/2)T+\sigma\sqrt{T} Z}\right) p(Z) dZ. \label{eq:BS1}
\end{eqnarray}

In this last step suddenly a \(d_2\) appeared. This constant \(-d_2\) has to be chosen so that for \(Z \leq -d_2\)  implies
\begin{equation} \label{findd2} \left(K-S_0 e^{(r-\sigma^2/2)T+\sqrt{T} Z}\right) \geq 0, \end{equation}
 so we could remove that infernal \(\max(\cdot)\) function. Well that's easy enough to calculate, by equating the above~(\ref{findd2}) to zero, our variable \(Z\) would be forced to equal \[d_2 = \frac{\ln(S_0/K) +(r-\sigma^2/2)T}{\sigma \sqrt{T}}.\]
I chose to call it \(d_2\) because that's what everyone else calls it. Why, out of the universe of greek letters and symbols ``they'' chose \(d_2\)? I haven't the foggiest idea, but to not be a notation anarchist, let's stick with the same symbol.


Turning back to~(\ref{eq:BS1}). Remembering that integration is a linear function, in that you can break up sums, throw constants on the "outside" of the integral so
\begin{eqnarray}
\int^{-d_2}_{- \infty} \left(K-S_0 e^{(r-\sigma^2/2)T+\sqrt{T} Z}\right) p(Z) dZ &= &
K\int^{-d_2}_{- \infty} p(Z)dZ -S_0e^{(r-\sigma^2/2)T} \int^{-d_2}_{- \infty} e^{\sigma\sqrt{T} Z} p(Z) dZ \nonumber \\
&= & \underbrace{K \Phi(-d_2)}_I -S_0e^{(r-\sigma^2/2)T} \underbrace{\int^{-d_2}_{- \infty} e^{\sigma\sqrt{T} Z} p(Z) dZ}_{II} \nonumber  \label{eq:BS2} .
\end{eqnarray}
In the I part, \(\Phi\) is the cumulative distribution function of the normal distribution. The last thing we need to deal with is the integral denoted by II. Scratching your noodle and/or looking at wiki, we see that the pdf of a standard normal distribution \(p(Z) = e^{-Z^2/2}\). With this we can solve the integral II, check out the following steps on how to do this
\begin{eqnarray*}
\int^{-d_2}_{- \infty} e^{\sigma\sqrt{T} Z} p(Z) dZ &= & \int^{d_2}_{- \infty} e^{\sigma\sqrt{T} Z} e^{-Z^2/2} dZ\\
&= & \int^{-d_2}_{- \infty} e^{-(Z -\sigma\sqrt{T})^2/2 +\sigma^2 T/2} dZ \quad [\mbox{Completing the square}] \\
&= & e^{\sigma^2 T/2} \int^{-d_2+\sigma\sqrt{T}}_{-\infty} e^{-y^2/2} dy  \quad [\mbox{Changing variables } y = Z-\sigma\sqrt{T}] \\
&= & e^{\sigma^2 T/2} \Phi\left(-d_2+\sigma\sqrt{T}\right) \quad [\mbox{Boom! We're done.}]
\end{eqnarray*}

Returning to~(\ref{eq:BS1}), we have reached the grand finale. The price of our put option is the expected value of its payoff, discounted in time by multiplying \(e^{-rT}\),
\[e^{-rT}\mathbf{E}\left[ \mbox{payoff}\right] =  K e^{-rT} \Phi(-d_2)+S_0 \Phi(-d_2+\sigma\sqrt{T}).\]
All these calculations may have hurt. But now you can price all sorts of options using a completely analogous argument. Naturally, if you work or are looking to work as a Quant, no one will ask you deduce the price of a Plain Vanilla option. But what happens when some Trader/Salesman/(Front desk Dude) decides, in a frenzy, to sell an option to a client that has a payoff that depends on two strikes \(K_1\) and \(K_2\) with
\[
\mbox{payoff} =
\begin{cases}
K_1 & \mbox{if }S_T \leq K_1,\\
S_T & \mbox{ if } K_1 \leq S_T \leq K_2, \\
0 & \mbox{ if } K_2 \leq S_T.
\end{cases}
\]
Well how much does that cost? Go on, aren't you the Quant, didn't we hire you for this? You can either blankly stare at your boss, jaw open as a sparkle of drool develops in the corner of your mouth, or you can sit down and confidently calculate the expectancy of this payoff. Get to it and post me your solution.

This approach works in general for options whose payoff depends on one time frame \(T\), known as European options, e.g, Basket Options, Binary Options, Quanto Options...etc. This approach can also  be adapted  when there are a handful of time frames. Things are not so simple when the payoff is time dependent, such as American Options. Then you really need to take the dive into stochastic calculus.

Jumping into Black-Scholes II: Know your contract and Asset


  Know your Contract

The first step in pricing these financial things, is to understand the contract in detail. Let S0 and ST be the price today and in T years of our underlying asset (a cow), respectively. Well we know S0 while ST must be a random variable.1 For now, let's play make believe and pretend we know what is ST, and figure out the payoff (How much you will pocket in the future) from our Plain Vanilla Option. Say we have the right to sell this asset in the future for the price K, in which case we say it is a put option. If at the maturity date T, ST is more then K then we will not bother exercising our right to sell the asset for K given that one can sell it for more then that on the market. Now if ST is less then K, selling it for K will earn you (K−ST) more then you could of sold it on the market. Thus you earn (K−ST) in this scenario. Therefore the payoff of our option is the function
payoff = max{K−ST,0}.
But we don't know ST. What can we do? We can calculate how much you would expect the payoff to be, which in math symbols is E[ payoff]. Furthermore, this payoff is money you will receive in the future, and money in time makes more money. Thus to know how much this is worth today, one must discount this expected cash quantity in time from the maturity date T to today using a reference market interest rate r. You can try to understand this r as the rate such that erT is how much one would earn by investing 1 in a risk-free investment after T years (note that it's greater than 1).  Using continuous time compounding 2, we can discount the expected payoff through time to give the price today which is
price = e−rT E[ payoff].
(1)
To calculate this expectancy, we need to know what is the distribution of the payoff, which in turn inherits it's distribution from the underlying asset ST. This basic setup is common to all financial contracts that exchange a quantity of money at a fixed future date.

  Guess your asset distribution

Yes, guess it. We don't know the real distribution of the asset3, we can only make an educated guess. But the situation is not a dire as it first may appear. We're not going to try and accurately guess the future value ST, instead, the focus is how much can the value S0 disperse through time. If S0 is so volatile that we have no idea what it will be in the future, then insurance based on this asset will be expensive. On the other hand, if we know, with a certain confidence, that S0 will change at most 2% in value from now to T, then such an insurance will be cheap.
Think about the possible future values of an asset. First, it must be positive4. This already rules out things like normal distributions, which stretch infinitely into the negative direction, in other words, way off. A simple random variable that only takes on positive values is eX, where X is a normal variable. This is a log-normal random variable, and it is completely determined by the mean and variance of the normal variable X.
And it just so happens, that by getting historical data of most assets prices, the lognormal distribution "seems" to fit. The x-axis below are different prices a unnamed asset had over a year. So roughly between 2 and 14 ching chings. The y-axis was how frequent this price appeared over the year. The red line, is the probability density function of the lognormal variable that was fit to the historical data.


This is the chosen distribution in the Black-Scholes setting. It is in this small step that I want you to take biggest leap of faith throughout the text. Notoriously, extreme events are more common in assets then the log-normal distribution would say, thus "real" distributions tend to have "fatter tails". Moving on. Let X(t)  ∼ N(tμ,tσ2), thus it's a normal variable with mean tμ and variance tσ2. Though we have defined X(t) for every t > 0, ultimately we are only interested in X(T), so for now, don't worry about how this thing evolves through time, just acknowledge that X(T), frozen in time T, is a normal variable.
The blatant guessing ends here, for now we can estimate μ and σ by either using historical data (How volatile were cow prices this time last year?) or using implicit market data, i.e., how much is this future volatility according to the aggregated opinion of everybody else? Let's say that through one of these methods, we are given σ.
All that is missing is the mean μ. Not to worry, another hypothesis injected by the Black-Scholes model is that there is no free meal, also known as the nonexistence of arbitrage opportunities. This translates into the fact that, the expected increase in value of our asset from now until T will be the same as the risk-free investment. In other words, investing S0 in the risk-free investment, we would earn S0erT. This must also be true of the expected value of buying S0 of our asset and clinging to it over time, in other words,
E[ eX(T)] = S0 erT.
(2)
From properties of the lognormal distribution5, we also know that
E[ eX(T)] =e(μ+ σ2/2)T.
(3)

Thus (2) and (3) must be equal, which in turn says that
μ = ln(S0) +(r−σ2/2)T,
so we have μ as a function of other things we know. Finally, there is a convenient way to re-write X(T) by calling upon a few properties of the normal distribution, namely
X(T) = ln(S0)+ (r−σ2/2)T + √TσZ
(4)
where Z  ∼ N(0,1) is the standard normal variable. If this last step made no sense, I suggest you take the expectancy and variance of both sides of (4) and check that they are equal. Remember, a normal variable is completely determined by it's expectancy and variance. This brings us to the conclusion of this section, simply that
ST = eX(T) = S0 e(r−σ2/2)T+√T Z,
is a reasonable choice to model our asset. Well sort of. With this the modelling phase comes to an end. All that remains now is to compute the option price (1) using some notions of probability.
[1] One of my least favorite names in mathematics, for it is not a variable nor is it random.
[2] Don't know it? See Continuous compounding. Not good enough? Persuade me to write something on this.
[3] This sentence hardly makes sense, is there such thing as a real distribution?.
[4] Well...you could own a megaton of milk that has gone sour. Remembering there is no use in crying over spilt milk, you pay someone to get rid of it, thus it has a ``negative value''. But let's rule out this case.
[5] Don't know it, wiki it..
-->

Friday 19 April 2013

Jumping into Black-Scholes I: Motivation

--> No Title
Have you vaguely heard of Black-Scholes and want a concise explanation? As in, this name reminds you of pricing options and not, for example, a shoal of color deficient fish? Do you know your basics of Probability? Then you have come to the right place. I'll demonstrate the common idea behind pricing an option using one of the simplest of option: The european options. First, let me motivate you.
Let's say you are a farmer and want to sell an asset (possibly a cow) in T number of years from now on a fixed date (known as the maturity date). Your target cow market is offshore, where it's all settled  in a currency foreign to the one you use to buy bread. You know the price changes from day to day, and depending on the price T years from now, it might be worth to keep the cows for milking instead.
Furthermore, often you see the paper and read about the volatility of foreign exchange and the financial sector as a whole. The stress starts to pile on. You drop your morning read of "Seeds and Hot Tractors" for "Financial Times". Questions start to emerge in your countryside head: How can I plan my future budget when I don't know how much my cow sale will pull in?

Fortunately, Black-Scholes comes to the rescue. You find out that you can fix this future sell price (known as the strike K) today, to a particular buyer. Better yet, you can buy the right to sell at the price K, and only exercise it if it's packing moo (worth it, in farmer tongue). How much does this right cost? This right is known as a Plain Vanilla option, and the mystery of how much this option should cost boggled many a mind for many a decade. Black and Scholes come along, and, to the horror of many an economist, use some continuous mathematics with probability to give a simple, transparent model to price this thing. For the farmer, it costs a small percentage of the price K.

Finally you can rest at ease. You know exactly how many bucks you could get for your moos T years from now. You drop Financial Times and it's preposterously pompous highly adjectivised text, and pick up something far more earthy, like "Big Udders". Your attention turns to further specializing yourself in your field (of knowledge and land) and planning the purchase of expensive machinery to up your productivity. Who said Finance was futile and not fertile?

After germinating purpose to the pricing of an option, let's bring in precision. Next, we carefully deduce the Black-Scholes price for this option. Though this model is no longer in use, instead one typically would use the Market price, i.e., aggregated opinion of everybody else, it still serves a purpose. It teaches us how to formally deduce prices of such financial stuff. It is also employed in pricing other complicated financial contracts (look-up Phoenix rainbow basket options), when more technically sophisticated models become intractable, and one must fall back on Black-Scholes framework.