Stochastic Processes and Their Applicati

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Stochastic Processes and their Applications to

Mathematical Finance

Sean Fanning Jay Parekh

August 17, 2004


Contents

1 Introduction 3

2 Financial Background 4
2.1 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.2 Stocks: the Underlying Asset . . . . . . . . . . . . . . . . 4
2.1.3 Payoffs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.4 Financial Leverage . . . . . . . . . . . . . . . . . . . . . . 6
2.1.5 Trading Strategies: Option Spreads . . . . . . . . . . . . . 7
2.2 Arbitrage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Stochastic Processes 10
3.1 Brownian Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1.2 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Geometric Brownian Motion . . . . . . . . . . . . . . . . . . . . . 11
3.2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.2 A Better Model . . . . . . . . . . . . . . . . . . . . . . . . 12

4 Stochastic Calculus 13
4.1 Stochastic Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 Ito’s Formula: A Stochastic Chain Rule . . . . . . . . . . . . . . . 16
4.2.1 Motivation by Taylor Expansion . . . . . . . . . . . . . . . 16
4.2.2 Formal Ito’s Formula . . . . . . . . . . . . . . . . . . . . . 16

5 The Black-Scholes Formula 17


5.1 Deriving the Black-Scholes Formula . . . . . . . . . . . . . . . . . 17
5.2 Feynman-Kac Theorem . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3 Exact Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1
6 Numerical Solutions 20
6.1 Monte Carlo Method . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.2 Euler-Maruyama Method . . . . . . . . . . . . . . . . . . . . . . . 21

7 Application: 3M Company 23
7.1 Estimating the Parameters . . . . . . . . . . . . . . . . . . . . . . 24
7.2 The Application: The Black-Scholes Price vs. The True Market
Price . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.2.2 Implied Volatility . . . . . . . . . . . . . . . . . . . . . . . 25

8 Appendix: Code 26
8.1 Payoff Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8.2 Brownian Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.3 Monte Carlo Simulation . . . . . . . . . . . . . . . . . . . . . . . 27
8.4 Euler-Maruyama Payoff . . . . . . . . . . . . . . . . . . . . . . . 27
8.5 Pricing European Call . . . . . . . . . . . . . . . . . . . . . . . . 28

9 References 30

2
Chapter 1

Introduction

Worldwide, there is an estimated $10,000 billion gross in the derivative market.


This paper provides a brief overview of options and the stochastic processes used
to model them. We assume the reader has a general understanding of probability,
calculus, and differential equations. We do not assume the reader has prior
knowledge about options, stochastic processes, or stochastic calculus.
We begin with a brief background on basic financial concepts, with an em-
phasis on options. We then cover Brownian Motion and Geometric Brownian
Motion, the latter of which we will use as a model for stock prices. It then be-
comes necessary to introduce stochastic calculus concepts. Using the stochastic
calculus, we procede to the Black-Scholes Formula, which is used to price options.
Then using the Feynman-Kac Theorem, we relate the Black-Scholes partial dif-
ferential equation to a stochastic diffential equation. Basic numerical methods
for solving the stochastic differential equation are introduced. MATLAB code for
the numerical methods is supplemented. We conclude with an application to the
real-world stock data of 3M Company.
We would like to thank Professors Jeffrey Cooper and Kyoung-Sook Moon for
their instruction, guidance, and time as well as the University of Maryland Math
Department for sponsoring this project.

3
Chapter 2

Financial Background

2.1 Options
2.1.1 Basics
An option is a contract that gives the purchaser the right to buy or sell a specified
number of shares of an underlying asset at a fixed price on a specified future date.
There is no obligation to exercise the option. In our case, we will discuss options
whose underlying asset is a publicly traded stock.
The price at which the buyer of an option agrees to buy or sell an option, if
he or she so chooses, is called the strike price. It is denoted as K. The time at
which the option expires is called expiry, denoted as T .
Options can be classified as either call or put options. A call option gives
the purchaser the right to buy a security. A put option gives the purchaser the
right to sell a security. Generally, one option corresponds to the purchase or sale
of 100 shares of stock.
There are many types of options. Two specific types are European and
American options. A European option gives the purchaser the right to buy or
sell stock only upon expiry of the option. Alternatively, an American option gives
the purchaser the right to buy or sell stock at any time between purchase and
expiry. In this paper, we will only consider European options.

2.1.2 Stocks: the Underlying Asset


A stock represents ownership in a company. By purchasing stock, an investor is
putting a claim on a company’s assets and earnings. A shareholder purchases
stock because he or she expects to receive compensation in the form of either
dividends1 or capital gains2 .
1
We will not take into account dividends when considering the pricing of options.
2
A capital gain is the profit resulting in an increase in stock price, between the time of
purchase and the time of sale.

