Financial Econometrics Review Session Notes 1

Similar documents
Forecasting the US Dollar / Euro Exchange rate Using ARMA Models

2. Linear regression with multiple regressors

Forecasting Using Eviews 2.0: An Overview

Air passenger departures forecast models A technical note

A Guide to Using EViews with Using Econometrics: A Practical Guide

UK GDP is the best predictor of UK GDP, literally.

Advanced Forecasting Techniques and Models: ARIMA

IMPACT OF WORKING CAPITAL MANAGEMENT ON PROFITABILITY

3.1 Stationary Processes and Mean Reversion

Price volatility in the silver spot market: An empirical study using Garch applications

Chapter 9: Serial Correlation

How to Use EViews (Econometric Views)

SPSS Guide: Regression Analysis

A Short Introduction to Eviews

Turkey s Energy Demand

Source engine marketing: A preliminary empirical analysis of web search data

Time Series Analysis

KSTAT MINI-MANUAL. Decision Sciences 434 Kellogg Graduate School of Management

Directions for using SPSS

The relationship between stock market parameters and interbank lending market: an empirical evidence

This chapter will demonstrate how to perform multiple linear regression with IBM SPSS

Assignment objectives:

The Effect of Seasonality in the CPI on Indexed Bond Pricing and Inflation Expectations

Integrating Financial Statement Modeling. and Sales Forecasting Using EViews

The Impact of Privatization in Insurance Industry on Insurance Efficiency in Iran

Lecture 2: ARMA(p,q) models (part 3)

Determinants of Stock Market Performance in Pakistan

MACRO ECONOMIC PATTERNS AND STORIES I. GETTING STARTED

Stepwise Regression. Chapter 311. Introduction. Variable Selection Procedures. Forward (Step-Up) Selection

Forecasting of Paddy Production in Sri Lanka: A Time Series Analysis using ARIMA Model

Multiple Regression in SPSS This example shows you how to perform multiple regression. The basic command is regression : linear.

Forecasting in STATA: Tools and Tricks

Competition as an Effective Tool in Developing Social Marketing Programs: Driving Behavior Change through Online Activities

PRICING OF FOREIGN CURRENCY OPTIONS IN THE SERBIAN MARKET

NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

Data analysis and regression in Stata

Time Series Analysis

On the Degree of Openness of an Open Economy Carlos Alfredo Rodriguez, Universidad del CEMA Buenos Aires, Argentina

Data Analysis Tools. Tools for Summarizing Data

Promotional Forecast Demonstration

European Journal of Business and Management ISSN (Paper) ISSN (Online) Vol.5, No.30, 2013

IBM SPSS Forecasting 22

Incorporating Macroeconomic and Firm-Level Uncertainties in Stochastic Pro-Forma Financial Modeling

ITSM-R Reference Manual

Using Microsoft Project 2000

Integrating Financial Statement Modeling and Sales Forecasting

ITS Training Class Charts and PivotTables Using Excel 2007

Time Series Analysis

UNIT ROOT TESTING TO HELP MODEL BUILDING. Lavan Mahadeva & Paul Robinson

2. Descriptive statistics in EViews

The SAS Time Series Forecasting System

Scatter Plots with Error Bars

Instructions for applying data validation(s) to data fields in Microsoft Excel

Summary of important mathematical operations and formulas (from first tutorial):

Job Streaming User Guide

STAFF WORKING PAPER. The Relationship between Sustainable Growth and the Riskfree Rate: Evidence from UK Government Gilts. Staff Working Paper 2012.

Excel Basics By Tom Peters & Laura Spielman

The role of the banking sector in enhancing extractive industries in Sudan

Intertemporal Effects of Online Advertising Channels on Customers

Testing for Granger causality between stock prices and economic growth

Chapter 6: Multivariate Cointegration Analysis

Module 5: Multiple Regression Analysis

Standard Deviation Estimator

Forecasting of Gold Prices (Box Jenkins Approach)

ABSORBENCY OF PAPER TOWELS

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

Some useful concepts in univariate time series analysis

Simple linear regression

Introduction to Regression and Data Analysis

Regression step-by-step using Microsoft Excel

(More Practice With Trend Forecasts)

Factor Analysis. Chapter 420. Introduction

The Time Series Performance Of UK Real Estate Indices

GRETL. (Gnu Regression, Econometrics and. Time-series Library)

Basic Pivot Tables. To begin your pivot table, choose Data, Pivot Table and Pivot Chart Report. 1 of 18

