Automatic removing of trends

Stationarizing a non-linear model by hand is a tedious process that is better done by the computer.

Computing the equilibrium growth rates of a balanced growth model is complicated and will not be attempted here. We limit ourselves to replace non-stationary variables by their stationary counterpart as specified by the user.

First case: exogenous nonstationary process

\begin{eqnarray*}
y_t &=& A_t k_{t-1}^\alpha\\
A_t &=& (1+g_t)A_{t-1}\\
g_t &=& \rho\, g_{t-1}+e_t
\end{eqnarray*}

Assuming that $y_t$ and $k_t$ have common trend $A_t$, the stationarizing procedure calls for dividing first and second equation by $A_t$. The second equation becomes meaningless and corresponds to the fact that $A_t$ doesn't belong to the stationary model.

Second case: endogenous nonstationary process

\begin{eqnarray*}
P_t\,C_t &=& W_t\, L_t\\
P_t &=& (1+\pi_t) P_{t-1}\\
r_t &=& \rho_1 (\pi_t - \bar \pi)
\end{eqnarray*}

In this case as well, the second equation becomes meaningless after stationarizing the model.

Interface specification and usage

trend (exp(gamma)), C, K;
trend (exp(m-gamma)), P;
trend (exp(m)), W, D;

\[
Pobs_t/Pobs_{t-1} = (P_t/P_{t-1})exp(\bar \pi)\\  
\]

where P is the stationarized price level. In that case, variable Pobs shouldn't be listed in a trend expression, but only P and the original equation

Pobs/Pobs(-1)=P/P(-1);

shall be transformed in

Pobs/Pobs(-1)=P/P(-1)*exp(PIbar);

assuming that we have

trend (exp(PIbar)), P;