Numerical methods
The method of division in half. Newton Rafson's method. Simpson's rule. The Mon-te-Carlo
method. Method of control of random variable
https://ek.biem.sumdu.edu.ua/
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
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?
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
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
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
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
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