Integrated Resource Plan

PITFALLS IN TIME SERIES ANALYSIS. Cliff Hurvich Stern School, NYU

USE OF ARIMA TIME SERIES AND REGRESSORS TO FORECAST THE SALE OF ELECTRICITY

MULTIPLE REGRESSION AND ISSUES IN REGRESSION ANALYSIS

Simple Linear Regression, Scatterplots, and Bivariate Correlation

Upgrading from Windows XP to Windows 7

Descriptive Statistics

Directions for Frequency Tables, Histograms, and Frequency Bar Charts

Bill Burton Albert Einstein College of Medicine April 28, 2014 EERS: Managing the Tension Between Rigor and Resources 1

Time Series Laboratory

Calculator Notes for the TI-Nspire and TI-Nspire CAS

ANALYSIS OF THE LIFE INSURANCE MARKET IN THE REPUBLIC OF MACEDONIA

Using MS Excel to Analyze Data: A Tutorial

In This Issue: Excel Sorting with Text and Numbers

Stock Markets Correlation: before and during the Crisis Analysis *

The Relationship between Life Insurance and Economic Growth: Evidence from India

COMP6053 lecture: Time series analysis, autocorrelation.

Exam Solutions. X t = µ + βt + A t,

SPSS Explore procedure

Regression III: Advanced Methods

What drove Irish Government bond yields during the crisis?

TIME SERIES ANALYSIS

Forecasting areas and production of rice in India using ARIMA model

Company Set Up. Company Settings

Basics of STATA. 1 Data les. 2 Loading data into STATA

Transcription:

Financial Econometrics Review Session Notes 1 January 7, 011 Contents 1 Loading data to EViews 1.1 Using menus to create an empty workfile:................... 1. Using command panel to create an empty workfile:............. 1.3 Using the Excel file to create a workfile:................... Time Series Data and the Autocorrelation Function 3 3 Estimating an AR(1) model 5 4 Simulating an AR(1) model 7 4.1 Example 1.................................... 8 4. Example.................................... 9 4.3 Example 3.................................... 10 5 Estimating an AR(p)model 11 6 Simulating AR(p) models 13 6.1 Example 4:................................... 13 7 Partial Autocorrelation Function 14 1

1 Loading data to EViews In this review session, we will be working with data on U.S. Treasuries (T-bills). The data is saved as Tbills.xlson the webpage. Before analyzing the data, we will briefly go over how to set-up an EViews session and to load data into an EViews workfile. Remember that a lot of things in EViews can be done either through the drop-down menus at the top of the EViews window or through commands in the command line (which you can then save for future use in a program). Where applicable, I will try to provide both the menu paths and the command line prompts. 1.1 Using menus to create an empty workfile: Step 1. Open Eviews. Notice that there is no blank document for you to start your work in. Instead, what you see is the command pane at the top of the window. Step. To create a new workfile, use the menu to choose File/New/Workfile... Step 3. Once you have the Workfile Create dialog box displayed, choose Dated-regular frequency from the Workfile structure type dialog box and Monthly from the Frequency dialog box, since the T-bill data we will be using has regular (i.e. no observations skipped), monthly observations. Also, input the start date (198m1) and end date (009m11) into the Start date and End date dialog boxes. Step 4. If you like, you can specify a name for the workfile in the WF box. 1. Using command panel to create an empty workfile: Step 1. Open Eviews. Notice that there is no blank document for you to start your work in. Instead, what you see is the command pane at the top of the window. Step. To create a new workfile with monthly observations, type: wfcreate m 198m1 009m11 1.3 Using the Excel file to create a workfile: Step 1. Open Eviews. Step. To load an Excel file as a new workfile, use the menu to choose File/Open/Foreign Data as Workfile and point to the Tbills.xls file. Step 3. EViews analyzes the excel file and opens a Spreadsheet read dialog box. Most of the time, you should be able to just click on the Finish button and the data

will be properly imported. EViews will also generally recognize that the date column in the Excel file should be used to identify the different data points. Time Series Data and the Autocorrelation Function Time-series data are a collection of observations gathered over time. To plot the T-bill data we imported, select the imported series and choose View/Graph from the pulldown menu. This brings up the Graph Options dialog box. To create the simple line graph below, click the OK button. Figure 1: Time-series evolution of monthly T-bill rates 16 Yields on T-bills 14 1 10 8 6 4 0 8 84 86 88 90 9 94 96 98 00 0 04 06 08 6m rate 5y rate 1y rate 3m rate Question 1. Does this look i.i.d? Recall that it s not always easy to just look at a time-series plot and say whether or not the series is independent. Saying that the Y t series is independent means that knowing previous values does not help you to predict the next value. To summarize all 3

