Top Banner
1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2
33

1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

Dec 13, 2015

Download

Documents

Clare Waters
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

1

Ka-fu WongUniversity of Hong Kong

EViews Commands that are useful for Assignment #2

Page 2: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

2

Download and open the Excel file containing the data

We are going to use Canada-US real exchange rate as an example.

Dated observations from 1970:01 to 2006:11

Page 3: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

3

Enter or read data in EviewsFile > New > Workfile

3. Click OK.

1. Choose “Monthly”.

2. Specify 1970:01 and 2006:11

Page 4: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

4

Enter or read data in Eviews Choose Quick>Empty Group(Edit Series)

Page 5: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

5

Enter or read data in Eviews Key in data

Page 6: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

6

Enter or read data in Eviews Copy the data from Excel (B16:B458 together) to the Workfile

Default series names

Page 7: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

7

Renaming the seriesFirst minimize the data sheet

Highlight ser01 and right click mouse, and choose rename

Page 8: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

8

Rename the series ser01

Page 9: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

9

Check if the variable names has been changed

Page 10: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

10

Save data and results frequently to avoide loss of dataFile>SaveAs

Enter rer1.wf1

Page 11: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

11

Plot a line graph of the data (against date)and call it Figure1

Page 12: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

12

Double click figure1 to see the plot

Page 13: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

13

Generate the variable TIME and its relativesTIME=1 for 1970m01 and 2 for 1970m02, etc.

Page 14: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

14

Generate the variable TIME and its relativesTIME2, TIME3, TIME4, TIME5

Page 15: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

15

Select sample from 1970m01 to 2000m12 for regression analysis (fitting the trend line)

Page 16: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

16

Fit a linear trend using Least Squares and put the result to Table1

Page 17: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

17

Double click table1 to see the regression result

Page 18: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

18

Fit Polynomial trend line of various degree (up to 5) using Least Squares and put the result to corresponding tables.

Page 19: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

19

Fitting an exponential trend and put result to Table6

Page 20: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

20

Plot (in-sample) residuals, fitted values and actual values, and put them in corresponding figures (FigureA?)

Page 21: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

21

Generate a new variable containing the historical values of rer from 1970:01 to 2000:12

Page 22: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

22

Specify the sample to create out-of-sample forecast

Page 23: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

23

Produce a forecast for the sample period 2001m01 to 2006m11 using the Table1 regression results

Page 24: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

24

Generate the upper bound and lower bound of 95% confidence interval.

Page 25: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

25

Continue to obtain forecast, and confidence bound for the forecast using other trend models.

Page 26: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

26

Change the sample to 1970m01 2006m11, for plotting actual value and forecast together

Page 27: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

27

Plot the historical values, forecast, confidence interval and the actual value during the forecasting period.

Page 28: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

28

Double click figureb1 to see the plot

Page 29: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

29

Fix the sample and compute the sqaured forecast errors based on different models.

Page 30: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

30

Fix the sample and compute the sqaured forecast errors based on different models.

Create a vector “A” to save the mean squared errors.Save the mean squared errors to the vector

Page 31: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

31

Double click “A” to see the mean squared forecast errors from different models.

Page 32: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

32

Note limitation of EViews 4.1 student version

There is a limit on how many variables we can create in student version.

When I tried to run 6 regressions, and create the 6 forecast, 6 confidence bounds, 6 squared forecast errors all in one go, I got an error message “You have exceeded the data capacity of the Student Version.” I have to delete some variables before I could complete all the analysis I wanted to do.

Page 33: 1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.

33

End