Mean ergodic process with non-vanishing covariance Is there an example for a WSS process $X(t)$ that is mean-ergodic but its covariance $C_X(\tau)$ does not vanish as $\tau\rightarrow\infty$?

To be precise, you are looking for a stochastic process $(X_t)_{t\in\mathbb R}$ satisfying the following conditions for all $s,t\in\mathbb R$:


*

*$\mathbb EX_t^2<\infty$

*$\mathbb EX_s=\mathbb EX_t$, call the common value $\mu$

*$\textrm{Cov}(X_s,X_t)=\textrm{Cov}(X_{s-t},X_0)$

*The random variables $m_T:=\lim_{T\to\infty}\frac{1}{T}\int_0^T X_t\ dt$ converge in $L^2$ to the deterministic random variable $\mu$

*$\lim_{t\to\infty}\textrm{Cov}(X_t,X_0)\not=0$
By subtracting off the mean $\mu$ everywhere we can get an equivalent question involving a slightly simpler list of conditions:


*

*$\mathbb EX_t^2<\infty$

*$\mathbb EX_t=0$

*$\mathbb EX_sX_t=\mathbb EX_{s-t}X_0$

*$\lim_{T\to\infty}\frac{1}{T^2}\mathbb E\Bigl(\int_0^T X_t\ dt\Bigr)^2=0$

*$\lim_{t\to\infty}\mathbb EX_tX_0\not=0$
Consider condition 4., which can be expanded as follows:
$$
\lim_{T\to\infty}\frac{1}{T^2}\int_0^T\int_0^T \mathbb EX_sX_t\ ds\ dt=0.
$$
Thus the question becomes fully deterministic after introducing the function $c(s,t)=\mathbb EX_sX_t$. In terms of this function, we are trying to satisfy $c(s,t)=c(s-t,0)$ and 
$$
\lim_{T\to\infty}\frac{1}{T^2}\int_0^T\int_0^Tc(s,t)\ ds\ dt=0,
$$
while simultaneously having $c(s,0)$ not tending to zero as $s\to\infty$.
By changing variables in the inner integral to $u=s-t$ we find that
$$
\int_0^T\int_0^Tc(s,t)\ ds\ dt=\int_0^T\int_0^Tc(s-t,0)\ ds\ dt=\int_0^T\int_{-t}^{T-t}c(u,0)\ du\ dt,
$$
so our condition on $c(u,0)$ is that its sliding averages average out to $0$ in the limit. Any sufficiently oscillatory function will have this property, while not tending to zero. For instance, let $c(s,t)=\cos(s-t)$. There are even libraries that have a built-in capability to simulate a stochastic process that has this kernel.