of the plots of Y versus lagged Y s, we compute the correlations between Y t and Y t L for L = 1,, 3,.... These correlations between Y and lagged values of Y are called autocorrelations. The autocorrelation function (or acf), given any lag value L, simply returns the autocorrelation for lag L. Lets revisit our dataset which contains monthly yields for treasury bills and construct the respective autocorrelation function for the 3- month T-bill rate, the first series in our file. To create the graph below, open the series corresponding to the yield on the 3-month T-bill and, from the drop down menu, select View/Correlogram. This displays the Correlogram Specification dialog box. Select level in the Correlogram of: drop-down menu and enter 0 in the Lag Specification: lags to include box. Figure : 3-month T-bill yield correlogram 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0. 0.1 4 6 8 10 1 14 16 18 0 Side Note: EViews considers a correlogram to be a table. When you save the correlogram, EViews converts the bars in the plots of the autocorrelation and partial autocorrelation into stars. To create a graph with the autocorrelation function (or partial autocorrelation function), select the appropriate (numeric) columns inside the correlogram, copy and then right click in the blank space in the EViews window to paste. This will create a new workfile with the autocorrelation values stored as series. You can then proceed to graph them as usual. Question. What does the ACF plot suggest? Question 3. How many lags am I including in the ACF plot? 4

Notice that we entered 0 in the Lag Specification: lags to include box. This argument specifies the maximum number of lags to display in the plot. Notice also that the correlogram also displays the partial autocorrelation function (pacf), as well as the actual values of the acf and the pacf. The values correspond to the autocorrelation at that specific lag. For example, at lag 1, we have an autocorrelation of 0.976. Question 4. How do we deem an autocorrelation at a given lag to be significant? In our example, we can see from the top of our workfile that we have 335 observations. Thus, the cut-off point for the acf is: = T 335 0.11 Question 5. Up to which lag do we have a significant autocorrelation? Question 6. If none of the autocorrelations are significantly different from zero, what does this suggest? 3 Estimating an AR(1) model After we have constructed an ACF plot, we take a stand on whether we have dependence in our time series dataset. Once weve decided that observations are not independent over time, we model this dependence with a time series model. In this section, we consider a simple time-series model known as the AR(1) model. AR stands for autoregressive. Formally the model is given by: (3.1) Y t = β 0 + β 1 Y t 1 + ϵ t ; ϵ i.i.d. N(0, σ ). Question 7. What does this model say about the evolution of Y over time? Question 8. Which part of Y depends on the past? Question 9. Which part of Y is not predictable from the past? The EViews computing environment provides a wide array of commands for the modeling of time series data. In this session, we aim to provide techniques in simulating, estimating, and forecasting the class of AR models. We begin by estimating an AR(1) specification for the 3-month T-bill data we imported above. The easiest way to estimate an AR(1) model in EViews is to type: ls yield3m c ar(1) in the command window. The components in the above formula are: 5

ls: tells EViews that we want to estimate a least-squares (ls) regression yield3m: the dependent variable in the regression. For our example, I m using the yield on 3-month T-bills, which I ve named yield3m in my workfile c: tells EViews to estimate a constant in the regression After the constant, we list the independent variables. In this case, since we are interested in estimating an AR(1) model, we only include the AR(1) term, ar(1). The results of the regression are shown in the Table below. Side Note: As with the Correlogram, the estimated coefficients and the regression statistics are treated as tables in the EViews environment. If you are using Word to create your text documents, you can save the table as a.csv file and then just import it into Word. Table 1: Estimated coefficients and regression statistics for the AR(1) model of the 3- month T-bill yield. Variable Coefficient Std. Error t-statistic Prob. C.37633 1.78911 1.30554 0.196 AR(1) 0.98613 0.00688 156.8343 0.0000 R-squared 0.98668 Mean dependent var 5.08395 Adjusted R-squared 0.98664 S.D. dependent var.717580 S.E. of regression 0.314089 Akaike info criterio 0.57687 Sum squared resid 3.7535 Schwarz criterion 0.550508 Log likelihood -86.1369 Hannan-Quinn criter. 0.536786 F-statistic 4596.99 Durbin-Watson stat 1.174007 Prob(F-statistic) 0.000000 Inverted AR Roots.99 Question 10. What is the standard error corresponding to the intercept? Question 11. What is the standard error corresponding to the autoregressive coefficient? Question 1. What is the intercept measuring here? Question 13. How do we write out the final model? Notice that EViews automatically extracts the residuals for you into the series resid. Unfortunately, this series is updated every time you run a regression. The solution is to save the residuals you want as separate series. For example, we can save the regression coefficients for the 3-month T-bill rate by typing: 6

