Detecting the interdependence of autocorrelated sequences It is easy enough to detect interdependence of two discrete-time white noise sequences - one just takes cross-covariance and compares it with variance. But what if both time series are "non-white", that is, there's long-range autocorrelation (like two Brownian random walks)? I assume one resorts to some kind of whitening, where one can read more about this?
 A: When examining the possible cross-correlation between two white noises, we can separate and investigate distinctly whether they are "contemporaneously correlated" and/or whether they are "non-contemporaneously correlated". This is a useful distinction  -knowing whether a variable "leads" or "lags" another, contrasted to them moving contemporaneously is important, especially for forecasting.
Now if we have two auto-correlated, but still covariance-stationary processes, then, as I have recently answered here, any continuous transformation/combination of them will be also stationary, and so the sample moments(time-averages) will be strongly consistent estimators of the ensemble moments(expected values):
$$\frac 1T\sum_{t=1}^{T}(X_t-\mu_x)(Y_t-\mu_y) \rightarrow_{a.s} E(X_t-\mu_x) (Y_t-\mu_y) = {Cov} (X_t,Y_t)$$
In other words, we do not need to "whiten" the processes to test for cross-correlation between them.  
The problem we have here is that we cannot distinguish between contemporaneous and non-contemporaneous cross-correlation, since the two variables are functions each of their own past, but also of a current shock.
To take the standard example, assume that both processes are zero-mean $AR(1)$. Then 
since they are both stationary, they have an $MA(\infty)$ representation, so 
$${Cov} (X_t,Y_t) = E\Big (\psi(L)\varepsilon_t\cdot \phi(L)u_t\Big)$$
where $\varepsilon_t,\;u_t$ are the white noise building blocks of $X_t$ and $Y_t$ and $\psi(L),\; \phi(L)$ are polynomials in the lag operator. So this covariance, apparently between the contemporaneous realizations of the two processess, will include the term (coefficient of the lag polynomials ommited) $E(\varepsilon_tu_t)$ but also products of all lags and leads like $E(\varepsilon_tu_{t-1})$, $E(\varepsilon_{t-5}u_{t-2})$ etc, and it can be non-zero because any one of them is not zero. And the same will happen if we try ${Cov} (X_t,Y_s),\; t>s$. For applied forecasting matters, we can of course compare the actual values of, say, $\hat {Cov} (X_t,Y_t)$ and $\hat {Cov} (X_t,Y_{t-1})$ and if it so happens that the second is visibly larger than the first we could say that "$Y$ leads $X$", and use this relation for our purposes - but the underlying confounding of contemporaneous and non-contemporaneous cross-correlation does not go away.
ADDENDUM: A pre-whitening algorithm in the time domain
(As given in Søren Bisgaard & Murat Kulahci (2011) book "TIME SERIES ANALYSIS AND FORECASTING BY EXAMPLE", chapter 8, p. 208)
The chapter is about "Transfer Function Models"
Step 1: Fit an ARIMA model to the input $X_t$  
Step 2: Prewhiten the input series $X_t$ (i.e., compute the residuals for $X_t$)  
Step 3: Prewhiten the output series $Y_t$ using the same model fitted to the input $X_t$  
Step 4: Compute the cross correlation between the prewhitened $X_t$ ’s and $Y_t$ ’s  
Note: you can also look up prewhitening using spectral analysis.
