39 Workshop Activities
In this workshop, we will apply the concepts of AR(1) processes, shock propagation, mean reversion, and ACF analysis through a series of exercises. These exercises will help you understand how to simulate time series data, interpret patterns, and analyse relationships between interacting systems.
Exercise 1: AR(1) Simulation
Consider a system where current conditions depend on recent past conditions, such as temperature or traffic congestion.
If this were traffic flow, what would \(\phi = 0.6\) suggest about congestion?
Simulate an AR(1) process of length \(n=200\) with \(\phi = 0.6\) and \(\varepsilon_t \sim N(0, 1)\). Plot the simulated time series and its autocorrelation function (ACF). Describe the observed patterns in the time series and ACF.
Repeat part (a) for \(\phi = 0, 0.5, 0.9, -0.7\). Plot all four time series in one figure. Which series looks closest to white noise? Which shows the strongest persistence? Which shows oscillation? How does increasing \(|\phi|\) affect smoothness and persistence?
Exercise 2: Shock propagation in AR(1)
Suppose a sudden event occurs (e.g., traffic accident or system disruption) that temporarily increases congestion.
In traffic flow context, what does the persistence of the shock represent?
Simulate an AR(1) process with \(\phi = 0.8\) and \(\varepsilon_t \sim N(0, 1)\) for \(n=100\). Introduce a shock of magnitude 5 at time \(t=50\) (i.e., set \(Z_{50} = Z_{50} + 5\)). Plot the time series and describe how the shock propagates through time. How long does it take for the effect of the shock to diminish? Does the shock disappear immediately or gradually? How does the value of \(\phi\) affect the speed of shock dissipation?
Exercise 3: Mean Reversion in AR(1)
Many systems tend to return to a normal level after extreme events, such as prices, temperature, or queue length.
What does mean reversion represent in the context of stock prices, temperature, or queue length?
Simulate an AR(1) process with \(\phi = 0.5\) and \(\varepsilon_t \sim N(0, 1)\) for \(n=100\) with initial value \(Z_1 = 20\). Plot the time series and describe the mean-reverting behaviour. How does the process return to its mean after a deviation?
Simulate the same AR(1) process but with \(\phi = 0.5, 0.9, 1\) and \(1.05\). Compare the mean-reverting behaviour with the previous case. Which process shows stronger mean reversion? How does increasing \(\phi\) affect the speed of mean reversion?
Exercise 4: ACF and Diagnostic Plots
The ACF is commonly used in practice to detect patterns in time series data, such as traffic flow, temperature, and financial returns.
If you observe slow decay in ACF, what does that suggest about the system?
For \(\phi = 0.5\) and \(\phi = 0.9\), simulate AR(1) processes and plot the time series and ACF. Which ACF decays faster? How does this relate to the value of \(\phi\)? What would you expect the ACF to look like for \(\phi = 0\) and \(\phi = 1\)?
Exercise 5: VAR(1) Simulation
Consider two interacting systems, such as:
- energy consumption and production,
- traffic flow on two connected roads,
- inflation and interest rates.
How does a change in one system affect the other over time? What does the coefficient matrix \(\Phi\) represent in this context?
Consider a bivariate VAR(1) process with coefficient matrix \(\Phi = \begin{bmatrix} 0.5 & 0.2 \\ 0.1 & 0.4 \end{bmatrix}\) and \(\varepsilon_t \sim N(0, I)\). Is the process stable?
Simulate a bivariate VAR(1) process with coefficient matrix and \(\varepsilon\) given in part (b). Plot the two time series and their cross-correlation function (CCF). Describe the observed relationships between the two series.