Example of time series with constant variance+expected values but time-dependent covariance I just started to learn about time series analysis and I want to understand stationarity. (Weak) Stationarity is defined as having constant expected values and variance and autocovariances that do not depend on time. I struggle a bit with the autocovariance. Can someone provide an example of a time series that has constant expected values as well as constant variance, but autocovariance that changes over time?
 A: A simple example of this is a stationary $\text{GAR}(1)$ process (Gaussian auto-regressive process) with a non-zero auto-regression parameter.  This model has the general form:
$$X_t = \phi X_{t-1} + \varepsilon_t
\quad \quad \quad \varepsilon_t \sim \text{IID N}(0, \sigma^2),$$
and it is stationary when $|\phi| < 1$.  If $\phi \neq 1$ then the model has non-zero autocorrelation and if $|\phi| \approx 1$ then the autocorrelation is strong.  You can easily generate random time-series from this model using the rGARMA function in the ts.extend package in R to see what this type of time-series process looks like.  Here is an example of a bunch of randomly generated time-series vectors using the parameter $\phi = 0.95$.
#Load library
library(ts.extend)

#Set parameters
phi <- 0.95

#Generate 16 random AR(1) time-series with length 100
set.seed(1)
SIMS <- rGARMA(n = 16, m = 100, ar = phi)
plot(SIMS, background = FALSE)


As you can see from the plots, there is clear auto-correlation in the time-series; values that are close together in time are strongly positively correlated.  As values become further appart in time their auto-correlation diminishes down to zero.
If you would like to learn more about stationary time-series models with non-zero auto-correlation, I recommend you start by learning about simple Gaussian AR and MA models, and then branch off to learn more generally about Gaussian ARMA models.
