Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECMT 674:  Economic Forecasting

Assignment  7; Due Date:  Friday, April 7, 2023 (by midnight,  11:59pm)

For this assignment, you must write code in R. Please submit the code so I can run it on my computer without any error messages or warnings.  Please avoid static file references.  The R script has to be well documented and have your name(s) written at the beginning of the file. You can also use RMarkdown; it is your choice.  This assignment is a group assignment that can be accomplished in teams of at most two members.  Please acknowledge all the collaborations.  Submit the R script or RMarkdown file, supporting files such as an Excel data file if you used one, and a report with your figures and results.

In this assignment, we would like to use the slope of a yield curve measured by the difference between long-term and short-term interest rates to predict real GDP growth in the US. You are free to choose the measures of long-term and short-term interest rates. You can read more on the yield curve here. You can read more on various measures of term spread here. Broadly, your work should follow this outline:

1. Read in real GDP growth for the US. Choose a measure of spread. It could be the difference between a 10-Year Treasury Bond yield and a 2-Year Treasury Bond yield or some other measure.  Take the longest possible sample and plot the data.

2. Estimate a simple linear regression model of quarterly annualized real GDP growth (in percent) and term spread.   Use various lags of term spread  (consider up to 8 lags) to come up with the best specification, i.e., which lag of the spread has the “most” predictive content.  Comment on how you select the“best” specification.

3. Summarize the output of the best specification in statistical and economic terms. Be careful about the units of measure.

4. Comment on the in-sample fit of the best specification.   Plot the fitted values against the actual realizations of the real GDP growth.

5. If you were to use the“best”model estimated roughly ten years ago, how well would it do in forecasting? How well would a sample mean forecast real GDP growth over the past ten years?  Which forecast would be better on average?  Is the difference between the predictive ability of the two predictions statistically significant?

6. Given the setup in the previous point, if you have to evaluate the models until the end of 2019, what would you say? Which forecast would be better, the one coming from the model with the term spread or the forecast based on the sample mean? Explain.