程序代写案例-EF5213

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top

City University of Hong Kong
Department of Economics and Finance
Course EF5213 Lab Test April 25, 2019 (7:00pm  10:00pm)

In the pricing of American put option, there is the so-called critical boundary during the life of the option that
need to be explicitly evaluated in the scheme. For American put option with strike price K and maturity T,
critical prices Bt at time t  T are defined according to the matching condition given by

K er(T  t)N (
ln(K/Bt)  ( r 
1
2
2)(T  t)
√T  t
)  Bt N (
ln(K/Bt)  ( r 
1
2
2)(T  t)
√T  t
)
 rK ∫ du er(u  t) N (
ln(Bu/Bt)  ( r 
1
2
2)(u  t)
√u  t
)
T
t
 K  Bt

where r and  are risk-free interest rate and volatility, respectively. Critical prices Bt can be evaluated by
solving the above equation knowing all other critical prices Bu immediately after time t in the integral.
Numerically, this can be done through a backward procedure that iteratively evaluates critical prices at
discrete times starting from a known end value at maturity.

Under a discrete time framework with n steps given by {t0, t1, …, tn  T} for which ti  it and time
increment t  T/n, there are n critical prices namely {Bt0, Bt1, …, Btn  1} along the boundary together with the
end value Btn K at maturity. At time ti during the course of the backward iteration, there are n  i forward
time steps {ti  1, …, tn} with critical prices {Bti  1, …, Btn} presumably being determined from previous
procedure. We can evaluate Bti by solving the matching condition at time t  ti with the integral being
approximated by the trapezoidal rule using the n  i forward steps as

∫ du er(u  ti) N (
ln(Bu/Bti)  ( r 
1
2
2)(u  ti)
√u  ti
)
T
ti

1
2
t N(0)  t ∑ er(tj  ti) N (
ln(Btj/Bti)  ( r 
1
2
2)(tj  ti)
√tj  ti
)n  1j  i  1

1
2
t er(tn  ti) N (
ln(Btn/Bti)  ( r 
1
2
2)(tn  ti)
√tn  ti
)

In backward sense, critical prices along the boundary can be evaluated at discrete times starting from Btn K
and then iteratively Btn  1, Btn  2, and so on. Current price of the American put option can then be estimated
under the discrete time framework with n steps as

P0(S0, T)  K erTN (
ln(K/S0)  ( r 
1
2
2)T
√T
)  S0 N (
ln(K/S0)  ( r 
1
2
2)T
√T
)
 rK (t ∑ ertj N (
ln(Btj/S0)  ( r 
1
2
2)tj
√tj
)n  1j  1 
1
2
t ertn N (
ln(Btn/S0)  ( r 
1
2
2)tn
√tn
))

where S0 is the current underlying asset price.

(a) Use EXCEL and VBA to implement the backward iteration procedure that evaluates all critical prices during the
life of the option under a discrete time framework, and use the critical boundary to price the American put
option. Consider number of steps n, strike K, maturity T, interest rate r, volatility , and asset price S0 as
input parameters
(Useful tips: In the numerical search for Bti, it is effective to consider Bti as being close to Bti  1)
(80 points)
(Please Turn Over)

In the Romberg's method, accuracy of the American put pricing under discrete time with trapezoidal rule in
(a) can effectively be improved by considering the extrapolation of the numerical estimations given by

P0
(h, m) 
1
4m  1
(4mP0
(h, m  1)  P0
(h  1, m  1)) , for m  1, 2, ..., h

In this method, P0
(h, 0)
is the numerical result in (a) with n  2h, and P0
(h, m)
is the improved value that evaluated
inductively from the equation with accuracy in the order of (T/2h)2m  2. The inductive procedure must follow
the sequence of evaluating P0
(i, j)
row by row as

P0
(0, 0)

P0
(1, 0)
, P0
(1, 1)

P0
(2, 0)
, P0
(2, 1) , P0
(2, 2)

:
P0
(h, 0)
, P0
(h, 1) , P0
(h, 2) , ... , P0
(h, h)


(b) Develop a VBA routine that enhances the accuracy of the pricing in (a) using Romberg's method with h
and m as input parameters.
Warning: DON'T use h greater than 12 to avoid hanging the computer.
(20 points)

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468