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.

Current restriction: for the time being we limit ourselves to stochastic trends integrated of order 1.

Example

Original model

Consider a model with two trends: a labor productivity trend $A_t$ and a nominal price trend $P_t$.

The model is the following (some equations are omitted):

\begin{eqnarray*}
Y_t &=& (A_t L_t)^\alpha K_{t-1}^\beta \\
A_t &=& (1+g_t)A_{t-1}\\
g_t &=& \rho\, g_{t-1}+e_t\\
P_t\,C_t &=& W_t\, L_t\\
P_t &=& (1+\pi_t) P_{t-1}\\
r_t &=& \rho (\pi_t - \bar{\pi}) \\
Y_t &=& C_t + I_t\\
K_t &=& (1-\delta)K_{t-1} + I_t^\frac{1}{\alpha+\beta}
\end{eqnarray*}

Stationarized model

We define stationarized variables by $\hat{Y}_t = Y_t/A_t^{\alpha+\beta}$, $\hat{C}_t = C_t/A_t^{\alpha+\beta}$, $\hat{I}_t = I_t/A_t^{\alpha+\beta}$, $\hat{K}_t = K_t/A_t$, $\hat{W}_t = W_t/(P_t A_t^{\alpha+\beta})$.

The equations of the stationarized model are:

\begin{eqnarray*}
\hat{Y}_t &=& L_t^\alpha (\hat{K}_{t-1}/(1+g_t))^\beta\\
g_t &=& \rho\, g_{t-1}+e_t \\
\hat{C}_t &=& \hat{W}_t\, L_t\\
r_t &=& \rho (\pi_t - \bar \pi) \\
\hat{Y}_t &=& \hat{C}_t + \hat{I}_t \\
\hat{K}_t &=& (1-\delta)\hat{K}_{t-1}+\hat{I}_t
\end{eqnarray*}

Note that the two trends $A_t$ and $P_t$ have disappeared from the model, along with their laws of motion.

Dynare syntax

Here are the proposed syntax for writing the original (non-stationary) model in Dynare:

Proposal 1

var Y, L, K, g, C, W, pie, r, I;
trend_var A, P;
varexo e;
parameters alpha, beta, delta, rho, piebar;

trends;
K: deflator=A, growth_factor=(1+g);
Y, C, I: deflator=A^(alpha+beta), growth_factor=(1+g)^(alpha+beta);
W: deflator=P*A^(alpha+beta), growth_factor=(1+pie)*(1+g)^(alpha+beta);
end;

model;
Y = (A*L)^alpha*K(-1)^beta;
g =rho*g(-1)+e;
P*C=W*L;
r =rho*(pie - piebar);
Y=C+I;
K=(1-delta)*K(-1)+I^(1/(alpha+beta));
//... and the last 3 equations
end;

Remarks:

Proposal 2

trend_var A, P;
parameters alpha, beta, delta, rho, piebar;
var L, g, pie, r;
var(trend_deflator=A, trend_growth_factor=(1+g)) K;
var(trend_deflator=A^(alpha+beta), trend_growth_factor=(1+g)^(alpha+beta)) Y C I;
var(trend_deflator=P*A^(alpha+beta), trend_growth_factor=(1+pie)*(1+g)^(alpha+beta)) W;
varexo e;

model;
Y = (A*L)^alpha*K(-1)^beta;
g =rho*g(-1)+e;
P*C=W*L;
r =rho*(pie - piebar);
Y=C+I;
K=(1-delta)*K(-1)+I^(1/(alpha+beta));
//... and the last 3 equations
end;

Note that the order of declaration matters: the trend vars and some endogenous and parameters must be declared before the detrended variables.

Algorithm of transformation and test

\[
Pobs_t/Pobs_{t-1} = (P_t/P_{t-1})exp(\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(pie);

assuming that we have

trend (exp(pie)), P;