Anda di halaman 1dari 4

Below is the exam from last year.

Use this as a guide to the type of


questions we will have on the actual exam. But please keep in mind
that we were further ahead last year, so a couple of the questions are
not applicable yet. I have put notes on the exam to indicate this.
I also enclose the solutions one student submitted. Feel free to go over
the solutions, but use the solutions to the labs and the other sample
code Ive posted already as a main preparation tool. The code I post
tends to be simpler and attempts to get at the core of the problem
quickly. The exam solutions have a lot of extras, which are great, but
only worth doing if the main tasks are complete.

BUS 803 MidTerm Exam 1


Please write matlab code to answer the questions below. When the
exam is over, please e-mail your code to mscfin803@gmail.com. Use
the following naming convention for your files:
Part 1: Name_STUDENTID_M1P1.m
Part 2: Name_STUDENTID_M1P2.m
During the exam youre welcome to use information from all sources your notes, books, lecture notes, labs, lab solutions, or Matlab help.
The only restriction is that you are NOT allowed to communicate with
each other. To ensure this, please DO NOT open your e-mail or any
other communication software during the exam.
Part 1:
ARMA fit
Add the last three digits of your student ID number. This gives you a
number between 0 and 36. The file midtermData.xls contains 60
columns of returns for different assets. Take the column corresponding
to the sum of the last three digits this is your data for this part of the
exam.
Note: All questions below are equally weighted.
a) Test for constant mean. Display your conclusion in the command
window. If the mean is not constant, take steps to remove any
trend in the mean.
b) Plot the ACF using the function autocorr and print a statement in
the command prompt on whether the series appears to have
serial correlation or not.
c) Plot the PACF using the function parcorr.
d) Select an AR(p), MA(q) or ARMA(p,q) and identify the optimal
order based on the ACF, PACF, or trial and error. Explain your
choice by printing in the command window.
e) Estimate the model chosen in (d) (only one model). You can use
your own code or any of the existing matlab functions to
estimate the model.
f) Use the function lbqtest to evaluate whether serial correlation
exists in the residuals from (e). Display your conclusion in the
command window. If there is serial correlation, go back to step
(d) and select a model that eliminates serial correlation in the
residual.

g) Test if the residuals from (f) have constant variance. No need to


correct for heteroscedasticity if one exists. (NOT COVERED YET
THIS YEAR).

Part 2:

Simulate and forecast an AR Process

a)
Generate 1,000 simulations of an AR process for 100 days
forward using the following model:
xt

ID
xt 1 0.2 xt 2 at
100
{at } ~ N (0,0.1)

Assume:

x1 0
x0 0

In the equation above ID stands for the last 2 digits of your student
ID number.
Hint: Start by generating a matrix of size 1000 by 100 of normal
random variables. These will be your innovations on each simulation
path for each day.
b)
Plot the PACF of the first 100-day simulation. Print in the
command window a statement to whether the PACF plot is consistent
with the model above.
c)
Compute 5% VaR for the cumulative return from today to day
100.
)
d

Using the model above, compute forecasts for days 2:100. ( x1 (1)

to x1 (100) ). Compare the 100th-day forecast x1 (100) with the average


value for day 100 of the 1000 simulations. Print the comparison on the
command window.

NOTE: In our class we havent done multiple simulations paths yet. On


our exam there will likely be one single simulation path (many days in
the future, but only one path).

Anda mungkin juga menyukai