4
Stocks are traded on an exchange or market, where buyers and sellers are
linked together. Stock prices are determined by supply and demand. If investors
feel strongly about a stock, they will demand more shares, causing the stock price
to increase.
Company earnings play a major role in investor demand. Many other factors,
like speculation, news events, and dividend payouts, also drive stock prices. How-
ever, there is no single parameter responsible for changes in stock price. Often,
it is the case that investors buy or sell stock based on “feelings.” Because of
this, there is an inherent randomness to the stock market. Mathematically, this
randomness can be addressed with stochastic processes.

2.1.3 Payoffs

Payoff for a European Call Option


20

18

16

14

12
Payoff

10

0
0 5 10 15 20 25 30 35 40
Stock Price

Figure 2.1: Payoff for a European call option with strike price $20

The payoff3 from purchasing a European call option can be represented by


the following function:
C = max(S(T ) − K, 0)
That is, if the stock price at time T is greater than the strike price, the option
will be exercised. The purchaser can buy a stock for K < S(T ) and immediately
sell it for S(T ), thus earning a payoff of S(T ) − K. If, however, the stock price
upon expiry is less than the strike price, the option will not be exercised. If it
3
It should be noted that there is a difference between payoff and profit. Profit takes into
account the transaction costs associated with buying an option. Payoff treats these transaction
costs as sunk costs.

5
were, the payoff would be negative; the investor chooses a zero payoff rather than
a negative payoff.
The payoff from a European put can be represented by the following function:

P = max(K − S(T ), 0)

If the stock price at time T is less than the strike price, the owner of a put will
exercise the option, agreeing to sell the specified shares at the price K. The
payoff from this transaction will be the difference of K − S(T ). Stock can be
bought for S(T ) and sold for K, where S(T ) < K. If S(T ) > K, then the put
will not be exercised; doing so would result in a negative payoff.
Payoff for a European Put Option
20

18

16

14

12
Payoff

10

0
0 5 10 15 20 25 30 35 40
Stock Price

Figure 2.2: Payoff for a Eurpean put option with strike price $20

2.1.4 Financial Leverage


By purchasing stock through the use of options, an investor is taking advantage of
financial leverage. By purchasing a stock’s option, there is more potential profit
and loss.
Consider the following example:
An investor purchases 100 call options with strike price $5. This gives the
investor the right to buy 10,000 shares of stock. Upon expiry, the price of the
stock is $10. The market value of the stock is $100,000. If the options are
exercised, they will cost the investor $50,000. Therefore, the investor will earn a
$50,000 profit.
Now suppose the stock price increases by 50% to $15. The market value of
the stock is now $150,000, but the cost of exercising the options is the same,

6
$50,000. The profit is now $100,000; a 50% increase in stock price leads to a
100% increase in profit.

2.1.5 Trading Strategies: Option Spreads


An option spread involves buying or selling two or more options on the same
stock. Spreads allow the investor to limit risk and profit under certain expected
conditions. We will describe a straddle, a strangle, and a butterfly spread.

Straddle
A long straddle involves buying a call and put option with the same strike price
on the same stock. A long straddle is ideal for a volatile stock; the investor profits
when the stock goes up or down drastically.
A short straddle involves selling a call and put with the same strike on the
same stock. It gives a profit only when the stock price does not change greatly.
A long straddle has a limited loss and an unlimited profit. A short straddle
has an ulimited loss and a limited profit.
Payoff for a Long Straddle
20

18

16

14

12
Payoff

10

0
0 5 10 15 20 25 30 35 40
Stock Price

Figure 2.3: Payoff for a long straddle

Strangle
A strangle involves the same strategy as a straddle, except that the strike prices
for the call and put are not equal. The strike for the call is greater than the strike
for the put. For a long strangle, a drastic change (either positive or negative) in
stock price results in a profit. However, the change in stock price must be greater
for a long strangle than for a long straddle.

7
Payoff for a Long Strangle
10

Payoff
5

0
0 5 10 15 20 25 30
Stock Price

Figure 2.4: Payoff for a long strangle

Butterfly Spread
A butterfly spread (using call options) involves purchasing four calls. One call is
purchased with a low strike price and another with a higher strike price. Then
two call options are sold with a strike price inbetween the long options.
The butterfly spread is profitable when the stock price does not change dras-
tically or remains close to the strike prices of the two short calls. In addition,
there is a limited loss to this strategy. The butterfly spread can also be formed
with put options (profitable with a volatile stock).
Payoff for a Butterfly Spread
10

6
Payoff

0
0 5 10 15 20 25 30 35 40
Stock Price

Figure 2.5: Payoff for a Butterfly Spread of Call Options

8
2.2 Arbitrage
In deriving a model for the pricing of options, an important assumption is made
regarding arbitrage. Arbitrage is the ability to buy an asset in one market and
instantaneously sell it in another market for a profit.
Arbitrage is possible when one of the following three conditions is not met:

