This post aims to clarify the difference between three concepts that most people doing computational work in economics, notably macro, come across sooner or later. These three concepts are the deterministic steady-state (DSS), the stochastic steady-state (SSS), which also goes under the name ergodic mean in the absence of shocks (EMAS), and the ergodic mean with shocks (EMWS). Seemingly similar, there are in fact important conceptual and practical differences between them. The piece is motivated by the observation that this nexus of concepts creates a fair amount of confusion, at least judging by questions in online forums, yet I have not come across a unified summary. The post addresses the definition of the three concepts; how the DSS differs from the SSS; why the SSS is sometimes referred to as EMAS; and why all of this matters. In the interest of conveying the key ideas without too much notational baggage, I will at times abuse mathematical notation.
To fix ideas, consider a dynamic and stochastic (discrete-time) system made up of just one endogenous variable, , that is subject to the exogenous shock ; the ideas extend to higher-dimensional systems. Write the policy function for defining optimal decisions given state and shock as ; I assume this to be known (i.e., the model is solved and we ignore approximation error). To complete the notational setup, denote the past history of shocks by and future realizations of shocks by .
The deterministic steady-state of a system refers to the fixed point of that system provided all stochastic elements are removed forever. In other words, it is the state reached in the absence of shocks and expecting no future risk. Thus, the deterministic steady-state satisfies (with some misuse of notation)
and we can write it as
The DSS is, in principle, straightforward to compute: we set shocks to zero, “drop the time subscripts” and solve the resulting system of equations for the fixed point either analytically or computationally using, say, a Newton-type algorithm.
The stochastic steady-state (SSS) of a system, on the other hand, is that point in the state-space where agents would choose to remain if there are no shocks in that period but possibly in the future. That is, the stochastic steady-state satisfies
Finally, the ergodic mean with shocks (or simply, ergodic mean) corresponds to the theoretical mean of the process when shocks evolve normally:
In the simplest terms — any statistician reading this, please forgive me for not delving in detail into the relationship between time averages and ensemble averages — we can think of the ergodic mean as the average value of over a long period of time. More precisely, because the systems we typically work with satisfy certain conditions (stationarity and ergodicity), theoretical moments such as the mean are constant and can be obtained by computing the time average from a sufficiently long sample. The basic idea is that if we simulate a long chain, then we will have visited all parts of the state-space (with frequencies corresponding to the stochastic properties of the system) and can compute a time average that is informative about the expected value of the process.
The figures below illustrate the three concepts for a somewhat randomly chosen model I just had at hand. The grey line shows the simulated model with shocks; the grey line with bullets gives the EMWS. The blue line is the DSS and the orange line is the EMAS. Evidently, all three means differ.
What is the intuition for these differences? It is maybe not that difficult to imagine that the EMWS is different from the other two: To give but one example, if the model is highly non-linear and, for instance, good times are better than bad times are worse, then taking the average over the shock realizations might, for instance, leave you with an expected value that is above the DSS. But why is the deterministic steady-state different from the stochastic steady-state? The exact answer will differ from model to model, but in general, the answer is that if there is uncertainty about the future, agents may exhibit precautionary behavior that is not present if there is no risk at all. The magnitude of this “uncertainty correction” will be affected both by the amount of risk embedded in the model at hand and the extent to which agents respond to any given amount of risk (i.e., curvature). Importantly, differences between DSS, EMWS and EMAS will appear only when using non-linear methods (e.g., higher-order perturbations, non-linear projections, etc.): if we approximate a solution using linearization, this approximation will exhibit “certainty equivalence,” which for our purposes can be taken to mean that the terms of the approximated policy-rule (and, hence, the steady-state(s)) are unaffected by uncertainty.
To make the nature of this “uncertainty correction” easier to grasp, imagine you have a certain income each month that you can use in three different ways: movies, housing, and savings — the latter doesn’t earn any return , but you can use accumulated savings to keep watching movies and having a roof over your head if you lose your job, say. You really enjoy going to the cinema but it would be horrific if you spent so much money on movies that you are no longer able to pay the rent. Perhaps you should not squander the money on the cinema but instead put it in a savings account? Presumably the optimal thing to do depends on how big the risk is of not being able to come up with the rent payment. Suppose, for instance, that you know for sure that each month, you have 1000$ available — it’s always been that way and it will always be the case. Then you can calculate exactly how much is taken up by rent and how much you can spend on the cinema each period. This corresponds to the DSS. Now imagine, though, that although historically you reliably received your income, you are worried that the economy might go downhill and you could lose your job. As a result, you might think to yourself that you better save some money for rainy days instead of consuming. If we then looked at your behavior of the next couple of months, even if no income risk actually materializes, we will find that you spent less money on the cinema than you would have in the absence of future risk.
But why is the SSS sometimes referred to as the “ergodic mean in the absence of shocks”? Because we can think of it also as average value in a long sample when shock realizations are zero yet agents take into account the possibility of shocks occurring. That is ,
This way of thinking about the SSS is also informative about the method by which we can find the SSS. Unlike for the DSS, we cannot simply ignore randomness. Fortunately, though, we can compute the SSS using simulation-based methods — just as we would do for the EMWS. First, iterate on times, where is large, starting at . Note that all shock realizations are zero, but each period, agents do not know that this will be the case going forward. Given the resulting sample , we approximate where is the number of burn-in periods needed for the process to converge from the DSS to the SSS. Qua steady-state, and we can equivalently say that 
Do these differences really matter? In fact, carefully distinguishing between the three different concepts is important in a number of applications. Two examples are characterizing the moments of model-generated data or when computing impulse response functions. For instance, suppose the goal is to characterize the average level of consumption in an economy subject to risk. Then the DSS will give a misleading answer, whereas the EMWS and the EMAS will take into account agents’ reaction to risk.  Second, when non-linear methods are used to solve a model, impulse responses will depend on both and . One way to deal with this is to look at a “representative” IRFs at the ergodic mean in the sense that future shock realizations are averaged out. Thus, the “generalized” impulse response (GIR) of after a shock is given by
Here, too, care needs to be taken in choosing the right concepts: for sake of consistency, when computing such a GIR using simulations, we should start at the EMWS rather than the DSS (or EMAS); if, instead, we started from the DSS, say, then the IRFs would confound the transition from DSS to the ergodic mean with the true impulse response. In addition, when impulse responses are shown in proportional deviations from “the steady-state,” the relevant concept with which to compare the absolute deviations is the EMWS.
Postscript: Implementation in Dynare
One of a number of ways users of Dynare can obtain these three objects is, schematically, as follows.
- If you are just interested in the deterministic steady-state and/or the ergodic mean:
i.) Simulate and solve (computing empirical rather than theoretical moments):
stoch_simul(order=3, periods = 2096, drop = 2000, pruning, k_order_solver, noprint, irf=0);
% simulated endogenous variables in oo_.endo_simul and exogenous variables in oo_.exo_simul
ii.) Deterministic steady_state:
vSSS = oo_.steady_state;
iii.) Ergodic mean with shocks:
vEMWS = mean(oo_.endo_simul,2);
- If you want the stochastic steady-state:
i.) Simulate and solve:
Periods = 96;
SimulBurn = 2000;
iii.) Generate a matrix (or vector) of zero shocks:
mEpsZero = zeros( SimulBurn+Periods,M_.exo_nbr);
iv) Simulate with shocks set to zero:
mSimulNoShocks = simult_(oo_.dr.ys,oo_.dr,mEpsZero,options_.order)’;
v.) EMAS is any of the final points after burn-in
– Notation: values to be chosen by the user are in italics. The “v” prefix stands for “vector” while “m” stands for “matrix.” I employ the CamelCase convention.
– Of course, the concepts are valid beyond Dynare or perturbation methods more generally! For instance, the figure above is based on a global projection algorithm.
– This is largely based on J. Pfeifer’s replication of Basu and Bundick (2017).
 Among others, I draw on Koop et al. (1996), Coeurdacier et al. (2011), Fernandez-Villaverde et al. (2011), Born and Pfeifer (2014) and Andreasen et al. (2018), but above all the comments of the unwearying Johannes Pfeifer in the Dynare forum.
 To be clear, the EMWS likewise accounts for uncertainty, indeed, it does so in a more comprehensive way (see Lan and Meyer-Gohde, 2014); however, it also accounts for the implications of realized volatility.
 I am abstracting here from questions of time preference.
 It is tempting to also condition on for both EMAS and DSS, tightening the link between theoretical concept and the way it is approximated through simulation, but conceptually this seems unnecessary.
 For the EMWS, we would likewise gather a sample by iterating on and then taking a time average, but here, of course, .
 Which one of these ergodic means is appropriate will depend on the question we wish to answer.