Write a report suitable for sharing with your CIO on the relationship between Gold, Inflation, and Interest rates in the U.S. Use monthly data from January 01, 2005 - January 01, 2019 with the following variables:
Gold: Monthly log returns generated from the close price of the ETF “SPDR Gold Shares”
Inflation: Monthly rate of change of Consumer Price
Index for All Urban Consumers: All Items in U.S. City Average
Interest Rates: Change in Market Yield on U.S. Treasury Securities at 2-Year Constant Maturity, Quoted on an Investment Basis
Include the following in your report alongside brief,
relevant discussion:
1. A full
description of your final data sample (after any transformations). This
includes # of observations, of missing values, mean, median, standard
deviation, skewness, and kurtosis
-Discuss any important
statistical properties and include a discussion of any evident
departures from normality and any implications of those departures for
an investor
2. Generate a time series plot of each
variable of interest and describe any interesting patterns, trends, or
“stories” behind the plot. (i.e. what was the narrative in the real
world about the evolution of these variables over time?)
-Include
proper plot labels, titles, captions, and sources
3. Run the following regressions, output regression
tables, and discuss the relationships you find including a discussion of
statistical significance: - Gold vs Inflation - Gold vs Interest Rates
- Inflation vs Interest Rates - Gold vs Interest Rates and
Inflation
4. Discuss whether the regression of
Gold on both interest rates and inflation (d) is a better model than the
regression of gold on interest rates (b) and gold on inflation (a)
individually.
5. Evaluate the Gold vs Interest
Rate and Inflation regression (d) in part 3 for violations of the
assumptions of OLS and identify any issues regarding: -
Heteroskedasticity - Autocorrelation/Serial Correlation - Normality of
Residuals (Q-Q plot, Histogram, and a formal test) - Include a
discussion of how any issues may affect your results.
6. If there are problems identified in part 5 that
should be addressed, re-run the regression of Gold on Interest Rates and
Inflation with appropriate corrections.
7. One of
the more difficult to evaluate assumptions of OLS is exogeneity. Do you
think the regression of Gold on Inflation and Interest rates is likely
to violate this assumption and why?
8. End with a
brief (2-3 sentence) conclusion on the use of Gold as an inflation hedge
in the current environment and any suggested next steps.
Gold: Monthly log returns generated from the close price of the ETF “SPDR Gold Shares”
df<-tidyquant::tq_get(x=c("GLD"), #GLD is the ticker
get="stock.prices", #stock.prices >tq_get >Yahoo Finance
from ="2005-01-01",
to= "2018-12-31") %>%
tq_transmute(select = close, mutate_fun = to.monthly,indexAt = "firstof") # Note, the data we get daily, we have to transmute the data to monthly and first day of the month...
# "lastof" would take from the last day
df <- df %>%
mutate(Gold_Log_Return = c(NA, diff(log(df$close))))
df %>%
ggplot(aes(date, Gold_Log_Return)) +
geom_line(size = 1) +
labs(title = "Close Price and Gold Log Return Over Time",
x = "Date",
y = "Gold_Log_Return") +
theme(plot.title.position = 'plot',
plot.title = element_text(hjust = 0.5))+
theme_minimal()