Econometrics & Business Worksheet

Applications of EconometricsTutorial Sheet 4
Unit Roots
1. How would you test whether the following model has a unit root? Would this change if the model
contained a time trend?
yt = α + ρyt−1 + et , t = 1, 2, …,
Solution: Because there are multiple ways for the above model to be a stable AR(1) process (ρ =
0.2, ρ = 0.4, ρ = 0.57, …), and only one way for it to be a I(1) process (ρ = 1), it makes sense to
think about the null hypothesis as H0 : ρ = 1 and the alternative hypothesis as H1 : ρ < 1. If the equation is transformed by subtracting yt−1 from both sides, ∆yt = α + θyt−1 + et , then this test can be carried out on θ instead of ρ where θ = ρ − 1. In this model the null hypothesis is now θ = 0 and the alternative hypothesis is θ < 0. Because under the null hypothesis yt is I(1) the series is not weakly dependent and the test statistics will not be standard normally distributed. This means the normal critical values will not apply. We need to use critical values from a distribution known as a Dickey-Fuller distribution (this test is also known as a Dickey-Fuller (DF) test). These values can be found in the textbook. If the model contained a time trend we would have to amend the test. The critical values for the model with a time trend are larger in magnitude (more negative) than the critical values for the test without a time trend. This is because time series which are trend stationary (they have a linear trend but are I(0) around the trend) can appear as if they have a unit root. 2. How would you test whether the following model has a unit root? yt = α + ρ1 yt−1 + ρ2 yt−2 + et , t = 1, 2, ..., Solution: First, add and subtract ρ2 yt−1 from the equation yt = α + ρ1 yt−1 + ρ2 yt−2 + et + ρ2 yt−1 − ρ2 yt−1 = α + (ρ1 + ρ2 )yt−1 − ρ2 (yt−1 − yt−2 ) + et Now you can subtract yt−1 from both sides of the equation yt − yt−1 = α + (ρ1 + ρ2 )yt−1 − ρ2 (yt−1 − yt−2 ) + et − yt−1 ∆yt = α + (ρ1 + ρ2 − 1)yt−1 − ρ2 ∆yt−1 + et ∆yt = α + θyt−1 + γ∆yt−1 + et Here θ = ρ1 + ρ2 − 1 and γ = −ρ2 . Testing θ = 0 is the same as testing that ρ1 + ρ2 = 1 which is the requirement for a unit root in an AR(2) model. Here the null hypothesis, H0 : θ = 0, is that there is a unit root in the AR(2) model. The alternative hypothesis, H1 : θ < 0, is that it is a stable AR(2) process. 3. What is the name of the problem that occurs when two independent I(1) processes are used in a regression together? Solution: This is known as a spurious regression. The reason for this is that even though the series are independent, and we should expect to find estimates of β1 close to zero, we will end up rejecting the null hypothesis of no effect (H0 : β1 = 0) far more than 5% of the time. The reason for this is that if an I(1) series yt is regressed on another I(1) series xt the errors in the following equation, yt = β0 + β1 xt + et must follow a random walk under H0 : β1 = 0. This violates the Gauss-Markov assumptions we used from Chapter 11. Cointegration 4. What does it mean for two variables to be cointegrated? Solution: If yt and xt are two I(1) processes then in general yt − βxt will also be an I(1) process for any number β. Nevertheless, it is possible that for some β 6= 0, yt − βxt is an I(0) process. If such a β exists, we say that y and x are cointegrated, and we call β the cointegration parameter. Why is it useful to know this? Well, if two variables are cointegrated, then they have a long run relationship. A good example of this is the interest rate on U.S. treasury bills. Treasury bills are securities which are sold at maturity lengths of 1-month, 3-months, 6-months, and 12-months with a promise to pay a face value amount (typically $100) at maturity. They are sold at less than face value to create a positive return to those who hold them. For example, if you pay $90 for a 3-month treasury bill, the interest rate is 100−90 = 0.11 = 11%. We saw in Tutorial 2 that the 90 interest rate on 3-month treasury bills was I(1). The same also goes for 6-month treasury bills. Because of the longer maturity on 6-month treasury bills they pay a higher return. This difference in returns between a 3-month treasury bill and 6-month treasury bill is known as the yield spread. However, this difference would not be expected to grow or shrink over time due to arbitrage. While the difference between them will change over time it is more likely that it fluctuates around a mean. Econometrically, this can be represented as r6t = r3t + µ + et Page 2 where et is a zero mean, I(0) process. At any time period, there can be deviations from equilibrium, but they will be temporary: there are economic forces that drive r6 and r3 back toward the equilibrium relationship. This is the application exercise at the end of the tutorial. Also, if we know that two series are cointegrated we can test hypotheses about the cointegration parameter (using a leads and lags estimator) and we can use the cointegrated variables as additional explanatory variables when examining short run dynamics (in an error correction model). 5. How do you test for cointegration? Solution: Before testing for cointegration you should have some idea that both series are I(1). This can be done by examining the series’ autocorrelation coefficients and performing DF tests on them. To test for cointegration we perform a DF test on the residuals of the following regression, yt = α + βxt + ut , since ut = yt − α − βxt is supposed to be I(0) for yt and xt to be cointegrated. The null hypothesis, that there is a unit root, means that yt and xt are not cointegrated. If we reject the null hypothesis then we find that yt and xt are cointegrated. Because we have to take into account the estimation of β in this method this test is called an Engle-Granger test and uses different critical values from the traditional DF test. 6. When yt and xt are cointegrated in the following equation yt = α + βxt + ut , OLS produces consistent estimates of α̂ and β̂. However, because xt is I(1), we cannot use the traditional inference techniques to test hypotheses about β as the estimator won’t have a normal distribution, even asymptotically. However, if we are willing to make the assumption that xt is strictly exogenous, then the estimators will be normally distributed provided that the errors are homoskedastic, serially uncorrelated, and normally distributed, conditional on the explanatory variables (see Time Series assumptions from Tutorial 1 for a review). How would you go about improving the model to try and ensure that xt is strictly exogenous? Solution: The solution to this is the leads and lags estimator of β. We construct a new set of errors which are, at least approximately, strictly exogenous. However, because xt is I(1), we need these new error terms to be strictly exogenous with regards to ∆xt (remember that xt being I(1) means it takes a form similar to xt = xt−1 + vt ). This can be achieved by writing ut as a function of the ∆xs for all s close to t. For example, ut = η + φ0 ∆xt + φ1 ∆xt−1 + φ2 ∆xt−2 + γ1 ∆xt+1 + γ2 ∆xt+2 + et where, by construction, et is uncorrelated with each ∆xs appearing in the equation. The hope is that et is uncorrelated with further lags and leads of ∆xs . We know that, as |s − t| gets large, the correlation between et and ∆xs approaches zero, because these are I(0) processes. Now, if we plug this into the original equation we get yt = (α + η) + βxt + φ0 ∆xt + φ1 ∆xt−1 + φ2 ∆xt−2 + γ1 ∆xt+1 + γ2 ∆xt+2 + et This equation looks a bit strange because future ∆xs appear with both current and lagged ∆xt . The key is that the coefficient on xt is still β, and, by construction, xt is now strictly exogenous in Page 3 this equation. As an example, and a way to think about the leads and lags model conceptually, imagine we are interested in examining the following model: M urderRatet = α + βP oliceP Ct + ut where M urderRatet is the murder rate in a given city at a time t, and P oliceP Ct represents the number of police per capita at time t. Imagine there is a shock in the murder rate at time t so that the murder rate increases by more than expected, given the PolicePC at time t. This shock will be captured by ut . It is quite likely that this shock may result in a change in the number of police per capita at time t + 1. Therefore, an increase in the error term at time t is correlated with ∆P oliceP Ct+1 . However, it is unlikely that this shock will feed into later changes in police per capita. In other words, as we move further away from t, we expect the correlation to tend to zero if both ∆P oliceP Ct and et are I(0). Therefore, we do not expect an increase in et to be correlated with, say, ∆P oliceP Ct+5 . This explains why we include ∆xs for s close to t. The inclusion of these terms accounts for possible ways in which the assumption that xt is strictly exogenous may be violated. 7. If yt and xt are two I(1) processes, and they are NOT cointegrated, then both of the variables can be used in a regression together when they are used in their difference form. For example, ∆yt = α0 + α1 ∆yt−1 + γ0 ∆xt + γ1 ∆xt−1 + ut However, if you knew that yt and xt were cointegrated, how could this equation be improved? Solution: If yt and xt are cointegrated with parameter β, then we have additional I(0) variables that we can include in the above equation. Let st = yt − βxt , so that st is I(0), and assume for the sake of simplicity that st has zero mean. This is known as the error correction term. Now, we can include lags of st in the equation. In the simplest case, this gives ∆yt = α0 + α1 ∆yt−1 + γ0 ∆xt + γ1 ∆xt−1 + δst−1 + ut ∆yt = α0 + α1 ∆yt−1 + γ0 ∆xt + γ1 ∆xt−1 + δ(yt−1 − βxt−1 ) + ut , where δ < 0. If yt−1 > βxt−1 , then y in the previous period has overshot the equilibrium; because
δ < 0, the error correction term works to push y back toward the equilibrium. Similarly, if yt−1 < βxt−1 , the error correction term induces a positive change in y back toward the equilibrium. This is an example of an error correction model. Page 4 Forecasting 8. What value should we choose for ft , the forecast of yt+1 at time t, in order to minimize the squared error loss function? E(e2t+1 |It ) = E[(yt+1 − ft )2 |It ] Solution: In this case we should choose ft = E(yt+1 |It ) to minimze the squared error loss function. This result is a common result in statistics: means minimize mean squared errors. Consider the following example where E(X) = µ. You would like to choose a value c which minimizes the following expression, E(X − c)2 . Start by exanding it out, and then adding and subtracting µ2 , E(X − c)2 = E(X 2 − 2Xc + c2 ) = E(X 2 − 2Xc + c2 + µ2 − µ2 ) = E(X 2 − µ2 + µ2 − 2Xc + c2 ) = E(X 2 ) − µ2 + µ2 − 2µc + c2 = V ar(X) + µ2 − 2µc + c2 = V ar(X) + (µ − c)2 So if we choose c = µ the expression collapses down to V ar(X). If c 6= µ then we are adding some positive term on to it meaning we are not minimizing it. This is why choosing ft = E(yt+1 |It ) minimizes the squared error loss function. 9. Consider the following simple forecast model with n time periods, yn = β0 + β1 yn−1 + δ1 xn−1 + un . The point forecast of yn+1 , at time n, is fˆn : fˆn = β̂0 + β̂1 yn + δ̂1 xn , where we use a hat on fn to emphasize that we have estimated the parameters used in the forecast in a regression model. How would you construct a 95% prediction interval for this point forecast? Solution: If the point forecast is fˆn then we can construct a 95% forecast interval using the traditional methods: fˆn ± 1.96 ∗ SE. However, there is an important difference to how we have done this previously. Traditionally we have added and subtracted 1.96 time the standard of the estimator. In this case that would be ±1.96 ∗ SE(fˆn ). Constructing a forecast interval is slightly different. We have to take into acccount two types of uncertainty: uncertainty arising from estimation of the regression coefficients and uncertainty associated with the future unknown value of un+1 , the regression error. For regressions with few coefficients and many observations, the uncertainty arising from future un+1 can be much larger than the uncertainty associated with estimation of the parameters. In general, however, both sources of uncertainty are important, so we now develop an expression for the root mean squared error that incorporates these two sources of uncertainty. The forecast error - which we will not know until time n + 1 - is ên+1 = yn+1 − fˆn Page 5 The standard error of ên+1 , which is what we would like to construct our prediction interval with, is an estimator of what is called the root mean squared forecast error (RMSFE). This can be found by taking the square root of the variance of ên+1 , the mean squared forecast error E(ê2n+1 ). Var(ên+1 ) = Var(yn+1 − fˆn ) = Var(β0 + β1 yn + δ1 xn + un+1 − fˆn ) As we are examining the variance conditional on In , we can treat the β0 + β1 yn + δ1 xn as constant: = Var(un+1 − fˆn ) We can re-write the variance of the sum as the sum of the variance as un+1 and fˆn are independent. They are independent because the estimators in fˆn depend only on previous error terms and not on un+1 . Therefore, the variance of the difference is the sum of the variances. = Var(un+1 ) + Var(fˆn ) If we find values for the two terms on the right hand side then we can calculate our standard error. The first term is relatively straight forward. We can estimate this from the residuals in the model using the following formula P 2 n ûn σ̂ 2 = . n−k−1 where k is the number of explanatory variables in the model. The second term is more complicated. We first need to calculate the SE(fˆn ) and then square it to get the variance of fˆn . Now we write fn as β0 = fn − β1 yn − δ1 xn and plug it into the original regression equation to get yt = fn + β1 (yt−1 − yn ) + δ1 (xt−1 − xn ) + ut . Note how I switched notation from n to t. This is to illustrate that we need to subtract the value of yn and xn (where n is the most recent time period we have) from each yt−1 and xt−1 that we will be using as part of the regression. Estimating this regression will give a standard error for the constant term which is the standard error of fˆn . Plug both of these values into the above formula and then take the square root. q q p SE(ên+1 ) = Var(ên+1 ) = Var(un+1 ) + Var(fˆn ) = σ̂ 2 + SE(fˆn )2 The 95% prediction interval is then fˆn ± 1.96 ∗ SE(ên+1 ) 10. What is an example of in-sample criteria when choosing between different forecast methods? What about out-of-sample criteria? Which do you think is most important? Solution: In a regression context, in-sample criteria include R-squared and especially adjusted Rsquared. Out-of-sample criteria revolve around splitting your sample into an estimation sample and a forecasting sample and finding different ways of minimizing the forecast errors. Some examples of this are the root mean squared error which is essentially the sample standard deviation of the forecast errors (without any degrees of freedom adjustment) and the mean absolute error which is the average of the absolute forecast errors. For forecasting, it is better to use out-of-sample criteria, as forecasting is essentially an out-of- sample problem. Page 6 Application 11. The following link brings you to the FRED website with monthly interest rate data for 3-month T-bills and 6-month T-bills for 1959 onwards. https://fred.stlouisfed.org/graph/?id=TB3MS,TB6MS Both series appear to follow random walks. However what do you notice about the random walks? Download the data in Excel or csv format format (1959+) and load it into Stata and confirm that each series follows a random walk but that the difference between the series is I(0). Solution: Despite the fact that both series appear to follow random walks they follow the same path. This means that the difference between them is the same throughout the whole time series and follows an I(0) process. The solution to question 4 should explain the economic theory behind why we expect both of these series to get cointegrated but this offers you the chance to download the data and prove it for yourself. Autoregressions and DF tests should confirm both of the series display unit root behavior. To test for cointegration you can use the ‘egranger’ command for Stata, though you have to download it. Once you do though, executing ‘egranger tb6ms tb3ms’ should confirm that the series are cointegrated. . ssc install egranger checking egranger consistency and verifying not already installed... all files already exist and are up to date. . import delimited using "fredgraph.csv", clear (3 vars, 745 obs) . g monthly_date = mofd(date(date,"YMD")) . format %tm monthly_date . tsset monthly_date time variable: delta: monthly_date, 1959m1 to 2021m1 1 month Page 7 . egranger tb6ms tb3ms Engle-Granger test for cointegration N (1st step) = 745 N (test) = 744 -----------------------------------------------------------------------------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -8.376 -3.911 -3.344 -3.050 Critical values from MacKinnon (1990, 2010) Page 8

Don't use plagiarized sources. Get Your Custom Essay on
Econometrics & Business Worksheet
Just from $13/Page
Order Essay
Achiever Essays
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.

Live Chat+1(978) 822-0999EmailWhatsApp

Order your essay today and save 20% with the discount code RESEARCH

slot online