Econometrics & Integration: Money, Banking and Financial Markets
Assignment 6: Deadline 17-5-2024 18:
Hand in assignment 6 as PDF document on Brightspace, add R script in appendix
• This assignment can be made in groups of two students
• In assignment 5 you have learned to make a script-file which transforms multiple “prepared”
excel files into a panel structured R database.
• In this assignment, you will have to gather your data yourself, make a database, inspect your
variables and do a time-series regression analysis.
• You will test the determinants of monthly Stock market returns for the period January 1995 until
December 2020.
• You will all have to pick a country for which you will do this, the possible countries: Australia,
Austria, Belgium, Denmark, Finland, France, Germany, Italy, Netherlands, New Zealand, Portugal,Spain, Switzerland, United Kingdom, United States.
• The model(s) you are going to test take the following form:
• Yt = β 0 + β 1 Xt + β 2 Zt + β 3 Yt− 1 + et
• Yt = Stock market return in period t
• Xt = Variable(s) for interest rates in period t
• Zt = Variable(s) for expectations in period t
• Yt− 1 = Stock market return in period t-
• To help you out a little bit, we have added an excel file with monthly consumer and business
confidence indicators. These are index numbers (long term average=100)
• Please follow the steps of the assignment, and when finished, hand in a digital version of your
assignment on Brightspace, including your Script-file in the appendix.
• Every step in R has to be done in the Script-file, no manual work!
• Starting Phase 3, a written report is necessary
• The assignment is spread out over 2 practical R tutorials.
Assignment 6: The determinants of stock market returns Phase 1:
Phase 1: Collect the data
1: Download the zip file from Brightspace (is a compressed file)
1: In the “excel” folder you will find 1 dataset
CONFIDENCE
1: Inspect this dataset to see what you have, how it is ordered, what the names of the variables
are. If you don’t know the meaning, definition, or measurement of the variables, they all comefrom stats.oecd (see second tab excel)
1: Select and save the data you need (your selected country)
1: Now you will need to gather 3 variables for your Country and time period yourself: Share price
index, Long term interest rates & Short-term (central bank) interest rates
o Go to the OECD statistics portal: stats.oecd
o Go to “Finance”→ “Monthly financial statistics” → “Monthly monetary and financial
statistics (MEI)”.
o Use “Customize” → “Selection” to select the data you want to collect o Use
“Customize”→ “Layout” to change the layout to the Panel data structure
o Use “Export” → “Excel” to download the data
o Adapt the data in Excel to make it ready for importing into R
1 : Inspect the downloaded excel file and make it ready (hint: match structure of provided excel
file) to be used for R.
Phase 2: Build the dataset
2: Make a script file which imports the collected data into RStudio and make a
“ready to go” (as in assignment 5) database
2: Rename the variables into names that make sense to you
2: Create a Year and a Month variable to uniquely identify each monthly observation in the time
series.
2: If you think your dataset is ready, you can continue to the next phase
Phase 3: Theoretical framework and hypothesis Answer all the following questions in your own words. You are going to estimate several versions of the following equation (see also page 1 of this assignment):
Yt = β 0 + β 1 Xt + β 2 Zt + β 3 Yt− 1 + et
3: What is the purpose of this estimation? What is it aiming to test?
3: What is the theoretical model of this estimation(s)? (think about the stock market lecture from
quarter 3)
4 Generate a “autocorrelation” (acf) and “partial autocorrelation” (pacf) graph for the dependent
variable. How do you have to interpret this graph? What can you do with this information?
Phase 5: Estimation of the model OLS regression: The R command for OLS time-series regression is dynlm(). The dependent variable always goes immediately after the R command and it is followed by “~” and all independent and control variables. Please show the results of all estimations in your report in nicely formatted stargazer output including N and the adjusted R-squared.
Before running the regressions, make sure to transform your data frame to a time-series (ts) object.
Estimation 1: Estimate the following model using OLS regression: (1) Stock_market_returnt = α + β1Short_interestt + et
5 What is the purpose of this estimation? What is it aiming to test?
5 Check the output using the summary () command. What does the “Coef.” value tell you? Is
that what you expected?
5 What do the P>|t| and R-squared values tell you? Also explain what this means.
Estimation 2: Estimate the following model using OLS regression: (2) Stock_market_returnt = α + β1Long_interestt + et
5 What do the Coef and P>|t| values tell you?
Estimation 3: Estimate the following model using OLS regression: (3) Stock_market_returnt = α + β1Long_interestt + β2Short_interestt + et
5 Did the coefficients or significance for the interest rates change compared to estimation 1 and2? If so, explain why this could be. (Hint: Pairwise correlation)Use the interest rate for which the direction of the coefficient did not change in all futureestimations.
Estimation 4: Estimate the following model using OLS regression:
(4) Stock_market_returnt = α + β 1 ∆interestt + et
5 Why would we have added the ∆ in the equation? What is your interpretation of the result?
Estimation 5: Estimate the following autoregressive (AR(1)) model using OLS regression:
(5) Stock_market_returnt = α + β 1 ∆ interestt + β 2 Stock_market_returnt-1 + et
5 What is being meant with an “Autoregressive” model? Does it make sense to estimate this model in your opinion? (use the outcome of question 4)
Estimation 6: Estimate the following autoregressive (AR(1)) model using OLS regression:
(6) Stock_market_returnt = α + β 1 ∆Interestt + β 2 Stock_market_returnt- 1 + β 3 ∆Business_confidencet + β 4 ∆Consumer_confidencet + et
5 Discuss the outcome of this equation (coefficients, significance, R 2 ), show the model and
explain what this means.
5 Generate a histogram of the residuals of equation 6 to test if they are normally distributed.
Explain what this means and why it is important.
5 Subset the data by creating two new data frames and estimate equation 6 separately for
the period until December 2006 (before the “crisis”) and the period since January 2014 untilDecember 2019 (after the “crisis” and before Covid). Do you observe differences betweenthe periods? What could that mean?
Upload your digital version, as a PDF file, on Brightspace (assignments) including the script-file in your appendix. Deadline 19 - 5 - 2023 18: