SlideShare a Scribd company logo
Topic 3. Numerical methods
Kashcha Mariya
1
Contents
1. Introduction
2. Equation solving
3. Numerical methods for integration
4. Numerical methods to solve stochastic
problems
5. Monte Carlo simulation
2
Introduction
1. Solving mathematical problems by repetitive
application of a mathematical procedure
2. To search for a solution or to aggregate many
approximations into a final solutoin
3. Monte Carlo simulation, this process solves
problems by imitation the random process,
i.e. running the mathematical model many,
many times and taking the average outcome.
3
Equation solving
• Problem to solving:
1. Non-linear equation
2. If necessary to obtain an approximate
solution: x2-2=0, x≈1,4142135624
4
5
Formulas (or algorithms) to equations
five and higher degree no such exist
6
7
Bond to maturity 2,5 years paying half-
yearly coupons
8
Bond to maturity 2,5 years paying half-yearly
coupons of 5 and is currently priced 98
9
How to we go about our iterative procedure to
search for the x?
Bisection
-3
-2
-1
0
1
2
3
4
5
6
0 0.5 1 1.5 2 2.5 3
x2-2=0
10
11
12
The Newton-Raphson method
• More rapidly than the bisection method
1. Begins with a guess of the value of x0
2. x1=x0-f(x0)/f’(x0) …
13
14
Numerical methods for integration
• Many functions for which no primitive exists –
though this does not mean that there is no
integral – consequently a numerical method is
required.
• Two methods: the trapezium rule and Simpson’s
rule – dividing the area under the curve into small
vertical strips, each with a height equal to the
distance between a particular point on the
horizontal axis and the curve. The sum of this
areas is approximately the area under the curve.
15
The trapezium rule
16
f(x0)
h
The area under
the curve which
is to be
evaluated is split
into a number of
vertical strips of
equal width.
17
Curve is convex →
The area of each trapezium
is slightly greater that the
true area under the curve.
Curve is concave →
The area of each trapezium
Is understate that the
true area under the curve.
• The area of each
trapezium is given
by its mean height
times ins width, so
the total area is
18
-5
0
5
0 1 2 3 4 5
f(x0)
f(x1)
x0 x1
h/2(‘ends’+2*’middles’)
Is the probability of a variable with a
standard normal distribution taking a value
between one and two
19
X 1 1,2 1,4 1,6 1,8 2
F(x) 0,242 0,194 0,150 0,111 0,079 0,054
h = 0.2
“ends” = 0,242+0,054=0,296
“middles” = 0,194+0,150+0,111+0,079=0,534
S≈0,2*(0,296+2*0,534)/2= 0,1364
We can be improved by increasing the
number of strips
20
X 1 1,1 1,2 1,3 1,4 1,5 1,6 1,7 1,8 1,9 2
f(x) 0,242 0,218 0,194 0,171 0,15 0,13 0,111 0,094 0,079 0,66 0,054
h = 0.1
“ends” = 0,242+0,054=0,296
“middles” = 0,218+0,194+0,171
+0,15+0,13+0,111+0,094+0,079+0,66=1,212
S≈0,1*(0,296+2*1,212)/2= 0,136
Simpson’s rule
• Improvement upon the trapezium rule
1. Divides area under curve into even number
of intervals of equal width.
2. On each intervals we giving three points:
two ends and middle.
3. Gives this points with weights: 1, 4, 1.
4. S≈h/3*(“ends”+4*”evens”+2*”odds”)
21
Simpson’s rule
22
1 2 3 4 5 6 7 8 9 10 11
X 1 1,1 1,2 1,3 1,4 1,5 1,6 1,7 1,8 1,9 2
f(x) 0,242 0,218 0,194 0,171 0,15 0,13 0,111 0,094 0,079 0,66 0,054
h = 0.1
“ends” = 0,242+0,054=0,296
“evens” = 0,218+0,171+0,13+0,094+0,066=0,679
“odds” = 0,194+0,15+0,111+0,079=0,534
S≈0,1*(0,296+4*0,679+2*0,534)/3= 0,1359
Numerical methods to solve stochastic
problems
• When the models assume a fixed relationship between
the variables, the model are said to be deterministic.
• When the models assume some uncertain component
such as a random variable, the model are said to be
stochastic.
• Now we will look at 3 widely used numerical methods
for dealing with stochastic problems:
1. The binomial process;
2. The trinomial process;
3. Monte Carlo simulation.
23
The option
• The option gives the buyer “the right but not the
obligation to purchase an asset at a previously
agreed price, on or before a particular date”
• A put option gives “the right but not the
obligation to sell an asset at a previously agreed
price, on or before a particular date”
• The option has a fixed maximum life and fixed
price (“exercise price or strike price”)
• C=max[0;S-X], P=max [0;X-S], C – value to call, P
value of a put, X - exercise price, S – asset price.
24
The Binomial distribution
1. Only two possible values or outcomes can be
taken on by the variable – binomial trial:
“success” or “failure”.
2. For each of a succession of trials the
probability of each of the two outcomes is
constant.
3. Each binomial trial is independent and
identical.
25
The Binomial distribution
26
S
Su
Sd
Suu
Sud
Sdd
The Binomial distribution
27
S, 50
Su, 55
Sd, 45
Suu,
60,50
Sud,
50
Sdd,
40,50
60,5*0,25+50*0,5+40,5*0,25=50,25
The binomial models
• The application of binomial models to option
pricing entails modeling the price of the
underlying asset as a binomial process.
• The binomial models to assumes to possibility
of creating a risk free portfolio by hedging a
long position in the underlying asset with the
short position in a number of fairly priced call
options on that asset
28
The binomial lattice approach
• The cost of establishing the risk portfolio is the
cost of buying the underlying asset minus the
premiums from the written options.
• S =35 the underlying asset
• X=35 the exercise price
• r=10% the risk-free rate
• R=1+r=1,1
• 1 year - time to expiry of the option
• Price will have either risen by 25%, or fallen by
25%.
29
S=35; u=1,25; d=0,75; X=35; R=1,1;
r=0,1
30
S=35
Su=43,75
Sd=26,25
c
cu=max[0;43,75-35]=8,75
cd=max[0;26,25-35] =0
Find out how many options to sell
that makes the portfolio riskless?
1. S(u-d)=35(1,25-0,75)=17,5 -the range of asset
prices
2. cu-cd=8,75-0=8,75 - the range of option values
3. H=S(u-d)/(cu-cd)=17,5/8,75=2 – thus as the
asset prices have a range twice that of the
option prices, a short position in two options is
required to achieve the profit that fully offsets
the loss on one unit of the long position in the
assets
4. Su-Hcu=1,25*35-2*8,75=26,25 – asset rises
Sd-Hcd=0,75*35-2*0=26,25 – asset falls
31
Determine the fair price at which
these options should be sold
1. End of year pay-off: Su-Hcu=26,25
2. Present value must be:
(Su-Hcu)/R=26,25/1,1=23,86;
3. A single option must be fairly priced at:
(S-23,86)/2=(35-23,86)/2=5,57;
32
The multi-period binomial model
• As the time interval between trials becomes
infinitesimally small, so that trading is in effect
continuous, the binomial model converges to the
Black-Scholes model.
• Irrespective of the number of binomial trials, the
same principles are used to solve the value of the
option at each node of the tree, working back
from the expiry of the option to the present time
period and, therefore, the current price of the
option.
33
• Assumes an asset price S=35
• Exercise price X=35
• Life of the option in years T-t=1
• Number of binomial trials n=4
• Annual risk-free rate r=10%
• Annual volatility σ=20%
• One-year, divided into four quarterly sub-
periods or binomial trials
34
35
36
S =35
4,37
Su =38,68
6,48
Sd =31,67
1,52
Suu =42,75
9,38
Sud =35
2,62
Sdd=28,65
0
Suuu =47,25
13,07
Suud =38,68
4,51
Sudd =31,67
0
Sddd =25,93
0
Sdddd =26,46
c= max[0;23,46-35]=0
Suddd =28,66
c= max[0;28,65-35]=0
Suudd =35
c= max[0;35-35]=0
Suuuu =52,21
c= max[0;52,21-35]=17,21
Suuud =42,75
c= max[0;42,75-35]=7,75
Binomial tree
General binomial formula for option
valuation:
37
The trinomial equivalent of the
binomial option pricing model
• Asset price can take one of the tree possible
values at the end of each trinomial trial: rise –
u, remain at the current level – q and fall – d.
38
The one-period trinomial option
pricing model is given as:
• C=max[0;S-X], P=max [0;X-S], C – value to call,
P value of a put, X - exercise price, S – asset
price.
39
40
S=35
4,3716
42, 7491
9,3739
35
2,6184
28,6556
0
52,2139
cu2=max[Su2-X,0]=52,2139-35=17,2139
35
cq2=max[Sq2-X,0]=0
42,7491
cuq=max[Suq-X,0]=42, 7491-35=7,7491
28,6556
cdq=max[Sdq-X,0]=0
23,4612
cd2=max[Sd2-X,0]=0
S=35; X=35;
u=1,2214
pu=0,3544
d=0,8187
pd=0,1638
pq=0,4818
δ=0,2
The one-period trinomial option
pricing model is given as:
41
• Monte Carlo Simulation I
• Monte Carlo Simulation in Excel: Financial
Planning Example
42

More Related Content

PDF
Bachelor Thesis Report
PDF
Ifm2 slides-2013
DOCX
A Comparison of Option Pricing ModelsEkrem Kilic 11.0.docx
PDF
Senior Project [Hien Truong, 4204745]
PPTX
options cmfd.pptx
PPT
11. option pricing
PPTX
Fin 533 module5 binomial step by step (corrected)
PDF
Levy models
Bachelor Thesis Report
Ifm2 slides-2013
A Comparison of Option Pricing ModelsEkrem Kilic 11.0.docx
Senior Project [Hien Truong, 4204745]
options cmfd.pptx
11. option pricing
Fin 533 module5 binomial step by step (corrected)
Levy models

Similar to Lecture 4-5.pptx (20)

PPTX
Options pricing using Python Options pricing using Python
PDF
Exam binder 1
PDF
Options pricing using Lattice models
PDF
Stochastic processes for_finance_dictaat2 (1)
PPTX
BB_11_Futures & Options_Hull_Chap_12.pptx
PPT
Interest Rate Modeling With Cox Ingersoll Ross
PDF
Empowering Fourier-based Pricing Methods for Efficient Valuation of High-Dime...
PPTX
option pricing
PPT
Chap 11
PPT
2nd Equity Based Guarantee 3 D
PPTX
Berong report
PDF
Cookbook en
PDF
thesis
PDF
Probability and Statistics Cookbook
PPTX
American Options with Monte Carlo
PDF
Derivatives pricing and Malliavin Calculus
DOC
Roots of equations
PDF
PDF
Numerical smoothing and hierarchical approximations for efficient option pric...
PDF
Expanding further the universe of exotic options closed pricing formulas in t...
Options pricing using Python Options pricing using Python
Exam binder 1
Options pricing using Lattice models
Stochastic processes for_finance_dictaat2 (1)
BB_11_Futures & Options_Hull_Chap_12.pptx
Interest Rate Modeling With Cox Ingersoll Ross
Empowering Fourier-based Pricing Methods for Efficient Valuation of High-Dime...
option pricing
Chap 11
2nd Equity Based Guarantee 3 D
Berong report
Cookbook en
thesis
Probability and Statistics Cookbook
American Options with Monte Carlo
Derivatives pricing and Malliavin Calculus
Roots of equations
Numerical smoothing and hierarchical approximations for efficient option pric...
Expanding further the universe of exotic options closed pricing formulas in t...

More from Mariia Kashcha (7)

PPTX
ПЕТема 3.pptx
PPTX
ПЕТема 2.pptx
PPTX
ПЕТема 1.pptx
PPTX
Lecture 8.pptx
PPTX
Lecture 6.pptx
PPTX
Lecture 2-3.pptx
PPTX
Lecture 1.pptx
ПЕТема 3.pptx
ПЕТема 2.pptx
ПЕТема 1.pptx
Lecture 8.pptx
Lecture 6.pptx
Lecture 2-3.pptx
Lecture 1.pptx

Recently uploaded (20)

PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
Introduction to Building Materials
PPTX
Computer Architecture Input Output Memory.pptx
PDF
Trump Administration's workforce development strategy
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
IGGE1 Understanding the Self1234567891011
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
1_English_Language_Set_2.pdf probationary
PDF
advance database management system book.pdf
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Introduction to Building Materials
Computer Architecture Input Output Memory.pptx
Trump Administration's workforce development strategy
A powerpoint presentation on the Revised K-10 Science Shaping Paper
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
LDMMIA Reiki Yoga Finals Review Spring Summer
FORM 1 BIOLOGY MIND MAPS and their schemes
IGGE1 Understanding the Self1234567891011
Indian roads congress 037 - 2012 Flexible pavement
Unit 4 Computer Architecture Multicore Processor.pptx
1_English_Language_Set_2.pdf probationary
advance database management system book.pdf
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Chinmaya Tiranga Azadi Quiz (Class 7-8 )