1. The Law of One Price: any given asset must trade at the same price on any
market

2. Two assets with identical cash flows must trade at the same price

3. An asset with a known future price must trade at its risk-free discounted
price today

9
Chapter 3

Stochastic Processes

3.1 Brownian Motion


1

0.5

W(t)

−0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t

Figure 3.1: A random Brownian Motion along the time interval [0, 1]

3.1.1 Definition
Definition: Brownian Motion. A Brownian Motion W (t, ω) is a function
W : [0, ∞] × Ω → R, where Ω represents the set of outcomes in a probability
space, satisfying the following three conditions:

1. With probabilty 1, W (0) = 0 and the mapping t → W (t, ω) is almost surely


continuous

10
2. For 0 ≤ s < t ≤ T , W (t) − W (s) ∼ N (0, t − s) where N is the normal
Gaussian distribution, with mean 0 and variance t − s.

3. For 0 ≤ s < t < u < v ≤ T , the increments W (t) − W (s) and W (v) − W (u)
are independent for all s, t, u, v ∈ [0, T ]

3.1.2 History
The long studied model known as Brownian Motion, also known as a Wiener
Process, is named after the English botanist Robert Brown. In 1827, Brown
described the unusual motion exhibited by a small particle totally immersed in a
liquid or a gas.
In 1900, the French mathemetician Bachelier independently introduced Brow-
nian motion to model the price movements of stocks and commodities.
In 1905, Albert Einstein was able to explain this motion mathematically. He
assumed that the immersed particle was continuously bombarded by molecules
of the surrounding medium.
In a series of papers originating in 1918, Norbert Wiener provided a mathe-
matically concise definition and other mathematical properties of Brownian Mo-
tion.

3.2 Geometric Brownian Motion


