Trend stationary and difference stationary simultaneously Can a time series be both trend stationary and difference stationary at the same time? In this situation how do we approach the problem?
 A: It certainly is possible that we may have a process that has both a deterministic time trend and a unit root, for example:
$$y_t = \delta t + y_{t-1} + u_t \tag{1}$$
with $u_t$ being white noise, $u_t \sim WN(0, \sigma^2_u)$.
To achieve second-order stationarity in the above case, we first subtract the first lag from both sides (and we do not apply the Diferrence operator on both sides), so we get
$$\Delta y_t = \delta t  + u_t \tag{2}$$
(NOTE: that if we have applied the first-diference operator in the first step instead of just subtracting $y_{t-1}$ from both sides we would obtain the expression
$$\Delta y_t = \Delta\delta t + \Delta y_{t-1} + \Delta u_t = \delta + \Delta y_{t-1} + (u_t-u_{t-1}) \tag{3}$$
which may remove the deterministic time trend but it leaves us with a unit root in first-differences and introduces an MA term complicating matters. So this approach is to be avoided.)  
After obtaining $(2)$ (which does not involve estimation) one can visually check whether the series appears to contain a deterministic time trend. If it does, we then de-trend by estimating the $\delta$ coefficient and use the residuals from this estimation step as our second-order stationary series... which, strictly speaking, it is not second-order stationary, due to the fact that we have to estimate $\delta$. But the deviation from stationarity is bearable.
Assume we do it by applying OLS to $(2)$ with a sample of size $T$. Then we will get
$$\hat \delta = \delta + \sum_{s=1}^T\left(\frac{s}{\sum_{s=1}^T s^2}\right)u_s$$
and the residual series will be
$$\hat u_t = u_t - t\cdot  \frac {\sum_{s=1}^Tsu_s}{\sum_{s=1}^Ts^2} = \left (1-\frac {t^2}{\sum_{s=1}^Ts^2}\right)u_t - t\cdot  \frac {\sum_{s\neq t}^Tsu_s}{\sum_{s=1}^Ts^2}$$
The variance of the residual will then be 
$$\text{Var}(\hat u_t) = \sigma^2_u\cdot \left[\left(1-\frac {t^2}{\sum_{s=1}^Ts^2}\right)^2 + \frac{t^2\sum_{s\neq t}^Ts^2}{\left(\sum_{s=1}^Ts^2\right)^2}\right]$$
which thankfully simplifies to 
$$\text{Var}(\hat u_t) = \sigma^2_u\cdot \left(1-\frac {t^2}{\sum_{s=1}^Ts^2}\right) $$
So the variance of the residual series is not constant but depends on $t$. The relative difference in the variances of each element of the series depends also on the sample size. For example for a sample size of $T=50$ observations, the variance of $u_{50}$ is approximately $6$% lower than the variance of $u_1$ (the latter being the closest to the true variance of the white noise term). For a sample size of $T=1000$ it is just $0.3$% smaller. 
Also the term involving $t$ converges to zero rather fast (since the denominator is one power of $T$ greater than the numerator).  Analogous results hold also for pair-wise covariances.
We conclude that treating the residual series as second-order stationary will not lead to misleading inference, because the deviation from actual stationarity is small (except perhaps for very small samples).
