+ All Categories
Home > Documents > Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore...

Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore...

Date post: 23-Dec-2015
Category:
Upload: martha-davidson
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
26
Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods
Transcript
Page 1: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Hedge with an EdgeAn Introduction to the Mathematics of Finance

Riaz Ahmed & Adnan KhanLahore Uviersity of Management Sciences

Monte Carlo Methods

Page 2: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Topics

• Simulating Bernoulli Random Variable • Generating Random Variables – Inverse Transform Method– Box Muller Method– Rejection Method

• Simulate a 1-D random Walk– Calculate the mean– Calculate the Variance

• Simulating Brownian Motion • Geometric Brownian Motion• Arithmetic Brownian Motion• Variance Reduction Techniques

Page 3: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulating a Binomially Distributed Random Variable

• Note sum of Bernoulli trials is a binomial

• Let X i be a Bernoulli trial with probability ‘p’ of success

• is binomial ‘n’, ‘p’

Page 4: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Some Properties

• Distribution of successes in trials

• Expected Value

• Variance

Page 5: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulation of Binomial

• Generating Bernoulli

• Binomial as the sum of Bernoulli

• Monte Carlo Simulation

• Numerical vs. Exact Mean and Variance

Page 6: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulation of Binomial

0 1 2 3 4 5 6 7 8 9 100

5

10

15

20

25

hist

hist

Page 7: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Continuous Random Variables

• Inverse Transform Method– Suppose a random variable has cdf ‘F(x)’– Then Y=F-1(U) also had the same cdf

• Generating the exponential

• Generate the exponential, compare with exact cdf

• Generate a r.v. with cdf

Page 8: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulating the Exponential

0

200

400

600

800

1000

1200

1400

Page 9: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulating Normal using Inverse Transform

• Cannot get a closed form in terms of elementary functions

• Excel has built in command normsinv()

• Use normsinv(rand())

Page 10: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulation of Normal

-3-2.76

-2.52-2.28

-2.04-1.8

-1.56-1.32

-1.08

-0.8399999999...

-0.5999999999...

-0.3599999999...

-0.1199999999...

0.1200000000...

0.3600000000...

0.6000000000...

0.8400000000...1.08

1.321.56 1.8

2.042.28

2.522.76 3

-100

0

100

200

300

400

500

600

Series1Series2Series3

Page 11: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Rejection Method

• Simulate &

• To Simulate look @

• If accept, else reject

• To Simulate N(0,1) let

• If set

Page 12: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Box Muller Method• Recall the cdf for the standard normal is

• We saw one way was to invert this• Another technique is to generate

• Then and where

Page 13: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulation

0

100

200

300

400

500

600

700

800

Page 14: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Weiner Process

• W(t) CT-CS process is a Weiner Process if W(t) depends continuously on t and the following holda)b) are independentc)

Page 15: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulating Brownian Motion

• Initialize at 0 as W(0)=0

• Simulate Weiner Increments according to

• The Weiner Process then follows

Page 16: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulation

00.15 0.3

0.45 0.60.75 0.9

1.05 1.21.35 1.5

1.65 1.81.95 2.1

2.25 2.42.55 2.7

2.85 33.15 3.3

3.45 3.6

3.74999999999999

3.89999999999999

4.04999999999999

4.19999999999999

4.34999999999999

4.49999999999999

4.64999999999999

-0.7

-0.6

-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

Weiner Process

Weiner Process

Tim

e

Page 17: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulation

00.15 0.3

0.45 0.60.75 0.9

1.05 1.21.35 1.5

1.65 1.81.95 2.1

2.25 2.42.55 2.7

2.85 33.15 3.3

3.45 3.6

3.74999999999999

3.89999999999999

4.04999999999999

4.19999999999999

4.34999999999999

4.49999999999999

4.64999999999999

-0.4

-0.2

0

0.2

0.4

0.6

0.8

Weiner Process 1Weiner Process 2Weiner Process 3Weiner Process 4Weiner Process 5

Tim

e

Page 18: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Stock Price Model

• Modeled by Geometric Brownian Motion

• Note

• To simulate use the ‘Euler Scheme’

Page 19: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulating GBM

00.15 0.3

0.45 0.60.75 0.9

1.05 1.21.35 1.5

1.65 1.81.95 2.1

2.25 2.42.55 2.7

2.85 33.15 3.3

3.45 3.6

3.74999999999999

3.89999999999999

4.04999999999999

4.19999999999999

4.34999999999999

4.49999999999999

4.649999999999990

1

2

3

4

5

6

GBM1GBM2Mean

Page 20: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulating GBM

00.15 0.3

0.45 0.60.75 0.9

1.05 1.21.35 1.5

1.65 1.81.95 2.1

2.25 2.42.55 2.7

2.85 33.15 3.3

3.45 3.6

3.74999999999999

3.89999999999999

4.04999999999999

4.19999999999999

4.34999999999999

4.49999999999999

4.649999999999990

0.5

1

1.5

2

2.5

3

3.5

Series1exact

Page 21: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Mean Reverting Process

• Arithmetic Brownian Motion is mean reverting

• Interest rate models

• The numerical scheme is

Page 22: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulating ABM

00.15 0.3

0.45 0.60.75 0.9

1.05 1.21.35 1.5

1.65 1.81.95 2.1

2.25 2.42.55 2.7

2.85 33.15 3.3

3.45 3.6

3.74999999999999

3.89999999999999

4.04999999999999

4.19999999999999

4.34999999999999

4.49999999999999

4.64999999999999

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

Arithmetic Brownian Motion

Page 23: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Simulating ABM

00.15 0.3

0.45 0.60.75 0.9

1.05 1.21.35 1.5

1.65 1.81.95 2.1

2.25 2.42.55 2.7

2.85 33.15 3.3

3.45 3.6

3.74999999999999

3.89999999999999

4.04999999999999

4.19999999999999

4.34999999999999

4.49999999999999

4.649999999999990

0.2

0.4

0.6

0.8

1

1.2

ExactNumerical

Page 24: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Option Pricing using Monte Carlo

• Generate several risk-neutral random walks for the asset starting at the asset price today and going on till expiry.

• For each path generated calculate the payoff.• Calculate average the average of all the

payoffs• Take the present value of this average to get

the option value today.

Page 25: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Pricing of European Call

Page 26: Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.

Challenge Problem

Simulate using Monte Carlo techniques the price of a European call option where the underlying with volatility 0.5 interest rate 3% exercise price 100 and currently underlying at 90


Recommended