During the past decade the New Keynesian (NK) monetary model has been a widely used framework for the analysis of monetary policy, in which inflation expectations play an important role. Branch and McGough (2009) and Massaro (2013) have incorporated bounded rationality at the individual agent level and heterogeneous expectations in the NK model. Assenza et al. (2013) use this model to set up a laboratory experiment.Footnote 1 In order to study the individual expectations process, subjects are asked to forecast the inflation rate under three different scenarios. This section describes the NK model, the experimental setup and an explanation of the experimental results, followed by a description of the GA model.
New Keynesian model
The New Keynesian model with heterogeneous expectations developed by Branch and McGough (2009) is described by the following equations:
$$\begin{array}{@{}rcl@{}} y_{t}\:\:&=&\:\overline{y}^{e}_{t+1}-\varphi(i_{t}-\overline{\pi}^{e}_{t+1})+g_{t} \end{array} $$
(1)
$$\begin{array}{@{}rcl@{}} \pi_{t}&=&\:\lambda y_{t} + \rho\overline{\pi}^{e}_{t+1}+u_{t} \end{array} $$
(2)
$$\begin{array}{@{}rcl@{}} i_{t}&=&\:\overline{\pi}+\phi_{\pi}(\pi_{t}-\overline{\pi}) \end{array} $$
(3)
In this system, Eq. 1 describes the aggregate demand in which the output gap y
t
depends on the average expected output gap \(\overline {y}^{e}_{t+1}\) and on the real interest rate \(i_{t}-\overline {\pi }^{e}_{t+1}\). Equation 2 shows how the inflation rate depends on the output gap and on average expected inflation. Finally, Eq. 3 is the monetary policy rule implemented by the monetary authority in order to keep inflation at its target value \(\overline {\pi }\). In Eqs. 1 and 2, g
t
and u
t
are small normally distributed errors.Footnote 2
The NK model requires agents to forecast both inflation and the output gap. These forecasts are 2-period ahead forecasts, since, at the time the forecasts \(\pi ^{e}_{t+1}\) and \(y^{e}_{t+1}\) are formed, the most recent observations are π
t−1 and y
t−1. Given that forecasting two variables simultaneously might be a too difficult task for subjects, the experiment in Assenza et al. (2013) has been run using three different treatments.
Treatments
In the first treatment of the experiment, where only the inflation rate needs to be forecast, the model reduces to a framework with a structure similar to the experimental framework that was used by Anufriev et al. (2015). In this treatment, the expectations on the output gap are fixed at the equilibrium value. In the second treatment, subjects only forecast the inflation rate, and expectations on the output gap are represented by naive expectations, i.e. the last observation. This results in a two-dimensional structure with output-inflation dynamics that makes the macro framework more complicated. The third treatment of the experiment represents an economy driven by individual expectations on two different aggregate variables, with two different groups of forecasters, predicting, respectively, inflation and the output gap.
Moreover, all treatments are run under different monetary policy regimes, a regime a in which ϕ
π
= 1 and a regime b in which ϕ
π
= 1.5, where ϕ
π
is a policy parameter measuring how strongly the interest rate responds to deviations of inflation from its target.
Treatment 1
In the first treatment, subjects forecast inflation, while the expectations on the output gap are assumed to be given by the equilibrium predictor \(\:\overline {y}^{e}_{t+1}=(1-\rho )\overline {\pi }\lambda ^{-1}\). The initial set of equations can now be written as:
$$\begin{array}{@{}rcl@{}} y_{t}\:\:&=&(1-\rho)\overline{\pi}\lambda^{-1}-\varphi(i_{t}-\overline{\pi}^{e}_{t+1})+g_{t} \end{array} $$
(4)
$$\begin{array}{@{}rcl@{}} \pi_{t}&=&\:\lambda y_{t} + \rho\overline{\pi}^{e}_{t+1}+u_{t} \end{array} $$
(5)
$$\begin{array}{@{}rcl@{}} i_{t}&=&\:\overline{\pi}+\phi_{\pi}(\pi_{t}-\overline{\pi}) \end{array} $$
(6)
in which \(\overline {\pi }^{e}_{t+1}\) is the average prediction of the subjects in the experiment. Substituting (6) into (4) results in:
$$\begin{array}{@{}rcl@{}} y_{t}\:\:&=&(1-\rho)\overline{\pi}\lambda^{-1}+\varphi\overline{\pi}(\phi_{\pi}-1)-\varphi\phi_{\pi}\pi_{t}+\varphi\overline{\pi}^{e}_{t+1}+g_{t} \end{array} $$
(7)
$$\begin{array}{@{}rcl@{}} \pi_{t}&=&\:\lambda y_{t} + \rho\overline{\pi}^{e}_{t+1}+u_{t} \end{array} $$
(8)
Solving this in terms of inflation π
t
gives:
$$\begin{array}{@{}rcl@{}} \pi_{t}&= \frac{(1-\rho)-\lambda\varphi(\phi_{\pi}-1)}{1+\lambda\varphi\phi_{\pi}}\overline{\pi} + \frac{\lambda\varphi+\rho}{1+\lambda\varphi\phi_{\pi}}\overline{\pi}^{e}_{t+1}+\frac{\lambda g_{t}+u_{t}}{1+\lambda\varphi\phi_{\pi}} \end{array} $$
(9)
Note that this is a linear relation between π
t
and \(\overline {\pi }^{e}_{t+1}\), plus a small composite shock as a third term.
Treatment 2
In the second treatment, subjects also forecast inflation, but now the expectations on the output gap are assumed to be represented by naive expectations: \(\:\overline {y}^{e}_{t+1}=y_{t-1}\). In this case, inflation and the output gap at time t can be written as follows:
$$\begin{array}{@{}rcl@{}} y_{t}\:\:&=&\varphi\overline{\pi}(\phi_{\pi}-1)-\varphi\phi_{\pi}\pi_{t}+\varphi\overline{\pi}^{e}_{t+1}+y_{t-1}+g_{t} \end{array} $$
(10)
$$\begin{array}{@{}rcl@{}} \pi_{t}&=&\:\lambda y_{t} + \rho\overline{\pi}^{e}_{t+1}+u_{t} \end{array} $$
(11)
in which \(\overline {\pi }^{e}_{t+1}\) is the average prediction of the subjects in the experiment. In matrix form, this system of equations becomes:
$$\begin{array}{@{}rcl@{}} \left[\begin{array}{lll} \!y_{t}\! \\ \!\pi_{t}\! \end{array}\right] \,=\, \frac{1}{1\,+\,\lambda\varphi\phi_{\pi}} \!\left( \!\!\!\!\!\!\!\phantom{\frac{\frac{1}{1}}{\frac{1}{1}}} \left[\begin{array}{lll} \!0 &\varphi(1\,-\,\phi_{\pi}\rho)\!\!\!\\ \!0& \lambda\varphi\,+\,\rho\! \end{array}\right] \!\! \left[\begin{array}{lll} \overline{y}^{e}_{t\,+\,1} \\ \overline{\pi}^{e}_{t\,+\,1} \end{array}\right] \,+\, \left[\begin{array}{lll} \!\!1 & \!0\\ \!\!\lambda & \!0 \end{array}\!\!\right] \!\! \left[\begin{array}{lll} \!\!y_{t-1}\!\! \\ \!\!\pi_{t-1}\!\! \end{array}\right] \,+\, \left[\begin{array}{ll} \!\!1 & \!-\varphi\phi_{\pi}\!\!\!\\ \!\!\lambda & \!1 \end{array}\right] \!\! \left[\begin{array}{lll} \!g_{t}\! \\ \!u_{t}\! \end{array}\right]\! \right) \end{array} $$
(12)
This treatment is more complicated than the first since the inflation does not only depend on expected inflation but also on the lagged output gap as \(\overline {y}^{e}_{t+1}=y_{t-1}\).
Treatment 3
In the third treatment, two groups participate in the same experimental economy, where one group forecasts inflation and the other group forecasts the output gap. Substituting (3) into (1) and writing the equations in matrix form results in the following system:
$$\begin{array}{@{}rcl@{}} \left[\begin{array}{lll} y_{t} \\ \pi_{t} \end{array}\right] =\frac{1}{1+\lambda\varphi\phi_{\pi}} \left( \!\!\!\!\!\!\!\phantom{\frac{\frac{1}{1}}{\frac{1}{1}}} \left[\begin{array}{lll} 1 &\varphi(1-\phi_{\pi}\rho)\\ \lambda& \lambda\varphi+\rho \end{array}\right] \!\! \left[\begin{array}{lll} \overline{y}^{e}_{t+1} \\ \overline{\pi}^{e}_{t+1} \end{array}\right] +\left[\begin{array}{lll} 1 & -\varphi\phi_{\pi}\\ \lambda & 1 \end{array}\right] \!\! \left[\begin{array}{lll} g_{t} \\ u_{t} \end{array}\right] \right) \end{array} $$
(13)
In contrast to the first two treatments, treatment 3 represents an experimental economy the aggregate behavior of which is driven by individual expectations on two different interacting aggregate variables.
Monetary policy regimes
Each of the three treatments was run under two different monetary policy regimes. In sessions a, the coefficient ϕ
π
= 1, so that Eq. 3 reduces to i
t
= π
t
. With this setting, there is no attraction whatsoever to target inflation value \(\overline {\pi }\). In session b, coefficient ϕ
π
is set to 1.5 so that the monetary policy responds to inflation aggressively. In this scenario, \(\overline {\pi }\) does not drop out of Eq. 3, so that the inflation rate has a tendency towards target value \(\overline {\pi }\).
Experimental results
The experimental results can be classified into three different types of behavior. Six experimental groups that clearly show these different types of behavior are presented in Fig. 1a through f.
Convergence
In treatment 1a, two groups converge to a non-fundamental steady state equilibrium (see Fig. 1a). Because the monetary policy responds weakly to inflation rate fluctuations, subjects coordinate on inflation rates other than the target inflation rate. In treatment 1b, two out of three group also converge to a steady state. In this case, however, the monetary policy responds aggressively to inflation, so that subjects tend to coordinate on the target inflation (Fig. 1d).
Oscillations
In the second treatment, a different type of aggregate behavior can be observed. Subjects in group 2 of treatment 2a converge to an oscillatory pattern (see Fig. 1b). The oscillations are principally above the target inflation rate, due to the lack of an aggressive monetary policy. In treatment 2b, subjects are again forced towards the target inflation rate. The experiment shows small oscillations around the fundamental inflation rate (Fig. 1e).
Dampened oscillations
The third type of aggregate behavior that this research aims to reproduce is an oscillatory convergence towards a steady state. This behavior occurs in the second session of treatment 3b (Fig. 1f), which starts out with oscillations around the target inflation rate. The oscillations slowly dampen such that there is convergence to the fundamental steady state (which is in line with the monetary policy settings of the b-treatment) near the end of the session.
The genetic algorithm model
We follow Arifovic’s augmented GA model, in which every individual starts with a set of forecasting heuristics for either inflation rate or the output gap, which are encoded in binary string. After initialization of the model, the heuristics undergo a GA iteration. This iteration, an optimization procedure that uses four evolutionary operators, is the core of the model.
In the GA model, each individual possesses a population of 20 forecasting heuristics, in which one or more parameters need to be optimized. Every heuristic, therefore, entails a candidate vector of optimization parameters encoded in a binary string. This binary string can be seen as a chromosome containing one or more genes - the parameters in the vector. Parameter \(\theta ^{n}_{h,i,t}\) is the n
th parameter in heuristic h of individual i in period t, and is coded in a binary string of length l with binary values \(g^{n,k}_{h,i,t}\) at the k
th position in the string as follows:
$$ \theta^{n}_{h,i,t}=a_{n}+\frac{b_{n}-a_{n}}{2^{l-1}}\sum\limits_{k=1}^{l}{g^{n,k}_{h,i,t}}2^{k}-1 $$
(14)
Since each gene has a finite length, the parameter values are limited to a finite interval, with a
n
and b
n
as lower and upper boundary, respectively, and to a finite number of different values. The size of this interval, together with the length of the string, determines the precision of the parameter.Footnote 3
GA iteration
The encoded heuristic goes through four stages of updating: reproduction, mutation, crossover and election. The operators in the GA iteration are inspired by the theory of evolution, but also have an economic intuition.
The first operator in every GA iteration is the reproduction operator, which randomly draws 20 heuristics for each individual. Every draw takes place according to the heuristics’ probabilities to be chosen for reproduction, based on their performance measure. The reproduction operator represents the phenomenon that more successful strategies (in terms of utility) are more likely to be used in the future.
After reproduction there is a small probability that a mutation will occur in the new strategy. In the binary string, each position has an equally small chance of changing from a 0 to a 1 or vice versa. Depending on the position of the string in which the mutation takes place, the effect of a single mutation can be significant or very small.
Combining two different strategies into new strategies is captured by the crossover operator, whereas the mutation operator models small changes in strategies. All 20 heuristics that are picked in the reproduction stage are, after mutation, signed up as random pairs and will interchange a part of the binary string that represents the forecasting coefficients.Footnote 4
In the crossover and mutation stage, two new heuristics are formed from the two old heuristics for the new period. Because these two new heuristics do not always perform better than its predecessors, an election operator tests the performance of the two new and the two old heuristics. The performance of these strings will be based on the difference of the inflation (or output gap) prediction with respect to the last observed inflation (output gap). Out of these four strings, the best performing two will be chosen for the next period.
After the GA iteration, every individual has an updated set of heuristics at his disposal. From this new set of heuristics, every individual chooses one as his inflation (or output gap) forecast. In order to make this choice, individuals make use of a performance measure for every heuristic: heuristics that perform better, according to this measure, have a higher probability of being chosen. The forecasts of all individuals together determine the first actual value for inflation or output gap according to Eqs. 1, 2 and 3. Individuals now take their updated set of heuristics to the next period, in which the next GA iteration starts. The complete iterative process in the model is illustrated in Fig. 2. This process continues for a number of periods, in which individuals should be able to make better predictions as time goes by, because their heuristics update every iteration.
Forecasting heuristics
GA can be interpreted as a generalized version of the forecasting heuristics in the heuristic switching model used by Assenza et al. (2013). Agents do not choose from a set of predefined rules, but use Genetic Algorithms to optimize over a set of parameters in a simple class of linear prediction rules, based on the past inflation and/or output gap, individual past prediction, the observed trend and the average of past inflation and/or output gap.
This general rule consists of an adaptive component (α), a trend extrapolating component (β) and an anchor component (γ). The linear forecast for period t + 1 is given by
$$ x^{e}_{i,t+1}=\gamma x^{av}_{t-1}+(1-\gamma) (\alpha x_{t-1}+(1-\alpha)x^{e}_{i,t}) +\beta(x_{t-1}-x_{t-2}), $$
(15)
where x
t−1 is the last observation, x
t−1 − x
t−2 the last observed change (or trend), \(x^{e}_{i,t}\) the last forecast by subject i and \(x^{av}_{t-1}\) the observed sample average. This rule is in line with the so-called ‘first order heuristic’, which is used by Heemeijer et al. (2009) to explain the participants’ behavior in an experimental economy, and is also used in the GA model by Anufriev et al. (2015). A condition of the first order heuristic is that the coefficients for the anchor [γ], the last observed value [(1 − γ)α] and the last forecast [(1 − γ)(1 − α)] are non-negative and sum to one. This particular way of formulating the forecasting heuristic ensures this for all values of α and γ between 0 and 1. Individuals optimize the three coefficients α, β and γ, encoded in a 60-bit string (3 × 20 bits).
The forecasting heuristics described above are used for simulations of all three different treatments. In treatments 1 and 2, only inflation π is predicted by the participants, so that the forecasting heuristic simply becomes:
$$ \pi^{e}_{i,t+1}=\gamma_{i,h,t}\pi^{av}_{t-1}+(1\,-\,\gamma_{i,h,t})(\alpha_{i,h,t} \pi_{t-1}+(1\,-\,\alpha_{i,h,t})\pi^{e}_{i,t} )+\beta_{i,h,t}(\pi_{t-1\!}-\!\pi_{t-2}) $$
(16)
where α
i,h,t
, β
i,h,t
and γ
i,h,t
are the parameters of subject i, for rule h, in period t. In treatment 3, however, there are six participants who predict inflation while six other participants predict the output gap. Both variables are updated using the same general rules. Superscripts π and y are added to coefficients α, β and γ to differentiate between inflation and the output gap:
$$\begin{array}{@{}rcl@{}} && {} \pi^{e}_{i,t+1} \,=\, \gamma^{\pi}_{i,h,t}\pi^{av}_{t-1}\,+\,({\kern-.5pt}1\!\,-\,\!\gamma^{\pi}_{i,h,t}{\kern-.5pt})({\kern-.5pt}\alpha^{\pi}_{i,h,t} \pi_{t-1} \,+\, ({\kern-.5pt}1\,-\,\alpha^{\pi}_{i,h,t}{\kern-.5pt})\pi^{e}_{i,t}{\kern-.5pt}) \,+\, \beta^{\pi}_{i,h,t}(\pi_{t\,-\,1}\,-\,\pi_{t-2}) \end{array} $$
(17)
$$\begin{array}{@{}rcl@{}} && y^{e}_{i,t+1} \,=\, \gamma^{y}_{i,h,t} y^{av}_{t-1}\,+\,(1\!\,-\,\!\gamma^{y}_{i,h,t})(\alpha^{y}_{i,h,t} y_{t-1} \,+\, (1\,-\,\alpha^{y}_{i,h,t})y^{e}_{i,t}) \,+\, \beta^{y}_{i,h,t}(y_{t\,-\,1}\,-\,y_{t-2}). \end{array} $$
(18)
Performance measure
In this GA framework, every individual has a whole range of forecasting heuristics at hand to forecast inflation (or the output gap) in every period. This choice is made on the basis of the performance of the heuristics, determined by a fitness measure. Hence, the type of performance measure used in the model is of key importance to the simulation process. In the GA model, this performance measure is assumed to be equal to the payoff function used by Assenza et al. (2013) in their experiment, namely:
$$ U_{i,h,t}=\frac{100}{1+|\!|x^{e}_{i,h,t-1}-x_{t-1}|\!|}. $$
(19)
The performance measure of each heuristic is used twice in every GA iteration: to choose heuristics for reproduction, and to pick one heuristic as a forecast for the next period. In both cases, the probability that a heuristic is chosen is obtained by formalizing the logit-transformation of the utility measure and adding an intensity of choice parameter β
s
.Footnote 5 This parameter measures the sensitivity of individuals to differences in the performance of their heuristics. This is in line with the performance measure that was used in the HSM by Assenza et al. (2013). The probability that a heuristic is chosen then becomes:
$$ {\Pi}_{i,h,t}=\frac{\exp(\beta_{s} U_{i,h,t-1})}{{\sum}^{H}_{h=1} \exp({\beta_{s} U_{i,h,t-1})}}. $$
(20)
For all simulations in this research this normalized logit-transformation is used. We choose β
s
= 1 in all simulations. The performance measure then simply becomes:
$$ {\Pi}_{i,h,t}=\frac{\exp(U_{i,h,t-1})}{{\sum}^{H}_{h=1} \exp({U_{i,h,t-1})}}. $$
(21)
Parametrization
Besides the GA operators, the forecasting heuristics and the performance measure, the model requires the tuning of a few important model settings to replicate the experimental economies. These aspects are discussed in this section.
Initialization of the model
Each session in the LtF experiment consists of 50 periods, which means that the GA model should run for the same amount of time. Almost all GA-simulations below will be 50-period ahead simulations. This means that no information from the experiment is used except for the initial predictions by the subjects.Footnote 6 There are two aspects of the initialization of the GA-model: (1) what are the first two predictions in the first period (when there are no past observations yet, and so the forecasting heuristics cannot be used)?, and (2) in the second period (when the heuristics can be used), which coefficients α, β, and γ do the GA agents use? The initialization is done as follows: (1) the initial predictions for periods 1 and 2 are taken from the experimental data (the two initial predictions of each of the six subjects), and (2) the initial parameters α, β, and γ of the forecasting heuristics are randomly chosen (from uniform distributions of the bits in the chromosomes). After this initialization, the model is run for 49 more periods, following the scheme of the GA shown in Fig. 2.Footnote 7
Parameters GA model
As explained earlier, the parameters α, β and γ are restricted to a finite interval. For α and γ the ranges are obvious: the conditions of the first order rule dictate that both α and γ should be between 0 and 1. The ranges for trend extrapolation parameter β are, however, not subject to any constraints. Furthermore, trend extrapolation parameters can, in theory, be negative as well, indicating ‘contrarian’ behavior. Massaro (2012) showed that subjects in the experiment indeed make use of trend extrapolation, but that virtually all subjects use positive coefficients. The range of β is therefore set to [0,3] to allow for relatively weak (0 to 1) and relatively strong (1 to 3) trend extrapolation.
Furthermore, the mutation and crossover operators are both subject to a certain probability of occurrence. Throughout the simulations in this research, the mutation rate is set to 0.01, so that during every GA iteration, every bit in every string has a 1% chance of mutating. Crossover does not always happen, either; the crossover rate is set to 0.9, which means that each pair of strings has a 90% chance of interchanging a part of the string.Footnote 8
Monte Carlo simulations
In order to investigate how well the model explains the experimental data, Monte Carlo simulations are carried out. For all six treatments, simulations of 1000 replications are run. In each run, we draw all initial heuristics (six agents with 20 heuristics each) with parameters α, β and γ drawn randomly from a uniform distribution. The initial conditions for the predicted inflation (output gap) by agents, \(\pi ^{e}_{i,1}\: (y^{e}_{i,1})\) and \(\pi ^{e}_{i,2}\: (y^{e}_{i,2})\), are the same in every run and equal to the first two predictions by the participants in the corresponding experiment. Shock terms g
t
and u
t
(see Eqs. 1 and 2) are equal to the shocks used in the experiment and therefore also the same in each run of the Monte Carlo simulations.
These Monte Carlo simulations of 1000 runs of the GA-model enable the computation of confidence intervals. We will compare the experimental results to the mean and the 90% and 95% confidence intervals of the 50-period ahead Monte Carlo GA simulations. Moreover, a confidence interval for some descriptive statistics will be computed. For each treatment, this enables us to compare the mean and standard deviation of 1000 runs of the GA-model to the experimental result.