预定/报价
ECON 20110/30370: Econometrics Semester 2 – Practical Session Worksheet 4
ECON 20110/30370: Econometrics Semester 2 – Practical Session Worksheet 4
yet2024-09-05 17:34:21

This practical session explores the dynamic relationship between gold and silver prices, focusing on unit root tests, spurious regressions, and Granger causality.

1    Load the Data

We will analyse the ‘GoldSilver’ dataset from the ‘AER ’ library, comprising daily spot prices for gold (per 0.1 oz) and silver (per 10 oz) from December 30, 1977, to December 31, 2012.  This multivariate dataset provides a rich basis for our exploration.

To load this dataset into R, execute the following commands:

library(AER)

data("GoldSilver")

1.1    Data Preparation

The data preparation involves log transforming the series to stabilise variance and compress the scale of the data.  This approach mitigates the disparity between small and large values, ensuring a more meaningful analysis. Furthermore, considering the extensive span of the dataset and to focus our investigation on more recent trends and dynamics between gold and silver prices, we concentrate on a subset of the data post-1990 using the window’ function.

Execute the following R code to prepare the data: