## numerical methods

numerical methods;

MSc in Mathematical Trading and Finance

Total Marks: 100 Marks

In this coursework, you will be given the opportunity to gain hand-on experience in

using Excel VBA to implement some numerical methods which are useful in nance,

in particular, option valuation. It will also give you the opportunity to develop re-

port writing skill. In this couse work, you are required to write Excel VBA codes

for implementing numerical methods and write a short report, in Word or Adobe

pdf format. The report should not be longer than FOUR pages with double line

spacing. One short report is required for this coursework. You are required to

mention clearly which questions and parts of questions you are answering in dier-

ent parts of the report. The report must be uploaded to Moodle, together with the

Excel VBA les containing the analyses. Both sets of les must be uploaded

to Moodle to obtain the marks. This is an individual coursework. You are

required to work on ALL of the following questions and answer all of them by your-

self. This coursework will constitute 50% of the total marks of the module. Some

marks (25%) will be awarded for the presentation of the report, Excel VBA codes

and spreadsheets, but the bulk of the marks will be based on the appropriateness

of the analyses and the correctness of the results.

Attempt all of the following FOUR questions.

Question 1: (20 Marks)

Consider the following polynomial:

p(x) = x7 + 3×5 ?? 2×2 + 6 :

We wish to evaluate numerically the following denite integral using quadratures with the number

of sub-intervals n = 12:

Z 10

??3

p(x)dx :

Write Excel VBA codes and display the results on spreadsheets for answering the following parts

of the question whenever appropriate.

(i) Compute the denite integral using the trapezoidal rule.

(ii) Compute the denite integral using the general Simpson’s rule and the general Simpson’s

three-eighth rule.

(iii) Compute the denite integral using the general Boole’s rule.

(iv) Comment on the accuracy and computational eciency of the numerical integration methods

used in Parts (i)-(iii).

SMM608 Numerical Methods 2014/15 -Term II

Individual Coursework 1

Question 2 (20 Marks)

Consider the following complex-valued function:

f(x) =

e3+i2x

ix

:

We wish to evaluate the following denite integral:

Z 3

??1

<[f(x)]dx ;

where <[f(x)] is the real part of f(x).

Write Excel VBA codes and display the results on spreadsheets for answering the following parts

of the question whenever appropriate.

(i) Compute the denite integral using the trapezoidal rule with 10 subintervals.

(ii) Compute the denite integral using the 10-point Gauss-Legendre quadrature.

(iii) Compute the denite integral using the general Gauss-Legendre quadrature with six points.

(iv) Comment on the accuracy and computational eciency of the numerical integral methods

used in Parts (i) – (iii).

Question 3 (30 Marks)

In the Black-Scholes option pricing model, the price process fStg of an underlying security is

governed by a geometric Brownian motion (GBM) as follows:

dSt = Stdt + StdWt ;

where and are the appreciation rate and the volatility of the underlying security, respectively;

fWtg is a standard Brownian motion under a real-world probability P.

For valuing options, instead of using the real-world probability P, the risk-neutral probability Q

is used. Under Q, the price process fStg of the underlying security becomes:

dSt = rStdt + StdWQ

t ;

where r is the risk-free continuously compounded interest rate and fWQ

t g is a standard Brownian

motion under Q

We consider a European put option and an American put option with common strike price

K = 80 and common maturity T = 0:6 years. Suppose that the current underlying security’s

price S0 = 100. The risk-free rate r = 2:5% and the volatility = 25%.

Write Excel VBA codes and display the results on spreadsheets for answering the following parts

of the question whenever appropriate.

(i) Compute the current European and American put prices using the CRR binomial tree with

the number of steps n ranging from 20 to 500 with an increment of 20.

(ii) Compute the current European and American put prices using the trinomial tree with the

number of steps n ranging from 20 to 500 with an increment of 20.

(iii) Comment on the accuracy, convergence and computational eciency of the methods in Parts

(i) and (ii).

Instead of valuing the European and American put options, we now consider a European cash-

or-nothing put option and an American cash-or-nothing put option with common payo P = 10,

common strike price K = 80 and common maturity T = 0:6 years. Again, the current underlying

security’s price S0 = 100. The risk-free rate r = 2:5% and the volatility = 25%.

(iv) Compute the current European and American cash-or-nothing put prices using the CRR

binomial tree with the number of steps n ranging from 20 to 1200 with an increment of 20.

(v) Compute the current European and American cash-or-nothing put prices using the trinomial

tree with the number of steps n ranging from 20 to 1200 with an increment of 20.

(vi) Comment on the accuracy, convergence and computational eciency of the methods in Parts

(iv) and (v).

Question 4 (30 Marks)

Consider an American put option with strike price K = 30 and maturity T = 2:5 years. Suppose

that the current underlying security’s price S0 = 50. The risk-free rate r = 2% and the volatility

= 30%. We wish to use the Tian

exible binomial tree and the CRR binomial tree to price the

American put.

Write Excel VBA codes and display the results on spreadsheets for answering the following parts

of the question whenever appropriate.

(i) Compute the rst-period means and standard deviations of the underlying security’s price

under the risk-neutral probability using the CRR binomial tree with the number of steps n

ranging from 20 to 1000 with an increment of 20.

(ii) Compute the rst-period means and standard deviations of the underlying security’s price

under the risk-neutral probability using the Tian

exible binomial tree with the tilting

parameters = ??0:5, = 0:5 and the number of steps n ranging from 20 to 1000 with an

increment of 20.

(iii) Compute the rst-period means and standard deviations of the underlying security’s price

under the risk-neutral probability using the Tian

exible binomial tree with the tilting

parameter given by the formula in Tian (1999) and the number of steps n ranging from 20

to 1000 with an increment of 20. Comment on the rst-period means and standard deviations

obtained in Parts (i) – (iii).

(iv) Compute the current prices of the American put using the CRR binomial tree with the

number of steps n ranging from 20 to 1000 with an increment of 20.

(v) Compute the current prices of the American put using the Tian

exible binomial tree with

the number of steps n ranging from 20 to 1000 with an increment of 20, the tilting parameter

= 0:5 and the tilting parameter given by the formula in Tian (1999).

(vi) Comment on the accuracy, convergence and computational eciency of the American put

prices obtained in Parts (iv)-(v).

End of Coursework 1