series res3m=resid in the command window. This tells EViews to create a new series called res3m and to assign to it the values stored in the series resid. The plot of the residuals is below (Fig. 3). Figure 3: AR(1) residuals 1 0-1 - -3 8 84 86 88 90 9 94 96 98 00 0 04 06 08 Question 14. Having estimated an AR(1) model, why do we check the residuals for dependence? We can construct a correlogram of the residuals following the same steps as above. Question 15. What does the ACF plot of the residuals suggest? Question 16. Is an AR(1) model a good model? Question 17. For an AR(1) model, what happens if β 1 = 1? Question 18. For an AR(1) model, what happens if β 1 > 1? 4 Simulating an AR(1) model For these exercises, open a new page in the EViews workfile and choose Unstructured/Undated from the Workfile structure type pull-down menu. In the Observations: box, enter 1000. 7

Figure 4: Correlogram of AR(1) residuals.4.3..1.0 -.1 -. 4 6 8 10 1 14 16 18 0 4.1 Example 1 Suppose we want to simulate 1000 observations from an AR(1) model with lag parameter 0.9. Specifically, we aim to simulate from the following AR (1) model: y t = 0.9y t 1 + ϵ t ; ϵ t i.i.d. N(0, 1). To simulate this in EViews, enter the following commands in the command window: smpl @all series example1=0 smpl @first+1 @last example1=0.9*example1(-1)+nrnd The explanation for these commands is as follows: smpl @all: this tells EViews that you will be working with the full sample in the page (until otherwise specified) series example1=0: this creates a new series object in EViews with the name example1 and assigns 0 to each entry smpl @first+1 @last: define the sample to start at the second observation 8

example1=0.9*example1(-1)+nrnd: example1(-1): takes the observations in example1, lagged by one observation nrnd: creates draws from a standard normal The simulated series is presented in Fig. 5. Figure 5: Simulated path of y t = 0.9y t 1 + ϵ t 8 6 4 0 - -4-6 -8 100 00 300 400 500 600 700 800 900 1000 Question 19. What is the unconditional mean? 4. Example Suppose now we want to simulate 1000 observations from an AR(1) model with lag parameter -0.9. Specifically, we aim to simulate from the following AR (1) model: y t = 0.9y t 1 + ϵ t ; ϵ t i.i.d. N(0, 1). To simulate this in EViews, enter the following commands in the command window: smpl @all series example=0 smpl @first+1 @last example=-0.9*example(-1)+nrnd 9

Figure 6: Simulated path of y t = 0.9y t 1 + ϵ t 8 6 4 0 - -4-6 -8 100 00 300 400 500 600 700 800 900 1000 The simulated series is presented in Fig. 6. Question 0. How does this compare with the previous simulated model? Question 1. How can we see the difference besides the time series plots? 4.3 Example 3 Suppose now we want to simulate 1000 observations from an AR(1) model with lag parameter 0.75 and intercept 0.5. Specifically, we aim to simulate from the following AR (1) model: y t = 0.5 + 0.75y t 1 + ϵ t ; ϵ t i.i.d. N(0, 1). To simulate this in EViews, enter the following commands in the command window: smpl @all series example3=0 smpl @first+1 @last example3=0.5+0.75*example3(-1)+nrnd The simulated series is presented in Fig. 7. Question. What is the unconditional mean? Question 3. How can we check the variance of the innovation terms? 10

Figure 7: Simulated path of y t = 0.5 + 0.75y t 1 + ϵ t 8 6 4 0 - -4 100 00 300 400 500 600 700 800 900 1000 5 Estimating an AR(p)model Recall that if the AR(1) model doesnt capture the dependence in the data, you can try a multiple regression with higher lags of Y thrown in: (5.1) Y t = β 0 + β 1 Y t 1 +... + β p Y t p + ϵ t ; ϵ t i.i.d. N(0, σ ). This model is called an autoregressive model of order p. Question 4. What does this model say about the evolution of Y over time? Question 5. Which part of Y depends on the past? Question 6. Which part of Y is not predictable from the past? Let s revisit our 3-month T-bill yield series and estimate a higher order AR model. In particular, we will estimate an AR(6) model using the command: ls yield3m c ar(1) ar() ar(3) ar(4) ar(5) ar(6) The table below presents the estimation results. Question 7. What are the standard errors for our estimates? 11

Table : Estimated coefficients and regression statistics for the AR(6) model of the 3- month T-bill yield. Variable Coefficient Std. Error t-statistic Prob. C 3.876576 0.9574 4.048973 0.0001 AR(1) 1.5388 0.054748 7.8388 0.0000 AR() -0.76549 0.09843-7.395444 0.0000 AR(3) 0.319759 0.10648 3.115090 0.000 AR(4) -0.11134 0.098504-1.9737 0.197 AR(5) 0.036748 0.087550 0.419740 0.6750 AR(6) -0.048737 0.049330-0.987977 0.339 R-squared 0.989810 Mean dependent var 4.958419 Adjusted R-squared 0.98960 S.D. dependent var.53789 S.E. of regression 0.58508 Akaike info criterion 0.15370 Sum squared resid 1.51817 Schwarz criterion 0.34037 Log likelihood -18.194 Hannan-Quinn criter. 0.185490 F-statistic 51.75 Durbin-Watson stat 1.7675 Prob(F-statistic) 0.000000 Inverted AR Roots.96.76.18.54i.18 +.54i.8 +.36i.8.36i Question 8. What is our estimate of σ? Question 9. How do we write out the final model? Consider now the residuals (see Fig. 8 below). As before, EViews saved the regression residuals into the resid series. Resave these using series resar6=resid and follow the steps above to construct an acf plot. Question 30. Having estimated an AR(6) model, why do we check the residuals for dependence? Question 31. What does the ACF plot (Fig. 4 of the residuals suggest? Question 3. Is an AR(6) model a good model? Question 33. Does the AR(6) model compete with the AR(1) model? 1

Figure 8: AR(6) residuals 1.0 0.5 0.0-0.5-1.0-1.5 -.0 8 84 86 88 90 9 94 96 98 00 0 04 06 08 6 Simulating AR(p) models Similar to the AR(1) models, it is also easy to simulate AR(p) models using the lag operators and draws from the standard normal. 6.1 Example 4: Lets simulate 1000 observations from an AR() model with lag parameters 0.75 and 0.1 with intercept 0.5. Specifically, we aim to simulate from the following AR() model: To simulate this in EViews, type: y t = 0.5 + 0.75y t 1 + 0.1y t + ϵ t ; ϵ t i.i.d. N(0, 1). smpl @all series example4=0 smpl @first+ @last example4=0.5+0.75*example4(-1)+0.1*example4(-)+nrnd Notice that, since we are simulating an AR() model, we start the sample at the third observation when simulating. The simulated series is presented in Fig. 10. Question 34. What is the unconditional mean? Question 35. How can we check the variance of the innovation terms? 13

Figure 9: Correlogram of AR(6) residuals.15.10.05.00 -.05 -.10 -.15 4 6 8 10 1 14 16 18 0 7 Partial Autocorrelation Function The partial autocorrelation function (PACF) is one more useful tool for model selection, in the sense of figuring out how many lags to include in the model. The j th partial autocorrelation is the j th regression coefficient in a regression of y t on y t 1, y t,,y t j. At the same time that EViews constructs the ACF for a variable, it also constructs the PACF. The PACF for the yield on the 3-month T-bill is below (Fig. 11). Question 36. What does the PACF plot suggest? Question 37. Suppose that the true time series process for the yield on the 3-month T-bill was an AR(1) process, what should the PACF look like? Why? Question 38. When would we reject the null that the jth PAC is zero? Question 39. What behavior does the ACF for an AR(p) model exhibit? Question 40. What behavior does the PACF for an AR(p) model exhibit? 14

Figure 10: Simulated path of y t = 0.5 + 0.75y t 1 + 0.1y t + ϵ t 10 8 6 4 0-100 00 300 400 500 600 700 800 900 1000 Figure 11: Partial Autocorrelation Function for the 3-month T-bill yield 1.0 0.8 0.6 0.4 0. 0.0-0. -0.4 4 6 8 10 1 14 16 18 0 15