CS计算机代考程序代写 finance City University of Hong Kong Department of Economics and Finance

City University of Hong Kong Department of Economics and Finance
Course EF 5213 Assignment #4 (due April 11, 2021)
1. Under the Black-Schole regime, it is possible to generate the implied volatility surface, with respect to option strike price K and maturity term T, based on the market prices of plain vanilla call options written on the same asset. As discussed in Example 5.2, the plain vanilla call option prices c(K, T) can be converted into a set of implied volatilities (K, T) utilizing the Black-Schole pricing formula with current asset price S0 and risk-free interest rate r. In practice, the implied volatility surface is parameterized as
(K,T)h (T)h (T)(X)h (T)(X)2 , Xtan1(ln( K )) calledmoneyness 0 1 √T 2 √T S0erT
with coefficients h0(T), h1(T), and h2(T) depending on the maturity term. For each of the maturity term {T1, T2, … , Tn} in the market data, the volatility skew ( versus K) can be obtained by least-square fitting of the coefficients to the implied volatilities in the data.
Using then the contours of volatility skew, the volatility term structure ( versus T) for arbitrary strike K can be obtained through cubic spline interpolation. It can also be extended to T  0 and T   by linearly extrapolating the left-end and right-end cubic polynomials, respectively. In this way, it is possible to estimate the implied volatility (K , T) for any strike price and maturity term within the regions 0  K   and 0  T  . In this way, it is possible to estimate the implied volatility (K, T) for any strike price and maturity within the regions 0  K   and 0  T  .
The volatility term structure ( versus T) for each of the strikes {K1, K2, … , Km} in the market data can be obtained through cubic spline interpolation with set of polynomial coefficients. The term structure can also be extended to T  0 and T   by linearly extrapolating the left-end and right-end cubic polynomials, respectively.
(a) Using the market ask prices of the European call options in the attached file, develop a VBA routine that generates the implied volatility surface for the underlying asset. Your solution should be able to evaluate the interpolated value of implied volatility (K, T) for chosen strike price and maturity within the regions 0  K   and 0  T  , respectively.
Suggested modules :
(1) Develop a subroutine to evaluate all implied volatilities (K, T) for given set of strikes {K1, K2, …, Km} and maturities {T1, T2, … , Tn}. It should be noted that there are mispriced call options in the attached file that violate call  S0  KerT.
(2) Develop a subroutine to estimate the volatility skew coefficients h0(Ti), h1(Ti), and h2(Ti) for all given maturities {T1, T2, … , Tn}. There are 15 maturities each with 25 strikes in the market data.
Enclosed VBA subroutine LeastSquareFit() that is capable to perform a least-square fitting of the coefficients {c1, … , cM} in y  c11(x)  …  cM M(x) given points {(x1, y1), … , (xN, yN)}.
(K, T1)
 (K, T2) 
(K, Tn) 
 
 
(Kquery, T) Kquery



(3) Develop a function to evaluate the interpolated value of implied volatility (Kquery, Tquery) for any input strike price Kquery and maturity term Tquery.
If strike is fixed at Kquery, we can read off the implied volatilities yi  (Kquery, Ti) on all volatility skew curves with given maturities {T1, T2, … , Tn}. This gives a set of points {(T1, y1), (T2, y2), … , (Tn, yn)} that allows us to construct the cubic spline {1, 2, … , n  1} for the following interpolation.
(Kquery, Tquery)  ′1(T1)(Tquery  T1)  y1 (Kquery, Tquery)  k(Tquery)
dSt  rdt  (St, t) dzt dt
, for 0  Tquery  T1
, for Tk  Tquery  Tk  1
(Kquery, Tquery)  ′ (Tn)(Tquery  Tn)  yn n1
, for Tn  Tquery
(b) Consider the underlying asset of the European call options in part (a). Suppose it has a risk-neutral
process given by
with local volatility (St, t) that depends on asset price St at time t. Local volatility can be calibrated from the implied volatility surface (K, T) using the Dupire formula as
(60 points)
2 2T 2rKT [2(St,t)]S K,tT T K
ln(S /K)(r1⁄22)T 0

, 
You can estimate the first and second derivatives of (K, T) to the second order as
t 2 2 2 2 (1  K K )  K T ( K2   (K) )
(K,T) (KK,T)(KK,T) , 2(K,T)  (KK,T)2(K,T)(KK,T) K 2(K) K2 (K)2
(K,T) (K,TT)(K,TT) T 2(T)
Practically, you can choose x 108 x.
Develop a function to evaluate the local volatility given asset price St at time t. Use Monte-Carlo method to verify the statistical consistency of the simulated European call prices with reference to their observed market values.
(20 points)