I am doing a time series course and in the theory part there are few things I don't understand.In obtaining auto correlation function for AR(p) process it is done as:
$$\newcommand{\Var}{{\rm Var}}\newcommand{\cov}{{\rm Cov}} AR(p)=X_t = α_1X_{t−1} + α_2X_{t−2}+ · · · + α_pX_{t−p} + z_t$$
And then let $Y_t=X_t-\mu$.
\begin{align}
\gamma(k) &= \cov(Y_t,Y_{t+k}) \\
&= \cov(Y_t,Y_{t-k}) \\
&= E[Y_{t-k}Y_t] \\
&= \alpha_1\gamma(k-1)+\alpha_2\gamma(k-2)+...\alpha_p\gamma(k-p)
\end{align}
Then in order to obtain auto correlation function it is divided by $\gamma(0)$. My question is to be able to divide by $\gamma(0)$ shouldn't the AR(p) process need to be stationary? Also
$$\cov(Y_t,Y_{t+k})=\cov(Y_t,Y_{t-k})$$
can be written only if the process is stationary right? Because auto correlation,
$$P(k)=\frac{\cov(X_t,X_{t+k})}{\sqrt{\Var(X_t)\Var(X_{t+k})}}$$
If $\cov(X_t,X_{t+k})$ is denoted by $\gamma(k)$ when the process is stationary as the variance is constant,
$$\Var(X_t)\Var(X_{t+k})=\Var(X_t)\Var(X_{t})=\gamma(0)\gamma(0)$$
(As variance does not depend on lag when stationary). Therefore when stationary we can say that
$$P(k)={\gamma(X_t,X_{t+k})\over\gamma(0)}$$
This division by $\gamma(0)$ is valid only when the series is stationary right? Is the way I understood this wrong?
But the AR(p) process is not always stationary? Therefore in obtaining
$$P(k)=\alpha_1P(k-1)+\alpha_2P(k-2)+...+\alpha_pP(k-p)$$
is it assumed that the process is stationary?