The perfect foresight algorithm is implemented for models of type “fg”. Recall that ths type of model is specified by \(g\) and \(f\) such that:
\(s_t = g \left( s_{t-1}, x_{t-1}, \epsilon_t \right)\)
\(E_t \left[ f \left( s_t, x_t, s_{t+1}, x_{t+1} \right) \right]=0\)
In this exercise, the exogenous shocks are supposed to take a predetermined series of values \((\epsilon_0,\epsilon_1,...,\epsilon_K)\). We assume \(\forall t<0, \epsilon_t=\epsilon_0\) and \(\forall t>K, \epsilon_t=\epsilon_K\).
We compute the transition of the economy specified by \(fg\), from an equilibrium with \(\epsilon=\epsilon_0\) to an equilibrim with \(\epsilon=\epsilon_K\).
This transition happens under under perfect foresight, in the following sense. For \(t<0\) agents, expect the economy to remain at its initial steady-state, but suddenly, at \(t=0\), they know the exact values, that innovations will take until the end of times.
Computes a perfect foresight simulation using a stacked-time algorithm.
Parameters: |
|
---|---|
Returns: | a dataframe with T+1 observations of the model variables along the simulation (states, controls, auxiliaries). The first observation is the steady-state corresponding to the first value of the shocks. The simulation should return |
to a steady-state corresponding to the last value of the exogenous shocks.
Finds the steady state corresponding to exogenous shocks \(e\).
Parameters: |
|
---|---|
Returns: | a list containing a vector for the steady-states and the corresponding steady controls. |