3.2.1 Definition
Definition: Geometric Brownian Motion. A Geometric Brownian Motion is
an almost surely continuous time stochastic process S(t) that solves the stochastic
differential equation
dS(t) = µSdt + σSdW (t)
where dW (t) is a Brownian Motion and the constants µ and σ represent drift and
volatility, respectively.
The equation has solution
1 2 )t+σW (t)
S(t) = S(0)e(µ− 2 σ

A variant of Brownian Motion, Geometric Brownian Motion (GBM) is log-


normally distributed; it takes on only nonnegative values. The random variable
S(t)
ln( S(0) ) is normally distributed with mean (µ − 12 σ 2 )t and variance σ 2 t. Future
changes in value are independent of past changes in value.

11
3.2.2 A Better Model
When using a Brownian Motion to describe stock prices, two major flaws arise.
First, a Brownian Motion could become negative. Stock prices, however, are never
negative. Second, a Brownian Motion assumes the price difference, regardless of
the initial price, follows the same normal distribution. In the case of stocks, the
probability that a stock would drop from say $100 to $90 (a 10% change) is not
the same as if the stock were to drop from $50 to $40 (a 20% change). The
Brownian Motion model assigns these two events equal probability.
Because a Geometric Brownian Motion is nonnegative, it provides for a more
realistic model of stock prices. Also, the GBM model considers the ratio of stock
prices to have the same normal distribution. Therefore, the percentage change
in price as opposed to the absolute change in price is modelled.

12
Chapter 4

Stochastic Calculus

4.1 Stochastic Integrals


4.1.1 Introduction
A bounded, smooth function f : [a, b] → R is said to be integrable provided that
there is exactly one number A such that L(f, P ) ≤ A ≤ U (f, P ), where P is a
partition of the interval [a, b], L(f, P ) is the lower Darboux sum, and U (f, P ) is
the upper Darboux sum. Rb
This defines the integral a f ≡ A, which can be approximated by using
Riemann sums.

N
X −1 Z b
f (tn )(tn+1 − tn ) ≈ A = f (4.1)
n=0 a
NX−1 Z b
tn+1 + tn
f( )(tn+1 − tn ) ≈ A = f (4.2)
n=0
2 a

The sum (4.1) is the lefthand sum and the sum (4.2) is the midpoint sum. As
Rb
the number of partitions goes to infinity, both sums approximate a f as A.
RT
Now consider the case of a stochastic function W (t) and its integral 0 W (t)dW (t).
Rb
This stochastic integral can be approximated in the same manner a f was ap-
proximated by (4.1) and (4.2). However, the approximations resulting from a
lefthand sum and a midpoint sum on a stochastic function are not equivalent;
the lefthand sum results in the Ito Integral while the midpoint sum results in
the Stratonovich Integral. We will concern ourselves with the Ito Integral.

13
4.1.2 Example
Consider the stochastic integral
Z T
W (t)dW (t). (4.3)
0

Also, recall from the definition of a Brownian Motion that

E[W (t) − W (s)] = 0


E[(W (t) − W (s))2 ] = t − s

for all t > s ∈ [0, T ].

Ito Integral
The Ito Integral of (4.3) is the limiting case of the lefthand sum
N
X −1
Sn = W (tn )(W (tn+1 ) − W (tn )). (4.4)
n=0

The Riemann sum (4.4) can be rewritten as


N −1 N −1
1X 2 2 1X
Sn = (W (tn+1 ) − W (tn ) ) − (W (tn+1 ) − W (tn ))2 . (4.5)
2 n=0 2 n=0

The first sum telescopes to W (T )2 − W (0)2 = W (T )2 , since W (0) = 0 from


the definition of Brownian Motion. Now (4.5) becomes
N −1
1 2 1X
Sn = W (T ) − (W (tn+1 ) − W (tn ))2 . (4.6)
2 2 n=0

Let us now focus on the second sum, the quadratic variation:


N
X −1
QV = (W (tn+1 ) − W (tn ))2 .
n=0

For any partition, the expected value


N
X −1 N
X −1
E[QV ] = E[(W (tn+1 ) − W (tn ))2 ] = (tn+1 − tn )
n=0 n=0
= T

14
and
1 1
E[Sn ] = (E[W (T )2 ] − T ) = (T − T )
2 2
= 0.
It can be shown that the sum QV tends to T , in the L(Ω)2 sense. If t →
W (t, ω) were a smooth function, we would have
N
X −1
QV = W (θn )2 (tn+1 − tn ) ≤ C∆tT,
n=0

which would tend to zero as ∆t → 0.


In conclusion, in L(Ω)2 , the Ito Integral
Z T
1
W (t)dW (t) = lim Sn = (W (T )2 − T )
0 ∆t→0 2
and Z T
E[ W (t)dW (t)] = lim E[Sn ] = 0.
0 ∆t→0

OPTIONAL: The Stratonovich Integral


Let us now see what happens when the integral (4.3) is approximated by the
midpoint sum
NX−1
W (tn+1 ) + W (tn )
( )(W (tn+1 ) − W (tn )). (4.7)
n=0
2
(4.7) can be rewritten as
N −1
1X 1
(W (tn+1 )2 − W (tn )2 ) = W (T )2 (4.8)
2 n=0 2

The expected value of (4.8) is


1 T
E[W (T )2 ] = .
2 2
Therefore, in L2 (Ω),
Z T
1
W (t)dW (t) = W (T )2
0 2
with
Z T
T
E[ W (t)dW (t)] =
0 2
RT
when using the midpoint sum. This is 0
W (t)dW (t) in the Stratonovich sense.

15
4.2 Ito’s Formula: A Stochastic Chain Rule
4.2.1 Motivation by Taylor Expansion
Given a function f (t, S(t)), where S(t) solves the stochastic differential equation
dS = Sµdt + SσdW , we must find a formula for determining df .

Let us apply a Taylor Expansion 1 to f (t, S(t)), disregarding the fact that S(t)
is stochastic:
1 1
df = ft dt + fS dS + ftt dt2 + fSS dS 2 + ftS dtdS + . . .
2 2
where . . . represents higher order terms.

Proposition 1. dS → dt as dt → 0 in the L2 sense
Making use of this proposition results in
√ 1 1
df = ft dt + fS dt + ftt dt2 + fSS dt + ftS dt3/2 + . . .
2 2
Because dt → 0, dt2 and dt3/2 can be eliminated: a number less than the absolute
value of one raised to an exponent greater than one is smaller than the original
number (nα < n, for n < |1| and α > 1). This also means that the higher order
terms can be eliminated; they all contain a dtα term. Therefore,

1
df = ft dt + fS dS + fSS dt
2
1
= ft dt + fS (Sµdt + SσdW ) + fSS dt
2
1
= (ft + SµfS + fSS )dt + SσfS dW (4.9)
2
(4.9) is Ito’s Formula applied to f (t, S(t)).

4.2.2 Formal Ito’s Formula


Ito’s Formula. Let X(t) solve the stochastic differential equation
dX(t) = a(X, t)dt + b(X, t)dW (t)
and let f (X(t), t) be C 2 .
Then
1
df (X(t), t) = (a(X, t)fX + ft + b2 (X, t)fXX )dt + b(X, t)fX dW (t)
2
2 2
∂f
1
NOTATION: ∂t ≡ ft , ∂∂t2f ≡ ftt , ∂t∂S
∂ f
≡ ftS , etc . . .

16
Chapter 5

The Black-Scholes Formula

5.1 Deriving the Black-Scholes Formula


Let f (t, S(t)) represent the value of a European call option on a stock S.
Let S follow the stochastic differential equation

dS = Sµdt + SσdW

with constants µ equal to the drift and σ equal to the volatility. dW follows a
Brownian Motion.
Our goal is to construct a portfolio that replicates a European call option. If
we can price the replicating portfolio, then we can also price the option.
To construct the replicating portfolio Π, consider a short position in the call
option, −f , ∆(t) shares of stock S, and β(t) shares of a risk-free bond B. There-
fore,
Π = −f + ∆(t)S + β(t)B (5.1)
ASSUMPTIONS:

• f (t, S(t)) represents the value of a European call option.

• S follows a Geometric Brownian Motion. That is, dS = Sµdt + SσdW ,


where W is a Brownian Motion and the constants µ and σ represent drift
and volatility, respectively.

• The risk-free bond B grows at the rate dB = rBdt, where r is the risk-free
interest rate.

• There is no arbitrage.

• The portfolio is self-financing.

17
Now differentiating (5.1) with respect to t gives
dΠ = −df + ∆(t)dS + Sd∆(t) + β(t)dB + Bdβ(t) + d∆dS (5.2)
The self-financing assumption says that changes in the value of the portfolio
Π are not caused by changes in the number of shares or bonds. Rather, changes
in the value of Π are caused only by changes in the value of S, r, and f . This
means that (5.2) can be re-written as
dΠ = −df + ∆(t)dS + β(t)dB (5.3)
Now applying Ito’s Formula to f (t, S(t)) gives
1
df = (ft + µSfS + σ 2 S 2 fSS )dt + σSfS dW
2
Substituting this result and dS and dB into (5.3) gives
1
dΠ = (−ft −µSfS − σ 2 S 2 fSS +∆(t)µS +β(t)rB)dt+(∆(t)σS −σSfS )dW (5.4)
2
Choose ∆(t) = fS . This eliminates the stochastic element, dW . Now (5.4)
becomes
1
dΠ = (−ft − µSfS − σ 2 S 2 fSS + µSfS + β(t)rB)dt (5.5)
2
Since there is no arbitrage, the portfolio must grow by the rate of dΠ =
rΠdt = r(−f + fS + β(t)B)dt. Substituting into (5.5) yields
1
ft + σ 2 S 2 fSS + rSfS − rf = 0 (5.6)
2
(5.6) is the BLACK-SCHOLES PDE, with final condition f (T, S) = (S −K)+

5.2 Feynman-Kac Theorem


Feynman-Kac Theorem. Let a, b, and g be smooth, bounded functions. Let X
solve the stochastic differential equation
dX(t) = a(t, X(t))dt + b(t, X(t))dW (t)
and let
u(x, t) = E[g(X(T ))|X(t) = x]
Then u is a solution of
1
ut + aux + b2 uxx = 0
2
u(x, T ) = g(x)
for t < T .

18
The Feynman-Kac Theorem provides a way of relating the Black-Scholes par-
tial differential equation with a stochastic differential equation. The SDE is
independent of the drift parameter.
The PDE
1
ft + σ 2 S 2 fSS + rSfS − rf = 0 (5.7)
2
with final condition f (T, S) = max(S(T ) − K, 0) and the SDE

e
f (t, S(t)) e ) − K, 0)]
= E[e−r(T −t) max(S(T (5.8)
with
dSe = rSdt
e + σ SdW
e

are equivalent. Finite difference or finite element methods can be used with
(5.7), while (5.8) is ideal for the Monte Carlo Simulation.

5.3 Exact Solution


Exact Solution. The Black-Scholes PDE (5.7) has exact solution

C(S, t) = SΦ(ω1 ) − Ke−r(T −t) Φ(ω2 )

where
S 1 2
ln( K ) + (r + 2
σ )(T − t)
ω1 = √
σ T −t
S 1 2
ln( K ) + (r − 2
σ )(T − t)
ω2 = √
σ T −t
and Φ represents the Gaussian CDF.

5.4 History
In 1973, Myron Scholes and Fisher Black derived the Black-Scholes formula.
Their work was built upon the earlier research of Paul Samuelson and Robert
Merton. The Black-Scholes formula revolutionized the trading of options. It gives
investors a mathematical approach to pricing options, as opposed to guessing.
It assumes that the stock or underlying asset follows a random walk with
constant drift and volatility, there are no arbitrage opportunities, stock trading
is continuous, there are no dividends, there are no transaction costs, stocks are
perfectly divisible (can buy a fraction of a stock), and the stock can be sold short.
Not all of these assumptions are realistic, especially the assumption that a stock
has constant volatility. However, Black-Scholes is still useful.

19
Chapter 6

Numerical Solutions

6.1 Monte Carlo Method


6.1.1 Overview
In mathematics, generally speaking, a problem is given, a formulation of the
problem is made, then solved analytically or numerically. In a Monte Carlo
simulation the opposite occurs. A mathematical problem is given and then solved
by constructing a game of chance that in some way leads to an approximate
solution to the given problem. We have previously stated that the expected
value of the solution of the SDE stock model is equivalent to the solution of the
Black-Scholes PDE, by the Feynman-Kac Theorem. A Monte Carlo Simulation
can be used with this SDE model.
In many of the problems where the Monte Carlo simulation is applicable, there
is already an element of chance built into the system. In our case, the element of
chance is the volatility of the movement of the stock price. The various possibilites
of Monte Carlo simulations began to be studied in the 1940s.

20
6.1.2 Example
The following figure is an example, using MATLAB, of a Monte Carlo Simulation:
4
mean of 1000 paths
5 individual paths

3.5

2.5

U(t)
2

1.5

0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t

Figure 6.1: Monte Carlo Simulation along 1000 discretized Brownian paths of
GBM

In this example we evaluate the stock model function U (t, S(t)) along 1000
discretized Brownian paths. The expected value of this solution can be seen as
the center line with a smooth appearence. Notice that although U (t, S(t)) is non-
smooth along the individual paths, the expected value of the solution appears to
be smooth. This can be established by noting that the properties of the Brownian
motion require the expected value of S(t) to be zero. Therefore, the expected
value of U (t, S(t)) is solely dependent on the drift and not the volatility. In this
example, the expected value turns out to be e9/8t .

6.2 Euler-Maruyama Method


The Euler-Maruyama Method is an extension of the Euler Method. The Euler
Method, also known as the tangent line method, originated in 1758. It computes
an approximation to a deterministic differential equation along a set of time
values. The Euler-Maruyama Method computes an approximation to stochastic
differential equations. It can be stated as follows:
Z t Z t
X(t) = X0 + f (X(S))dS + g(X(S))dW (S)
0 0
for 0 ≤ t ≤ T .

21
Let us take a look at Figure 6.2. The black line represents the true solution
and the x-line represents the Euler-Maruyama approximated solution. The true
solution and Euler-Maruyama approximated solution were computed along 1000
discretized Brownian paths for different initial values, ranging from 70 to 95. The
strike price (K) was set at 82.96, the interest rate (r) at 10.8%, the time (T ) at
.2 years, and volatility (σ) at .1195.
Price of European Call Option
9

6
Expected Value

0
70 75 80 85 90 95
Initial Value S(0)

Figure 6.2: Euler-Maruyama Approximated Payoff Diagram for a European Call

Notice that the graph in Figure 6.2 resembles the call payoff graph shown in
Figure 6.2. The computed graph’s curve begins to rise slightly before the strike
price of 82.96, which differs from the previously shown payoff graph. This differ-
ence can be explained by the fact that our computed graph is for the expected
value of the payoff at the initial time, while the previously shown payoff graph
was drawn at the expiration date. Given any set of initial values (time, interest
rate, strike price and volatility), our code can compute the expected value or
price of the option under the set of Black-Scholes assumptions.

22
Chapter 7

Application: 3M Company

3M COMPANY
100

90

80

70

60

50

40

30
0 200 400 600 800 1000 1200 1400

Figure 7.1: 3M Comany: 5 Year Chart of Daily Closing Prices

As a real world application, we have taken five years of historical data from
the 3M Company (NYSE symbol MMM) to estimate the parameters for the
stochastic Black-Scholes model. Using numerical methods, we wanted to see how
close our model predicted the price of an option with respect to the real option.
The model used is the result of the Feynman-Kac Theorem (5.8), as applied
to the Black-Scholes deterministic PDE.

f (t, S(t)) = E[e−r(T −t) max(S(T ) − K, 0)]


dS = Srdt + SσdW

23
7.1 Estimating the Parameters
For our model, which is independent of drift µ, it was only necessary to estimate
the volatility σ. However, even though it was unnecessary, we estimated µ.
To estimate the parameters, five years of historical daily closing prices were
collected for MMM. Next, the daily percentage change in stock price was com-
puted. This was done in the following manner:
Si
∆i = ln( )
Si−1
where Si is the closing price on day i and ∆i is the daily change in closing price.
Next, the sample standard deviation of the ∆i terms was calculated:
v
u N
u 1 X
Sdaily = t (∆ − ∆i )2
N − 1 i=1
This gives an estimate for the daily volatility, but we are interested in the yearly

volatility. Since there are 252 trading days in a year, multiplying Sdaily by 252
will give us our yearly volatility estimate:
v
u N
u 252 X
b=
σ t (∆ − ∆i )2
N − 1 i=1

To estimate µ, we can calculate the sample mean and multiply by 252:


N
1 X
∆i
N 1
The risk-free rate r can be approximated by the interest rate for 3 month
Treasury Bonds.
Using our historical data, our calculations resulted in the following estimates:
• r̂ = .108
• µ̂ = 0.007528
• σ̂ = .1195

7.2 The Application: The Black-Scholes Price


vs. The True Market Price
7.2.1 Introduction
In reality, the Black-Scholes model is based upon several unrealistic assumptions.
These assumptions include continuity of stock price, no transaction costs, and

24
most importantly, constant volatility.
In the real market, stocks often change in their volatilities. For example,
the airline industry is more volatile when gas prices increase. A well-known
discrepency arises between the market price of options and the computed Black-
Scholes’ price. This discrepency can be better accounted for when using a stochas-
tic volatility model. It is important to note that there is no generally accepted
stochastic volatility model.

7.2.2 Implied Volatility


Implied volatility is the volatility that when substituted into the Black-Scholes
Formula produces the actual market price of an option. In Figure 7.2, the com-
puted Black-Scholes price can be seen as the straight black line, the true market
price as the “x-line”, and the implied volatility as the dashed-line.
Price and Implied Volatility of a European Call Option
18

16

14

12
Price or Implied Volatility

10

0
70 75 80 85 90 95
Strike Price

Figure 7.2: Implied Volatility

Notice that the implied volatility is not constant; it increases the further away
from the strike price (82.96). This “smile-effect” gives rise to what is known as
the Smile Curve. Intuitively, a stock with a higher volatility is harder to predict.
Therefore, the stock’s option requires a higher premium due to the increased
stock volatility.

25
Chapter 8

Appendix: Code

8.1 Payoff Diagrams


clear all;
close all; syms k k_0 d k_01; k = 20; k_0=10; k_2=30; d=.01;

%EURO CALL
s=0:d:k; y=0; AXIS([0 40 -5 40]); AXIS manual; plot(s,y, ’k*’) hold
on; s=k:d:2*k; y=s-k; plot(s,y,’k*’) title(’Payoff for a European
Call Option’); hold off; pause;

%EURO PUT
s=0:d:k; y=k-s; plot(s,y,’k*’); hold on; s=k:d:2*k; y=0;
plot(s,y,’k*’); title(’Payoff for a European Put Option’); hold off;
pause;

%EURO STRADDLE
s=0:d:k; y=k-s; plot(s,y,’k*’); hold on; s=k:d:2*k; y=s-k;
plot(s,y,’k*’); title(’Payoff for a Long Straddle’); hold off;
pause;

%EURO STRANGLE
s=0:d:k_0; y=k_0-s; plot(s,y, ’k*’); hold on; s=k_0:d:k; y=0;
plot(s,y, ’k*’); s=k:d:k+k_0; y=s-k; plot(s,y,’k*’); hold off;
title(’Payoff for a Long Strangle’); pause;

%BUTTERFLY SPREAD
s=0:d:k_0; y=0; plot(s,y,’k*’); hold on; s=k_0:d:k; y=s-k_0;
plot(s,y,’k*’); s=k:d:k_2; y=s-k_0-2*s+2*k; plot(s,y,’k*’);
s=k_2:d:k_2+k_0; y=0; plot(s,y, ’k*’); title(’Payoff for a Butterfly
Spread’);

26
8.2 Brownian Motion
%BPATH2 Brownian path simulation: vectorized

randn(’state’,500) % set the state of randn


T = 1; N = 500; dt = T/N;

dW = sqrt(dt)*randn(1,N); % increments
W = cumsum(dW); % cumulative sum

plot([0:dt:T],[0,W], ’k-’) % plot W against t


xlabel(’t’,’FontSize’,16) ylabel(’W(t)’,’FontSize’,16,’Rotation’,0)

8.3 Monte Carlo Simulation


%BPATH3 Function along a Brownian path

randn(’state’,0) % set the state of randn


T = 1; N = 500; dt = T/N; t = [dt:dt:1];

M = 1000; % M paths simultaneously


dW = sqrt(dt)*randn(M,N); % increments
W = cumsum(dW,2); % cumulative sum
U = exp(repmat(t,[M 1]) + 0.5*W); Umean = mean(U);
plot([0,t],[1,Umean],’k x’), hold on % plot mean over M paths
plot([0,t],[ones(5,1),U(1:5,:)],’k-’), hold off % plot 5 individual paths
xlabel(’t’,’FontSize’,16)
ylabel(’U(t)’,’FontSize’,16,’Rotation’,0,’HorizontalAlignment’,’right’)
legend(’mean of 1000 paths’,’5 individual paths’,2)

averr = norm((Umean - exp(9*t/8)),’inf’) % sample error

8.4 Euler-Maruyama Payoff


% Sean and Jay
% Expected Value of a European Call Option
% makes the graph that looks like the call payoff graph

randn(’state’,100) % set seed for psuedorandom number generator

% problem parameters
vol = 0.1195; r = 0.108; XzeroStart = 65; K = 82.96; M = 1000;
T = .2; N = 2^8; dt = T/N; t = [dt:dt:T]; R = 4; Dt = R*dt; L =
N/R;

for i = 1:11 %loop runs throough different initial values


Xzero = XzeroStart + 2.5*(i-1); %increment inital value

dW = sqrt(dt)*randn(M,N); % Brownian increment


W = cumsum(dW,2); % discretized Brownian path

27
Xtrue = Xzero*exp((r-0.5*vol^2)*repmat(t, [M 1])+vol*W);
XendTrue = Xtrue(1:M,N)-K; % true solution based off Black-Scholes
Gtrue = exp(-r*T)*max(XendTrue,0); % defines funtion max(X-K, 0)
MeanGtrue(i) = mean(Gtrue); % expected value of G

Xem = zeros(M,L);
Xtemp = repmat(Xzero, [M 1]);
for j = 1:L
Winc = sum(dW(1:M,R*(j-1)+1:R*j),2);
Xtemp = Xtemp + r*repmat(Dt, [M 1]).*Xtemp + vol*Winc.*Xtemp;
Xem(1:M,j) = Xtemp;
end
XendEm = Xem(1:M,L)-K;
GEm = exp(-r*T)*max(XendEm, 0);
MeanGEm(i) = mean(GEm);
end

plot([70:2.5:95],MeanGtrue, ’k-’), hold on plot([70:2.5:95],MeanGEm,


’k--*’), hold off title(’Price of European Call Option’);
xlabel(’Initial Value S(0)’); ylabel(’Expected Value’);

8.5 Pricing European Call


% Sean and Jay
% Expected Value of a European Call Option

randn(’state’,300) % set seed for psuedorandom number generator

% problem parameters
vol = 0.1195; r = 0.108; Xzero = 82.96; KStart = 70; M = 10^4; N =
2^8;
T = .2; %8/3/04 thru 10/15/04 = 73/365
dt = T/N; t = [dt:dt:T];
dW = sqrt(dt)*randn(M,N); % Brownian increment
W = cumsum(dW,2); % discretized Brownian path

%true market 3M option data taken 8/03/04


Cobs = [12.5 9 4.6 2 .55 .2]; plot([70:5:95],Cobs, ’k--*’), hold on

%initialized variables
Ivol = [0 0 0 0 0 0]; min = [100 100 100 100 100 100]; ivolatility =
[0 0 0 0 0 0]; MeanGtrue = [0 0 0 0 0 0]; diff = [0 0 0 0 0 0];

for i = 1:6 %loop runs through different strike values


K = KStart + 5*(i-1); %increment strike value

28
Xtrue = Xzero*exp((r-0.5*vol^2)*repmat(t, [M 1])+vol*W);
XendTrue = Xtrue(1:M,N)-K; % true solution based off Black-Scholes
Gtrue = exp(-r*T)*max(XendTrue,0); % defines funtion max(X-K, 0)
MeanGtrue(i) = mean(Gtrue); % expected value of G

diff(i) = MeanGtrue(i) - Cobs(i);

count = 0;
value = MeanGtrue(i);
done = 1;
temp = 100;
while done == 1
count = count + 1;
Ivol(i) = Ivol(i) + .01;
Itrue = Xzero*exp((r-0.5*Ivol(i)^2)*repmat(t, [M 1])+Ivol(i)*W);
IendTrue = Itrue(1:M,N)-K; % true solution based off Black-Scholes
Ihold = exp(-r*T)*max(IendTrue,0); % defines funtion max(X-K, 0)
value = mean(Ihold); % expected value of G
temp = abs(value - Cobs(i));
if temp < min(i)
min(i) = temp;
ivolatility(i) = count;
else
done = 1; %as vol increases so does the mean
%therefore if not closer to true value heading further from true value
end
if count == 100
done = 0;
end
end
end

diff min ivolatility

plot([70:5:95],ivolatility,’k-.’) plot([70:5:95],MeanGtrue, ’k’),


hold off title(’Price and Implied Volatility of a European Call
Option’); xlabel(’Strike Price’); ylabel(’Price or Implied
Volatility’);

29
Chapter 9

References

1. Fitzpatrick, Patrick M., Advanced Calculus: A Course in Mathematical


Analysis, PWS Publishing Company, 1996.

2. Goodman, J., Moon, K.S., Szepessy, A., Tempone, R., Zouraris, G., Stochas-
tic and Partial Differential Equations with Adapted Numerics, 2004.

3. Higham, Desmond J., An Algorithmic Introduction to Numerical Simula-


tion of Stochastic Differential Equations, Society for Industrial and Applied
Mathematics, 2003.

4. Hull, John C., Options, Futures, and Other Derivatives: Fifth Edition,
Pearson Education, Inc., 2003.

5. Ross, Sheldon M., An Elementary Introduction to Mathematical Finance:


Options and Other Topics Second Edition, Cambridge University Press,
2003.

30

You might also like