vba金融代写: Course EF5213 Assignment #1

City University of Hong Kong Department of Economics and Finance

Course EF5213 Assignment #1 ( due February 11, 2018)

1. In the Exponentially weighted moving average model (EWMA), future variance is a weighted average of its immediate past estimation and the most recent observation of squared residual of price return. It follows an iteration equation given by

2 (1)(r )2 2 t1tt

with weight factor 1    0. The parameter  can be estimated based on the historical mean of a given time series {r1, … , rn} as   (1/n)(r1  …  rn).

(a) Given, in file hsiapr_1tick.csv, intraday tick data for Hang Seng Index Futures of April 2015 as {timestamp, traded price, number of contracts}

use VBA to develop a procedure that captures the time series of price returns for every tradeVol number of contracts being traded as

(plast)new  (plast)old (plast)old

where plast is the last traded price in the interval.
(b) Determine the EWMA model for the extracted time series in (a). The parameters  should be

determined by considering the notion of minimizing root-mean-square error (RMSE) defined as RMSE√1n ∑nt1[2t (rt )2 ]2

based on the historical time series of price returns { r1 , r2 , … , rn }. For this purpose, use the enclosed Brent’s minimizer from netlib with your own modification.

(40 points)