Lecture 4-5.pptx

  • 1. Topic 3. Numerical methods Kashcha Mariya 1
  • 2. Contents 1. Introduction 2. Equation solving 3. Numerical methods for integration 4. Numerical methods to solve stochastic problems 5. Monte Carlo simulation 2
  • 3. Introduction 1. Solving mathematical problems by repetitive application of a mathematical procedure 2. To search for a solution or to aggregate many approximations into a final solutoin 3. Monte Carlo simulation, this process solves problems by imitation the random process, i.e. running the mathematical model many, many times and taking the average outcome. 3
  • 4. Equation solving • Problem to solving: 1. Non-linear equation 2. If necessary to obtain an approximate solution: x2-2=0, x≈1,4142135624 4
  • 5. 5
  • 6. Formulas (or algorithms) to equations five and higher degree no such exist 6
  • 7. 7
  • 8. Bond to maturity 2,5 years paying half- yearly coupons 8
  • 9. Bond to maturity 2,5 years paying half-yearly coupons of 5 and is currently priced 98 9 How to we go about our iterative procedure to search for the x?
  • 11. 11
  • 12. 12
  • 13. The Newton-Raphson method • More rapidly than the bisection method 1. Begins with a guess of the value of x0 2. x1=x0-f(x0)/f’(x0) … 13
  • 14. 14
  • 15. Numerical methods for integration • Many functions for which no primitive exists – though this does not mean that there is no integral – consequently a numerical method is required. • Two methods: the trapezium rule and Simpson’s rule – dividing the area under the curve into small vertical strips, each with a height equal to the distance between a particular point on the horizontal axis and the curve. The sum of this areas is approximately the area under the curve. 15
  • 16. The trapezium rule 16 f(x0) h The area under the curve which is to be evaluated is split into a number of vertical strips of equal width.
  • 17. 17 Curve is convex → The area of each trapezium is slightly greater that the true area under the curve. Curve is concave → The area of each trapezium Is understate that the true area under the curve.
  • 18. • The area of each trapezium is given by its mean height times ins width, so the total area is 18 -5 0 5 0 1 2 3 4 5 f(x0) f(x1) x0 x1 h/2(‘ends’+2*’middles’)
  • 19. Is the probability of a variable with a standard normal distribution taking a value between one and two 19 X 1 1,2 1,4 1,6 1,8 2 F(x) 0,242 0,194 0,150 0,111 0,079 0,054 h = 0.2 “ends” = 0,242+0,054=0,296 “middles” = 0,194+0,150+0,111+0,079=0,534 S≈0,2*(0,296+2*0,534)/2= 0,1364
  • 20. We can be improved by increasing the number of strips 20 X 1 1,1 1,2 1,3 1,4 1,5 1,6 1,7 1,8 1,9 2 f(x) 0,242 0,218 0,194 0,171 0,15 0,13 0,111 0,094 0,079 0,66 0,054 h = 0.1 “ends” = 0,242+0,054=0,296 “middles” = 0,218+0,194+0,171 +0,15+0,13+0,111+0,094+0,079+0,66=1,212 S≈0,1*(0,296+2*1,212)/2= 0,136
  • 21. Simpson’s rule • Improvement upon the trapezium rule 1. Divides area under curve into even number of intervals of equal width. 2. On each intervals we giving three points: two ends and middle. 3. Gives this points with weights: 1, 4, 1. 4. S≈h/3*(“ends”+4*”evens”+2*”odds”) 21
  • 22. Simpson’s rule 22 1 2 3 4 5 6 7 8 9 10 11 X 1 1,1 1,2 1,3 1,4 1,5 1,6 1,7 1,8 1,9 2 f(x) 0,242 0,218 0,194 0,171 0,15 0,13 0,111 0,094 0,079 0,66 0,054 h = 0.1 “ends” = 0,242+0,054=0,296 “evens” = 0,218+0,171+0,13+0,094+0,066=0,679 “odds” = 0,194+0,15+0,111+0,079=0,534 S≈0,1*(0,296+4*0,679+2*0,534)/3= 0,1359
  • 23. Numerical methods to solve stochastic problems • When the models assume a fixed relationship between the variables, the model are said to be deterministic. • When the models assume some uncertain component such as a random variable, the model are said to be stochastic. • Now we will look at 3 widely used numerical methods for dealing with stochastic problems: 1. The binomial process; 2. The trinomial process; 3. Monte Carlo simulation. 23
  • 24. The option • The option gives the buyer “the right but not the obligation to purchase an asset at a previously agreed price, on or before a particular date” • A put option gives “the right but not the obligation to sell an asset at a previously agreed price, on or before a particular date” • The option has a fixed maximum life and fixed price (“exercise price or strike price”) • C=max[0;S-X], P=max [0;X-S], C – value to call, P value of a put, X - exercise price, S – asset price. 24
  • 25. The Binomial distribution 1. Only two possible values or outcomes can be taken on by the variable – binomial trial: “success” or “failure”. 2. For each of a succession of trials the probability of each of the two outcomes is constant. 3. Each binomial trial is independent and identical. 25
  • 27. The Binomial distribution 27 S, 50 Su, 55 Sd, 45 Suu, 60,50 Sud, 50 Sdd, 40,50 60,5*0,25+50*0,5+40,5*0,25=50,25
  • 28. The binomial models • The application of binomial models to option pricing entails modeling the price of the underlying asset as a binomial process. • The binomial models to assumes to possibility of creating a risk free portfolio by hedging a long position in the underlying asset with the short position in a number of fairly priced call options on that asset 28
  • 29. The binomial lattice approach • The cost of establishing the risk portfolio is the cost of buying the underlying asset minus the premiums from the written options. • S =35 the underlying asset • X=35 the exercise price • r=10% the risk-free rate • R=1+r=1,1 • 1 year - time to expiry of the option • Price will have either risen by 25%, or fallen by 25%. 29
  • 30. S=35; u=1,25; d=0,75; X=35; R=1,1; r=0,1 30 S=35 Su=43,75 Sd=26,25 c cu=max[0;43,75-35]=8,75 cd=max[0;26,25-35] =0
  • 31. Find out how many options to sell that makes the portfolio riskless? 1. S(u-d)=35(1,25-0,75)=17,5 -the range of asset prices 2. cu-cd=8,75-0=8,75 - the range of option values 3. H=S(u-d)/(cu-cd)=17,5/8,75=2 – thus as the asset prices have a range twice that of the option prices, a short position in two options is required to achieve the profit that fully offsets the loss on one unit of the long position in the assets 4. Su-Hcu=1,25*35-2*8,75=26,25 – asset rises Sd-Hcd=0,75*35-2*0=26,25 – asset falls 31
  • 32. Determine the fair price at which these options should be sold 1. End of year pay-off: Su-Hcu=26,25 2. Present value must be: (Su-Hcu)/R=26,25/1,1=23,86; 3. A single option must be fairly priced at: (S-23,86)/2=(35-23,86)/2=5,57; 32
  • 33. The multi-period binomial model • As the time interval between trials becomes infinitesimally small, so that trading is in effect continuous, the binomial model converges to the Black-Scholes model. • Irrespective of the number of binomial trials, the same principles are used to solve the value of the option at each node of the tree, working back from the expiry of the option to the present time period and, therefore, the current price of the option. 33
  • 34. • Assumes an asset price S=35 • Exercise price X=35 • Life of the option in years T-t=1 • Number of binomial trials n=4 • Annual risk-free rate r=10% • Annual volatility σ=20% • One-year, divided into four quarterly sub- periods or binomial trials 34
  • 35. 35
  • 36. 36 S =35 4,37 Su =38,68 6,48 Sd =31,67 1,52 Suu =42,75 9,38 Sud =35 2,62 Sdd=28,65 0 Suuu =47,25 13,07 Suud =38,68 4,51 Sudd =31,67 0 Sddd =25,93 0 Sdddd =26,46 c= max[0;23,46-35]=0 Suddd =28,66 c= max[0;28,65-35]=0 Suudd =35 c= max[0;35-35]=0 Suuuu =52,21 c= max[0;52,21-35]=17,21 Suuud =42,75 c= max[0;42,75-35]=7,75 Binomial tree
  • 37. General binomial formula for option valuation: 37
  • 38. The trinomial equivalent of the binomial option pricing model • Asset price can take one of the tree possible values at the end of each trinomial trial: rise – u, remain at the current level – q and fall – d. 38 The one-period trinomial option pricing model is given as:
  • 39. • C=max[0;S-X], P=max [0;X-S], C – value to call, P value of a put, X - exercise price, S – asset price. 39
  • 41. The one-period trinomial option pricing model is given as: 41
  • 42. • Monte Carlo Simulation I • Monte Carlo Simulation in Excel: Financial Planning Example 42