{'fraction_non_alphanumeric': 0.03450969736082334, 'fraction_numerical': 0.013009068985428484, 'mean_word_length': 4.475450994978613, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Impulse-Based Computation of Policy Counterfactuals

We propose an efficient procedure to solve for policy counterfactuals in linear models with occasionally binding constraints. The procedure does not require knowledge of the structural or reduced-form equations of the model, its state variables, or its shock processes. Forecasts of the variables entering the policy problem, and impulse response functions of these variables to anticipated policy shocks under an arbitrary policy, constitute sufficient information to construct valid counterfactuals. We show how to compute solutions for instrument rules and optimal discretionary and commitment policies with multiple policy instruments, and discuss various extensions including imperfect information, asymmetric objectives, and limited commitment. Our procedure facilitates the comparison of the effects of policy regimes across models. As an application, we compute counterfactual paths of the US economy around 2015 for several monetary policy regimes.


Introduction
One key use of structural macroeconomic models is the construction of counterfactual scenarios for the analysis of economic policies. How would the economy have behaved differently during some historical episode had some specific policy been adopted? How will the economy likely behave in the future under the policy? The importance of such exercises needs no motivation.
The established procedure for constructing such counterfactuals in macroeconomics involves the following steps: Given a model and its parameters, filter initial conditions and structural shocks from observable data; rewrite the model to change the behavior of policy to the desired counterfactual; solve this new model; and compute the counterfactual equilibrium path using the structural shocks and initial conditions obtained in the first step. One difficulty of this procedure is that it can quickly become computationally challenging when the model is non-linear, in particular when occasionally binding constraints such as a lower bound on interest rates are active. Moreover, we believe it is somewhat disconnected from the reality of policy analysis. Central banks and other policy institutions usually do not rely on any one model to inform their view of the economy, and instead aim to construct their projections efficiently from a large amount of data, a variety of reduced-form and structural models, and judgment. Also, counterfactual analyses often focus only on a small subset of the variables contained in the medium-or large-scale models maintained by these institutions.
In this paper, we propose a novel procedure for computing policy counterfactuals that is computationally simpler and, in our view, better adapted to the reality of policy analysis.
The procedure only requires a minimal amount of information about the model that is directly relevant to the problem at hand. Neither the structural or reduced-form equations of the model, its state variables, nor its shock processes need to be known. All that is required is a set of impulse responses of a few variables of interest (say, inflation, output, and interest rates) to anticipated future shocks about the policy instruments. These impulse responses contain all the relevant information about the model. Also, rather than filtering structural shocks from many observables, the procedure operates directly on forecasts of the few variables of interest, called projections. These impulse responses and projections are all that is required to compute accurate counterfactual solutions.
We show how to compute solutions for instrument rules as well as optimal paths under discretion and commitment. Importantly, we are able to compute counterfactuals not only at one point in time but also over time as the economy is affected by shocks, even though these shocks need not be known explicitly. The sequences of projections contain all the necessary information about the shocks needed for the computation of policy counterfactuals.
Our optimal commitment solutions also honor past commitments as time moves forward, because we establish the Marcet and Marimon (2019) recursive form of the commitment problem directly from the impulse response representation of the model. Moreover, computing optimal discretionary policy does not require an iterative procedure like in Dennis (2007) and is therefore no more difficult than computing optimal commitment policy; in the linear case, it amounts to no more than inverting a single matrix.
As an illustration, we discuss how the U.S. economy may have evolved around 2015 had the Federal Reserve adopted one of several potential interest rate rules, or optimal commitment or discretionary policy. We conduct this analysis using median projections of the economy made at that time by FOMC participants in the Survey of Economic Projections, and impulse responses obtained from the Smets and Wouters (2007) model and a linearized version of the FRB/US model (Brayton, 2018;Erceg, Hebden, Kiley, Lopez-Salido, and Tetlow, 2018). We find that, for a standard choice of the loss function, the paths of policy projected at that time were quite close to the optimal commitment policy. Had monetary policy followed a Taylor-type rule instead, monetary policy would have been noticeably tighter, resulting in lower inflation and higher unemployment in 2015.
Our computational procedure builds on ideas from two separate contributions in the literature. The first contribution is the work by Svensson (2005) and Svensson and Tetlow (2005), who show how to compute optimal commitment policies that accommodate a "judg-mental" projection that originates outside of a particular model. 1 In this paper, we also place emphasis on the use of judgmental projections rather than filtering structural shocks, but go beyond these earlier contributions in several ways. First, we incorporate occasionally binding constraints efficiently. Second, our procedure is considerably faster because it is based on precomputed impulse responses and uses only a small subset of model variables. Third, we can compute commitment policies for sequences of changing judgmental projections while honoring the initial state-contingent commitment. Finally, we do not confine ourselves to optimal commitment policies, but also show how to solve for optimal discretionary policy and simple rules.
The second contribution is the work by Holden (2016Holden ( , 2019, who provides an efficient algorithm to compute solutions to forward-looking models with occasionally binding constraints using impulse responses to anticipated policy shocks. We generalize his algorithm to compute a large number of policy counterfactuals, including optimal policy under commitment and discretion. Besides providing a simple way to compute policy counterfactuals, our procedure also facilitates the comparison of the effects of economic policies across different models, and can thus be used to address concerns of model uncertainty. All the information needed for such a comparison is contained in the impulse responses to anticipated shocks to the policy instruments. If these responses are identical for two models, then any choice of policy will yield the same outcomes (for the variables considered) in either model, thus providing a weaker form of the "principle of counterfactual equivalence" studied by Beraja (2021). Lucas (1976) argued that one needs to understand fundamental economic relationships to conduct credible policy experiments. A practical insight that emerges from our analysis is that not the entire model needs to be correctly specified for such policy experiments to be valid. Our procedure (and, for that matter, any other solution method) can yield valid counterfactuals even when some aspects of a model are misspecified. What is crucial is that the impulse responses to anticipated monetary policy shocks are correctly specified, since they completely summarize the ecomomy's response to changes in policy.
Our procedure is currently limited to models that are linear up to occasionally binding inequality constraints and quasi-perfect foresight solutions. However, it is straightforward to extend it to higher-order perturbation approximations of non-linear models with occasionally binding constraints and without perfect foresight using the computationally efficient methods developed by Holden (2016).
The remainder of this paper is structured as follows. Section 2 describes the basic setup and introduces the relevant concepts and notation. Section 3 shows how to solve for policy counterfactuals in completely linear models. Section 4 describes how we approximate our solutions with finite computing horizons. In Section 5, we add occasionally binding constraints, and in Section 6 we extend our results to a tractable case of incomplete information that allows us to accommodate historical data revisions. A number of further extensions of practical relevance are discussed in Section 7. Section 8 contains our application to the U.S. economy around 2015 and Section 9 concludes.

Basic setup
In this section, we lay out the basic assumptions underlying our procedure and introduce relevant notation. We start with a generic structural macroeconomic model and then show how the two inputs into our procedure, baseline projections and impulse responses, fit within the model. We then show that these two inputs are sufficient to obtain model solutions. To fix some notation straight away, N is the set of integers and R is the set of real-valued numbers. R N×n , for n ∈ N, denotes the space of vector-valued sequences (x t ) ∞ t=0 with x t ∈ R n . We consider the class of forward-looking stochastic models that are linear except for occasionally binding constraints that affect the conduct of policy. Time is discrete at t ∈ N, so the model has a fixed initial period and an infinite horizon. The number of endogenous model variables is n. There are two types of variables: A set of p policy instruments z t ∈ R p which can be chosen freely by the policymaker, and a set of n − p endogenous variables ξ t ∈ R n−p . The endogenous variables depend on k exogenous shocks u t ∈ R k that are uncorrelated across time and have mean zero. We group all variables save for the exogenous shocks into one vector y t = (ξ t , z t ) ∈ R n . Initial conditions y −1 are taken as given and can also be stochastic. To keep the notation light, we simply denote with y the stochastic process t=0 . We define F as the natural filtration of the exogenous variables (y −1 , u 0 , u 1 , . . . ); that is, F = (F t ) ∞ t=0 with F t the σ-algebra generated by y −1 , u 0, , . . . , u t . The endogenous variables y evolve according to the system of model equations: (1) The matrices have size Φ −1 , Φ 0 , Φ 1 ∈ R (n−p)×n and Φ u ∈ R (n−p)×k . The expectations used throughout the paper will be defined under quasi-perfect foresight: The imposition of quasi-perfect foresight is unnecessary when z is linear in u, because in that case certainty equivalence applies. But it becomes important when policy instruments are subject to non-linearities such as an effective lower bound (ELB) on interest rates. We note that it is straightforward to extend our procedure to approximate non-perfect foresight expectations and non-linear models using the techniques developed by Holden (2016).
The starting point for the analysis is a "baseline" solutionȳ = (ȳ t ) ∞ t=0 : an arbitrary stochastic process adapted to F that solves (1). 2 Uniqueness of this solution is not required at this stage. Additionally, we require knowledge of the perfect foresight expectations of y, i.e. of E tȳt+s for s, t ≥ 0. In practice, this "baseline projection" will be forecast of the economy made by policy institutions. 3 It is the first of two inputs to our procedure. the structural shocks u and under a particular policy regime, it is not necessary to know these determinants ofȳ.
Next, we introduce a linear policy regime Ψy t = 0. The choice of this rule is largely arbitrary and does not have to be related at all to the behavior of policy in the baseline or the desired policy counterfactuals. The only requirement is that the rule in combination with (1) yields a unique, non-explosive solution of the model, i.e. that it satisfies the Blanchard and Kahn (1980) conditions. To this rule, we append a set of anticipated shocks: For t, s ≥ 0, ε t−s,t ∈ R p is a zero-mean shock that is realized at time t but anticipated By assumption, the linear system of Equations (1) and (3) yields a unique solution for any realization of shocks. It is a standard computational exercise to find the impulse response of y t+s to ε t,t+τ for s, τ ≥ 0, which we denote M sτ ∈ R n×p . These impulse responses are the second input to our procedure. While computing M sτ does require solving the model and its structural equations, this needs to be done only once and under an arbitrary policy regime. These impulse responses contain all the information about the model that is needed to accurately compute policy counterfactuals.
Because of the linearity of (1)-(3), there exist realizations of ε that reproduce the baselinē y. Taking expectations of (3), these "baseline shocks" 4ε are computed as: The baselineȳ solves (1) and (3) givenε and u and this solution is unique. To define the above shocks for t = 0, we employ the convention E −1ȳs = 0 for all s ≥ 0.
Next, we introduce a new set of "standardized policy instruments" x. For any process 4 These baseline shocks are called "add factors" in Svensson and Tetlow (2005).
(x t ) ∞ t=0 ∈ R N×p that is adapted to F, we define corresponding shocks: with the convention that E −1 x s = 0 for s ≥ 0. This implies x t = Ψ (y t −ȳ t ). By working with the standardized instruments x rather than the original instruments z, we can ignore the distinction between policy instruments z t and other model variables ξ t .
We can now make use of the linearity of the model and express the solution to (1) and (3) in deviation from the baselineȳ: In particular, for x = 0 we get back the baseline y =ȳ. By choosing an appropriate x, one can use (5) to obtain solutions to (1) under any counterfactual policy regime.
Proposition 1. Consider the function F that maps stochastic processes (x t ) ∞ t=0 ∈ R N×p to stochastic processes (y t ) ∞ t=0 ∈ R N×n through Equation (5). For every x adapted to F, F (x) solves (1), and for every y that solves (1) and is adapted to F, there exists an x such that Proof. The first part of the proposition follows by construction of F : Let x be a stochastic process adapted to F. Then we can construct shocks ε from x through (4), and then use (5) to recover a solution to (1). For the second part, let y be a process adapted to F that solves (1). Construct x t = Ψ (y t −ȳ t ). For this x, F (x) is a solution to (1). With this x and the corresponding shock ε obtained from (4), y jointly solves (1) and (3). Because we have assumed that (3) yields unique solutions for any combination of shocks, it has to be that The proposition implies that, in order to compute model solutions under different policy regimes, all that is needed is knowledge of the baseline processȳ and the impulse responses M sτ . It is neither necessary to know the structural equations of the model, the original policy instruments z, nor the exogenous shock processes and their realized values. In fact, it is possible to work only with a subset of the original model variables, as long as that subset is sufficient to perform the computations of desired counterfactual solutions.
The Holden (2016) algorithm for imposing an ELB constraint in otherwise linear models can be seen as a special case of our procedure. For Holden,ȳ is the unconstrained solution to a model with a linear policy rule, and M sτ are impulse responses to anticipated shocks to the same rule. This can then be used to compute a new solution y under the same rule that satisfies the ELB constraint. In our paper,ȳ can instead be any solution, and M can be obtained from a policy rule that is entirely different from the rule, if any, that was used to generateȳ. In addition, the desired counterfactual policy regime with solution y can also be arbitrarily different from the one used to compute the impulse responses. Before proceeding, additional notation will simplify the remainder of the discussion. Denote with y (t) = (y t , E t y t+1 , E t y t+2 , . . . ) the expected path of model variables at time t, and withŷ (t) the stacked revisions to expectations, that is: Again, E −1 y s = 0 for s ≥ 0. Also, let F be the forward-shift operator, i.e. F y (t) = (E t y t+1 , E t y t+2 , E t y t+3 , . . . ) . With this additional notation, we can express the expected path of y at time t as and Equation (5) can be compactly rewritten as: where the linear map M : R N×p → R N×n stacks the impulse responses M sτ for s, τ ≥ 0.
3 Linear policy rules and linear-quadratic optimal policy problems In this section, we show all the basic insights of the paper using policy problems that imply completely linear solutions, because it is the case that readers will be most familiar with.
All policy problems in this section reduce to finding a solution of the form Ω yŷ (t) = 0 for a linear map Ω y : R N×n → R N×p . To solve this kind of problem, define a set of auxiliary variables u t ∈ R p throughû (t) = Ω yŷ (t) and expressx (t) as a function ofû (t) and baseline changes:û The solution ofû (t) = 0 for the standardized policy instruments is: and the endogenous variables arê The map Ω y M : R N×p → R N×p has to be invertible to guarantee the existence of a solution.

Linear policy rules
We start with linear policy rules of the form where A ∈ R p×n . As an example, suppose that there is only a single instrument (p = 1), the nominal interest rate i t , and that we impose a Taylor rule that relates the nominal interest rate to inflation π t and the output gap ygap t through the equation i t = φ π π t + φ y ygap t . We can express this in the form (10) as i t − φ π π t − φ y ygap t = 0.
We assume that agents know this condition to hold at all times in the future, so that AE t y t+s = 0 as well. By linearity of expectations, A (E t y t+s − E t−1 y t+s ) = 0 as well and we can write: Define u (t) = Ω y y (t) with Ω y = (I N ⊗ A). 5 We can now proceed to find the solution through (9). If the rule (10) implies a determinate solution, then our procedure will recover this solution by Proposition 1. If the rule leads to indeterminacy, then the procedure will select one possible solution.
To find the counterfactual evolution of the economy under rule (10), it is not necessary to know the baseline projection and impulse responses for all model variables. It is sufficient to know these objects for the variables that enter the rule. For the Taylor rule above, only the baseline projection of, and impulse responses for inflation, the output gap and the nominal interest rate have to be known in order to compute the counterfactual model solution. This is true regardless of whether the underlying model is a large-scale estimated model involving many equations and variables, or a simple three-equation New-Keynesian model.

Optimal commitment policy
Next, we consider the problem of optimal policy under commitment. The objective of the policymaker is to minimize a quadratic loss function of the form where β ∈ (0, 1) and the weighting matrix W ∈ R n×n is positive semi-definite. By Proposition 1, all feasible solutions to (1) available to the policymakers are given by (7) for some 5 The operator ⊗ denotes the extension of the Kronecker product to infinite-dimensional vector spaces.
process for the standardized policy instrumentsx (t) . Therefore, we can write the constraints to the optimization problem as follows: The second constraint is necessary to ensure thatx (t) is indeed an unanticipated revision to the policy stance, which will end up to be a function of unanticipated baseline revisions.
We aim to obtain a recursive formulation of the optimal commitment policy by applying the Lagrangian method of Marcet and Marimon (2019) on the impulse-response based form of the problem. The Lagrangian is: The first-order conditions for y t andx (t) t+s are: s with the convention that µ (−1) = 0. 6 Substituting out the multipliers λ t , one obtains: One can subtract the time t − 1-expectation of this equation and get: Combining these conditions for all s ≥ 0 yields a linear system of equations inŷ (t) : where B = diag (1, β, β 2 , . . . ) and the transpose operator is defined canonically such that and solve using (9). 6 We do not optimize from a timeless perspective.
Equation (13) constitutes a recursive formulation of the optimal commitment problem.
Remarkably, it is not necessary to carry additional Lagrange multipliers for this linearquadratic problem (although we will need to do so once we introduce occasionally binding constraints later on). Because of the linearity of the first-order conditions, the response of the optimal commitment to shocks is the same regardless of when the commitment started and what promises are being carried from the past.
We note again that in practice, only a small subset of model variables is required in these computations. If, for example, the weighting matrix W is such that policymakers are only concerned with deviations of an inflation and a measure of economic activity, as is commonly assumed in the literature, then only the baseline projection and impulse responses for these two variables have to be known in order to be able to solve for the optimal policy.

Optimal discretionary policy
Under discretion, we can think of there being a different policymaker at every point in time t 0 that takes decisions by future policymakers as given. The policymaker minimizes the objective function subject to the same constraints (11)-(12) as under the commitment problem. The difference relative to the commitment case is that the optimization considers only losses that start accumulating in t 0 , and that the policymaker can only choose the instruments at time t 0 , Future values of the instrument, and expectations thereof, are taken as given by the policymaker.
The Lagrangian of this problem is the same as for the commitment problem, but where the quadratic part starts summing only at t 0 : Combining these conditions yields: and subtracting the time t − 1-expectations of the equation, we obtain: Combining these conditions for all s ≥ 0 yields again a linear system of equations inŷ (t) : where M L is the lower triangular part of M : M L,ts = M ts 1 (t ≥ s). We can then define u t throughû (t) = Ω yŷ (t) with Ω y = M L (B ⊗ W ) and solve using (9).
The optimal policy problem under discretion turns out to be no more difficult to solve than the commitment problem. The only difference is that the lower triangular part of M enters the matrix of first-order conditions instead of the full matrix M . This aspect of our procedure presents a strong advantage to existing solution methods which rely on iterative fixed-point procedures to compute discretionary policies, such as the Dennis (2007) algorithm.

Finite-horizon approximation for computations
Due to the infinite horizon of the model, computing solutions requires manipulating infinitedimensional series which is not feasible on a computer. But, similar to Svensson (2005), the computations are straightforward to adapt to an arbitrarily distant finite horizon , and the resulting solutions can approximate the true solution to arbitrary precision under general conditions.
We start with approximations of the key model equations (6) and (7) for a fixed horizon T < ∞. We define the finite vector of elements in y (t) up to the horizon T as y We first approximate (6) with: where the finite-length forward shift operatorF is defined as the linear map satisfying F y 0:T , we use the last available value twice. Revisions in the expected model outcomes are related to the revisions in the standardized instruments through an approximation of (7): The linear mapM : R (T +1)p → R (T +1)n is now a finite-dimensional matrix consisting of the impulse responses of outcomes, and shocks that are anticipated to occur, up to T periods in All the policy problems studied in this paper can be approximated from this point onward.

Adding occasionally binding constraints
Occasionally binding constraints can easily be added to the problems in Section 3. As shown by Holden (2019), the resulting problems can be expressed as mixed-integer linear programming problems. The problems in this section take the general form where ·, · is the product x, y = (x 1 y 1 , x 2 y 2 , . . . ) . The problem involves a set of auxiliary variables u t ∈ R q . The maps Ω y and Ω u map into R N×n and the maps Θ y and Θ u map into R N×q . Provided again that Ω y M is invertible, we can writex (t) as a function ofû (t) : and use this to express y (t) as a function of u (t) : For the last line, we have used the relation (8) and expressedû (t) = u (t) − F u (t−1) . The problem (17)-(20) in u (t) thus has the form of a standard linear complementarity problem .
The finite-dimensional approximation of this problem has the form u 0:T ∈ R (T +1)q andQ ∈ R (T +1)q×(T +1)q . As noted by Holden (2016Holden ( , 2019, it can be solved efficiently using mixed-integer linear programming (MILP) methods. There are several ways to express the LCP problem in a MILP representation. We choose the following representation: The constant ω has to be chosen large enough for the problem at hand. If there are multiple solutions to the LCP problem, this representation will choose the one for which the sum of the absolute values of u (t) 0:T is minimal. When the constraint is the ELB, this roughly represents the solution for which deviations from the unconstrained case are smallest. Referring once again to Holden (2019), we note that finding all possible solutions to the LCP problem without the need for choosing an appropriate scaling constant ω is also possible.

Simple rules
Adding occasionally binding constraints to simple policy rules usually takes the form of the following conditions: Ay t , Cy t = 0 where A, C ∈ R p×n . This problem has the form (18)-(19) with Ω y = I N ⊗ A, Ω u = I N ⊗ I p , Θ y = I N ⊗ C and Θ u = 0.
As an example, consider again the Taylor rule i t = φ π π t +φ y ygap t , but modified to respect an ELB constraint i t ≥ i. This can be expressed as A rule that responds only to negative output gaps can also be accommodated. Such an asymmetric rule is more consistent with the Federal Reserve's recently revised monetary policy framework than rules that respond symmetrically to the output gap. A Taylor rule with asymmetry and an ELB takes the form i as well as complementary slackness conditions. We include simulations of such a rule in our application in Section 8.

Optimal policy under commitment and discretion
Let us consider the optimal commitment problem with an occasionally binding constraint: with C ∈ R q×n . Note that here, the number of inequality constraints q can be smaller, equal or larger than the number of instruments p. The Lagrangian of this problem is: t+s , s ≥ 0 are: and this can be combined as in Section 3: In addition, we need Define u (t) = η (t) . Then we can express this problem in the form (18)-(20) with In the case of discretion, it is straightforward to verify that, analogously to Section 3, the problem has the same form as under commitment, except that the map M is replaced by M L in the definition of Ω y and Ω u .
Incorporating the ELB constraint into optimal policy problems can easily be achieved by including the constraint i t − i ≥ 0 the set of constraints Cy t ≥ 0. But more complex policy problems can also be accommodated. As an example, consider an "asymmetric" objective in which policy penalizes discounted deviations of inflation π t from some target, normalized to zero, and of shortfalls of output from potential output so that the loss function This loss function is not quadratic, but the problem can nevertheless be rewritten with a quadratic objective. To do so, introduce an auxiliary variable aux t and assume that the policymaker can control this variable, so that the number of policy instruments p is increased by one. The impulse responses of anticipated shocks to the additional instrument are given by the identity for aux t and zero for all other variables.
Now write the loss function as E 0 ∞ t=0 1 2 β t π 2 t + (aux t ) 2 and add the additional inequality constraint −aux t + ygap t ≥ 0. This new problem with a quadratic loss function is equivalent to the original one: Suppose ygap t ≥ 0, then it is possible to set aux t = 0 and therefore minimize the term (aux t ) 2 in the loss function. If ygap < 0, then the term (aux t ) 2 is minimized when aux t = ygap t .
So far, we have assumed that the current state of the economy y t is perfectly observable to the central bank. In practice, however, policymakers face a large amount of uncertainty about how to interpret current data and even how to interpret the past. Notably, economic data are subject to revisions that rewrite the path of history, which policymakers need to take into account.
In this section, we extend our procedure to a tractable case of imperfect information that is able to accommodate historic revisions of the underlying baseline projection. The economy continues to be described by the model in (1), and solutions to the model continue to be adapted to the filtration F describing the information of the private sector whose behavior is described by the model. The central bank, however, possesses more limited knowledge about the economy. Its information is described by a more restricted filtration Policymakers have to choose the instruments z t such that they are adapted to F * . The central bank's expectation is related to the full information expectation through the relation: t+s .
The above equation is just an identity that defines e (t) t+s as a residual, but the term e (t) t+s can be thought of as the measurement error of the central bank.
The important assumption we make is that e (t) t+s is independent of policy: The error e is the same for every choice of the policy variables z. With this assumption, the evolution of the economy under the central bank's expectation is given by the following modification of (5): To see this, note first that E * t y t+s − E * tȳ t+s = E t y t+s − E tȳt+s because of our assumption that e is independent of policy, so that it is the same under the baselineȳ and any counterfactual y. Thus, we have that E * t y t+s −E * tȳ t+s = E t y t+s −E tȳt+s . Equation (25) follows directly from this fact. Also, because E * t x t+s = ΨE * t (y t+s −ȳ t+s ), this also implies that E * t x t+s = E t x t+s .
Analogously to Section (2), we defined y * (t) t+s = E * t y t+s and collect current and future states of the economy in y * (t) = y * (t) t , y * (t) t+1 , y * (t) t+2 , . . . . Because we now need to keep track of changes in history as well, we also introduce y * (t) to denote the history of model outcomes at time t. Hats will denote revisions as before. With this notation, we can write (24)-(25) more compactly as: We note that policymakers control the instruments z t . Thus, there is no uncertainty about current or past values of these instruments: E * t z t−s = z t−s for all t, s ≥ 0. This is satisfied in particular for the baseline projectionz of the instruments.
The computations for simple policy rules and optimal policy problems are preserved under this particular information structure. Consider the computation of outcomes under a simple policy rule with an occasionally binding constraint, as in Section (5.1). Under imperfect information, this requires: As an example, consider again the Taylor rule i t = max {φ π π t + φ π ygap t , i}. The incomplete information version is i t = max {φ π E * t π t + φ π E * t ygap t , i} . but modified to respect an ELB constraint i t ≥ i. This can be expressed equivalently as This problem corresponds to the form with Ω y = I N ⊗ A, Ω u = I N ⊗ I p , Θ y = I N ⊗ C and Θ u = 0. Using (26) Next, consider the problem of computing optimal commitment policies with an occasional binding constraint as in Section 5.2, but under incomplete information. Let us consider the optimal commitment problem with an occasionally binding constraint: We have simply replaced full-information expectations with incomplete information expectations. The first-order conditions for y t and x (t) t+s , s ≥ 0 are: Note that the fact that there is uncertainty about the past does not enter the considerations of the optimizing policymaker. The reason is that, when history gets revised, the policymaker cannot rewrite the policy instruments retroactively, but can only adjust the current instruments, which only affect current and future economic outcomes. The problem thus has again the same form as in Section 5.2, but where the baseline is given byȳ * . Again, the central bank's perception of the counterfactual equilibrium path under optimal policy can now change in history, but the revisions move in lockstep with the revisions to the baseline projection according to (27).

Further extensions
The computations presented so far can be extended easily in many different directions.
Here, we present three that are of particular practical interest. First, we present solutions to problems with multiple policy instruments where the counterfactual policy regime involves a mix of equality and inequality constraints. Second, we discuss policy regimes that have a more complex form such as "if" statements, a situation that naturally arises in the context of policies embedding a promise to keep interest rates low until a certain threshold of economic conditions is met-sometimes called "outcome-based forward guidance". Third, we show how to compute optimal policy with commitment for a finite number of periods and discretion thereafter, which turns out to be no more complex than the pure commitment solution.

Mixed constraints
One case that has not been covered yet is a mix of equality and inequality constraints on the policy problem. Such a situation can arise in particular when there are multiple policy instruments and only a subset is subject to inequality constraints; or when auxiliary variables need to be defined in order to express the policy problem.
The general form of the problems in this section is as follows. Letû (t) be partitioned intô 2 ∈ R T ×q 2 with q 1 + q 2 = q. Let S 1 and S 2 be the canonical mappings for whichû (t) = S 1û Assume again that Ω y M is invertible and write R = M (Ω y M ) −1 . We make use of (21) to We now let Π ij = (Θ yi RΩ u + Θ ui ) S j for i = 1, 2. We can substitute (37) into (36) and obtain: This can be used to solve forû Substituting this expression back into (37), we obtain: Using the above expressions forû (t) 2 andŷ (t) , we can express the inequality (34) in the form 1 . The parameters Q and q (t) are given by: Again, we start with simple rules involving inequality and equality constraints. We want to impose Ay t ≥ 0, Cy t ≥ 0, Ay t , Cy t = 0, and Dy t = 0. The matrices are D ∈ R n×q 1 and A, C ∈ R n×q 2 with q 1 + q 2 = p. We constructû (t) fromû . This has the form (32)- (35) with Next, we turn to the optimal commitment problem with multiple instruments and inequality and equality constraints: The Lagrangian of this problem is: The main first-order condition is: In addition, a solution has to satisfy (I T ⊗ C) y (t) ≥ 0, (I T ⊗ D) y (t) = 0, η (t) ≥ 0 and η (t) , (I T ⊗ C) y (t) . Now we let u (t) 1 = η (t) and u (t) 2 = φ (t) . This has the form in (36)- (35) with The case of discretion has the same form, except that the map M is replaced by M L in the definition of Ω y and Ω u .

Regime switching and other piecewise linear problems
While many policy problems of practical importance can be expressed in the linear-quadratic forms with occasionally binding inequality constraints outlined so far, there are some that fall outside this set. Prominent examples are the "threshold" rules in Bernanke, Kiley, and Roberts (2019), where the policy rate is kept at the ELB until some condition is met, e.g.
until the cumulative shortfall of inflation since the ELB became binding is made up. These rules consist of different regimes with switching conditions that depend on the endogenous model variables. These kinds of problems can easily be expressed as mixed-integer linear programming problems using methods that are well established in operational research (see, for example, Williams, 2009).
As a simple example, consider imposing a regime-switching rule in the case of one policy instrument under which Ay t = 0 ∈ R if Dy t ≥ 0 ∈ R and By t = 0 ∈ R if Dy t < 0.
To express this in a MILP representation, introduce the auxiliary variable u t = Dy t . An equivalent definition is Ω yŷ (t) = Ω uû (t) with Ω y = (I N ⊗ D) and Ω u = I N . Using (22), we can express y (t) in the form y (t) = Qu (t) + m (t) . We can then represent the logical "if" constraints as a mixed-integer programming problem in a similar way to the representation of the LCP problem in Section 5: Again, the constant ω has to be chosen large enough for the problem at hand. If there are multiple solutions to this problem, this representation will choose the one for which the number of time periods spent in the regime By t = 0 (corresponding to Z t = 0) is minimal.

Finite-horizon commitment
Our procedure can also be used to easily solve optimal policy problems where the commitment horizon is finite, for example , when policymakers are assumed to be able to commit to a policy for a fixed number of periods and act with discretion thereafter, or where policy gets re-optimized in fixed intervals.
Concretely, assume that there is a succession of policymakers that take control of policy at times (t k ) ∞ k=0 with t 0 = 0 and t k > t k−1 for k ≥ 1. The kth policymaker who gets in charge of policy at t k is able to commit to a policy through the end of her term in period t k+1 − 1 and takes policy decisions as given thereafter. The full discretionary case is nested in this formulation for t k = k.
The kth policymaker minimizes the objective function subject to the same constraints (11)-(12) as under the full commitment problem. The Lagrangian of this problem is: The first-order conditions for y t andx (t) t+s are: Combining these conditions yields: Subtracting the time t − 1-expectations of the equation, we obtain: We take this first-order condition for t k ≤ t + s < t k+1 and t < t k+1 . If t 1 ≥ t then the kth policymaker is not in charge anymore. Otherwise, we are considering a window of t 0 − t ≤ s ≤ t 1 − t. Combining these conditions yields once again a linear system of equations inŷ (t) : where M f t is a blockwise lower triangular version of M . For t = 0, this map can be represented as: M t 1 :t 2 −1,0:t 1 −1 M t 1 :t 2 −1,t 1 :t 2 −1 0 · · · M t 2 :t 3 −1,0:t 1 −1 M t 2 :t 3 −1,t 1 :t 2 −1 M t 2 :t 3 −1,t 2 :t 3 −1 · · · . . . . . . . . . . . .
For t ≥ 1, the blocks have to be appropriately shifted.
We can then define u t throughû (t) = Ω yŷ (t) with Ω y = M L (B ⊗ W ) and solve this problem in the presence of linear equality or inequality constraints as described previously.
The problem has the same, low degree of complexity as the full commitment solution.

Application
In this section, we discuss a practical application of our solution method. We compute Importantly, our simulations are based not only on realized data but also on the economic projections of policymakers. Thus, our counterfactuals are conditioned on the information available to policymakers at that time. This is achieved without the need to filter structural shocks because the projections contain all the information about expectations that is relevant for our analysis.

Baseline projections
We use six quarterly vintages of "baseline projections" for our simulation exercises, starting in 2014:Q4 and ending in 2016:Q1. Each baseline projection is based on the median SEP forecast released in that quarter. 7 In the SEP, participants to provide yearly projections for the current and next two or three calendar years as well as for the "longer-run". These projections include real GDP growth, the unemployment rate, and headline and core PCE inflation projections, as well as participants' individual assumptions of the projected appropriate federal funds rate. The Federal Reserve's staff uses a model-guided interpolation and extrapolation procedure as well as current economic data to build quarterly series of these (and other) variables. 8 In particular, the paths of those variables available in the SEP are assumed to gradually converge to the median of the SEP longer-run projections. We will use these quarterly series as our baseline projections. 9

Unemployment Gap
Note: All projections are based on median SEP responses published in the respective quarter. "Federal Funds Rate" is the quarterly average of the nominal federal funds rate in percent. "Inflation" is the fourquarter change in the personal consumption expenditure (PCE) price index in percent. "Unemployment rate" is the quarterly average of the civilian unemployment rate in percent. "Unemployment gap" is the difference, in percentage points, of the unemployment rate to an estimate of the natural rate of unemployment constructed using a mechanical procedure based on current and past median longer-run SEP projections of the unemployment rate. For the federal funds rate and the unemployment rate, dots represent the median longer-run projected values.

Models
We use two quite different models for our simulations. The first is a linear version of the Federal Reserve's FRB/US model, a large-scale estimated general equilibrium model of the U.S. economy that has been in use at the Federal Reserve Board since 1996 and has been repeatedly adapted to the evolving the structure of the economy. The linear version, called small FRB/US or sFRB, reduces the FRB/US model to 63 equations and endogenous variables. For the purpose of our simulations, we only simulate three of these variables, namely the federal funds rate i t , the four-quarter change in the PCE price index π 4t , and the unemployment gap ugap t , which are natively defined in the model. Thus, we only need to compute impulse responses to these three variables.
The second model we use is the well-known Smets and Wouters (2007) (" Smets-Wouters") model, using the posterior mean parameters reported in the original paper. Our implementation of the model has 33 equations and endogenous variables. We make the following translations of our data series to this model: We equate the federal funds rate with the annualized quarterly nominal interest rate (that is, our i t equals 4r t in the model) and the four-quarter change in the PCE index with the sum of the current and last three quarters of the quarterly inflation rate (our π 4t equals 3 s=0 π t−s in the model). Because the Smets-Wouters model does not feature unemployment, we approximate the unemployment gap with the model's output gap through a simple Okun's law and set U t − U * t = 0.5 (y t − y * t ), where y t and y * t are the log-levels of output in the model under sticky and flexible prices, respectively.
For both models, we compute impulse responses to anticipated shocks to the federal funds rate using Dynare. It is immaterial how the policy instrument is set in the models at this stage. We then standardize 10 these impulse responses to those of shocks to the following rule, which is an unemployment gap version of the Taylor (1993) rule: In addition to the three variables we simulate, the long-run level of the natural real interest rate r * t and the natural rate of unemployment U * t also appear in the rule. We assume that these two additional variables are independent of policy; thus, the impulse responses of these variables to anticipated policy shocks are zero everywhere.  Note: Each panel plots impulse responses M τ s , 0 ≤ τ, s ≤ 80, of a variable in period s (horizontal axis) to a shock occurring in period τ (vertical axis) and fully anticipated in period 0, when the federal funds rate is set according to the Taylor (1993) rule. Variable definitions as noted in the text. Shocks are normalized such that at time τ , the federal funds rate decreases by one percentage point.
interest rates. The endogenous response of the Taylor (1993) rule to the strong movements in inflation mean that the federal funds rate increases before the realization of anticipated accommodative policy shocks.

Counterfactuals using interest rate rule prescriptions
In our first set of simulations, we compute counterfactuals under the assumption that the federal funds rate is set according to the prescriptions of one of the following four rules: The first rule is the Taylor (1993) rule. The second rule is an inertial version of the Taylor (1999) rule. The third and fourth rule are variants of the inertial Taylor (1999) rule. The third rule is an asymmetric rule that responds only to shortfalls of employment. The fourth rule is a price-level targeting rule that responds to the deviation of the PCE price level index p t from a target path p * t . 11 The target path is exogenous to policy and grows at the steady rate of 2 percent. The level is chosen such that p t = p * t in 2014:Q3, right before the start of our simulations. In all rules, the ELB is modeled as a hard lower bound i of 12.5 basis points. Figure 3 shows rules-based counterfactuals computed using the sFRB model. The economy is assumed to follow the baseline projection up to 2014:Q4. At that date, the respective rule starts to be followed; the path of the economy as it would have been projected in that quarter is represented by dashed lines. We then run the simulation using the sequence of baseline projections described above. Each quarter, the projected path of the counterfactual  Taylor (1993) [2014:Q4] Taylor (1993) [2016 Inertial Taylor (1999Taylor ( ) [2014 Inertial Taylor (1999)  The upper panels of Figure 3 show that the Taylor (1993) rule (42) immediately lifts the federal funds rate off the ELB and to a level of almost 2 percent. However, the subsequent downward surprises to inflation in the baseline projections mean that the federal funds rate subsequently drops below 25 basis points over the course of 2015. In 2016:Q1, it stands at just above 1.5 percent and is expected to slowly converge to its long-run level. In contrast, the inertial Taylor (1999) rule (43) only raises the federal funds rate slowly due to its interest rate smoothing term. Because the interest rate starts off at the ELB, this implies a somewhat more accommodative monetary policy stance than under the Taylor (1993) rule, leading to a lower unemployment gap. However, the outcomes for inflation are almost identical to those under the Taylor (1993) rule. This small difference is mainly attributable to the very flat slope of the Phillips curve in the sFRB model. 12 This flat Phillips curve also implies that, in this model, downward inflation surprises in the baseline projection get interpreted as largely exogenous to policy.

Federal Funds Rate
Both the asymmetric and the price-level targeting variants of the inertial Taylor (1999) rule prescribe lower interest rates than the original formulation, which can be seen from the lower panels of Figure 3. Under the asymmetric rule (44) We now repeat these simulations using the Smets-Wouters model. All that is required for this change is to switch out the impulse responses M in the computations. The resulting counterfactual paths are displayed in Figure 4. Qualitatively, the counterfactuals retain the features discussed in the context of the sFRB model above; however, the steeper Phillips curve in this model means that the quantitative differences of the counterfactual outcomes are sizable.
The upper panels of Figure 4 show simulated outcomes under the Taylor (1993) and inertial Taylor (1999) rules. Because the Taylor (1993) rule prescribes tighter policy than the baseline projection and the economy reacts strongly to this difference in the Smets-Wouters model, the 2014:Q4 projection for inflation is substantially lower than in the baseline  Taylor (1993) [2014:Q4] Taylor (1993) [2016 Inertial Taylor (1999Taylor ( ) [2014 Inertial Taylor (1999)  projection, dropping to almost zero. When negative inflation surprises materialize in the baseline projections, this lowers the inflation rate further to almost minus one percent. The deflationary effect of adopting the Taylor (1993) rule is exacerbated by the fact that the ELB becomes binding and constrains the rule from fully responding to lower inflation. In 2016:Q1, the federal funds rate has returned to the ELB for three quarters and is projected to remain at the ELB for another year. By contrast, the federal funds rate stays above the ELB throughout the simulation under the inertial Taylor (1999) rule. Just as in the corresponding sFRB simulation, this rule prescribes more accommodative policy than the Taylor (1993) rule, as can be seen from the higher inflation and lower unemployment gap paths. But the path of the federal funds rate is almost uniformly higher. This is a fairly common phenomenon in New-Keynesian models, particularly when the Phillips curve is steep. Negative shocks to Taylor-type rules can then easily increase nominal interest rates in equilibrium, because the systematic response of these rules to the increase in inflation is stronger than the shock itself.

Federal Funds Rate
The lower panels of Figure 4 show outcomes under the asymmetric and price-level targeting rules. One interesting aspect of these simulations is that, under the price-level targeting rule, the unemployment gap decreases by less than in the corresponding simulation using the sFRB model. Here, too, the explanation can be found in the differences in the slope of the Phillips curve in the two models: In order to make up for a given cumulative shortfall of inflation, policymakers in the model have to be willing to let the unemployment rate fall by more if the Phillips curve is relatively flat.

Counterfactuals using optimal policy prescriptions
We now turn to counterfactuals when the federal funds rate is set to minimize an intertemporal quadratic loss function. We compute counterfactuals under full discretion and full commitment, though intermediate cases are also feasible as noted in Section 7.3. We start with a standard loss function that reads: The loss function places equal weights on deviations of inflation from 2 percent and deviations of the unemployment rate from the natural rate of unemployment. It also penalizes changes in the federal funds rate, which captures a desirability of gradualism that could arise from non-modelled elements such as financial stability considerations, committee dynamics, or communication aspects.
In addition, we also consider an "asymmetric"loss function: This second loss function differs from the first in that it only penalizes unemployment rate outcomes that are higher than the natural rate of unemployment. As in the simple rules simulations, we impose a lower bound on the nominal interest rate of 12.5 basis points.   The upper panels show optimal policy counterfactuals under the standard loss function (46). One can see once again the notable decline of the projected federal funds rate path between the 2014:Q4 and 2016:Q1 projections, due to the downward revisions in inflation. More noteworthy perhaps is that the outcomes under commitment and discretion are not much different from each other over the period shown. This small difference is not a universal feature of the sFRB model, but rather an outcome of the particular economic circumstances projected around 2015. The desire of committed policymakers to improve on the discretionary outcomes by promising a time-inconsistent inflation overshoot in the future is balanced by the cost of the unemployment rate falling persistently below the natural rate, an outcome that is seen as costly under the loss function (46). It is notable that the projected federal funds rate paths in these simulations are similar to the baseline projections, and therefore to the median expectations of FOMC participants stated in the SEP at the time.
The lower panels repeat the simulations under the asymmetric loss function (47). Under this loss function, policymakers do not see negative unemployment gaps as costly and are therefore more willing to improve inflation outcomes than under the symmetric loss function.
Indeed, the federal funds rate paths both under discretion and commitment are lower than their counterparts under the standard loss function, and the unemployment gap paths are also substantially lower. Under commitment, the federal funds rate is projected to stay at the ELB for almost two more years in 2016:Q1, a much later lift-off date than what the FOMC implemented in reality. One can also see that this commitment policy leads to a projected overshoot of inflation above 2 percent, which reflects the standard result in New-Keynesian models that the optimal commitment policy tends to stabilize the price level rather than the level of inflation.
We repeat these simulations using the Smets-Wouters model. The resulting counterfactual paths are displayed in Figure 6.
The optimal discretionary and commitment policies under the standard loss function (46), seen in the top panels of Figure 6, differ noticeably from each other in this model. In particular, the commitment policy engineers a noticeable overshoot of inflation above two percent in order to make up for the shortfall of inflation starting in late 2014. Such an overshoot is absent under the discretionary policy, consistent with standard New-Keynesian theory. The top-left panel also reveals an interesting aspect of discretionary policymaking: The federal funds rate path stays "lower for longer" under discretion than under commitment, yet inflation and economic activity are weaker. The causality, of course, runs the other way: Because inflation is low and the unemployment gap is high relative to the commitment policy, discretionary policymakers are forced to keep interest rates low. The reason why inflation is low in the first place is that discretionary policymakers are unable to credibly promise an inflation overshoot in the future.
The lower panels document the counterfactual optimal policy paths under the asymmetric loss function (47). Because this loss function does not penalize unemployment rate levels below the natural rate of unemployment, inflation runs higher than under the standard loss function. Indeed, the unemployment gap is projected to run very low in these simulations, especially under commitment. The moderate projected overshooting of inflation after 2016 that this policy entails is seen as an acceptable cost for raising inflation in 2015.
We close this section with an exercise illustrating the time-inconsistency problem in monetary policy decisions. Figure 7 shows the 2016:Q1 baseline projection (solid purple lines) along with four different optimal policy simulations with commitment using the Smets-Wouters model and the asymmetric loss function 47. 13 In the first simulation, policy follows the path in the baseline projection until 2016:Q1, at which point policymakers start optimizing with commitment (dotted purple lines). Because inflation in 2016:Q1 is projected to run below 2 percent for some time, the optimal commitment policy engineers a moderate overshoot of inflation in the medium term to improve inflation outcomes in the near term. In the second simulation, policymakers already start optimizing with commitment in 2014:Q4. We compute the counterfactual path of this policy as it responds to new information until we arrive at the projected counterfactual path in 2016:Q1 (solid green lines). At that time, inflation already runs at almost 2.5 percent (year-over-year) and is projected to stay above 2 percent until 2019. Policymakers intend to raise the federal funds rate for the first time in early 2017. From the vantage point of 2016:Q1, such a policy is suboptimal because inflation is above target, but it is consistent with the initial commitment from 2014:Q4: Promising an inflation overshoot was necessary then to stabilize inflation in 2015.
To illustrate this point further, we also show what would happen if policymakers, after their initial commitment in 2014:Q4, were to unexpectedly restart their commitment in 2016:Q1 (dashed green lines). 14 At this point, policymakers immediately lift the federal funds rate off the ELB. Inflation is projected to swiftly come back to 2 percent and to remain close to this level over the period shown. Because the benefits of the initial commitment in visible in this case. Qualitatively, the same results are obtained when using the sFRB model or the standard loss function 46.
14 To keep the simulations comparable, we assume that policymakers drop their initial commitment without suffering a loss of credibility.
terms of inflation stabilization have already been reaped, policymakers find it beneficial to renege on the promised inflation overshoot.

Conclusion
In this paper, we have proposed a computational procedure to solve for policy counterfactuals in linear models with occasionally binding constraints. The procedure requires only minimal knowledge of the structural model. The only two inputs are a projection, or sequences of projections, of the variables entering the policy problem; and impulse response functions of these variables to the monetary policy instruments under an arbitrary policy.
We have shown how to compute solutions for instrument rules and optimal discretionary and commitment policies, as well as various extensions of practical relevance, and provided a practical application to counterfactual paths of the U.S. economy around 2015 for several policy regimes and models.
There are several directions in which our findings could be extended in future work.
First, while we are currently restricted to models that are linear up to occasionally binding constraints and quasi-perfect foresight expectations, one can apply the methods described by Holden (2016) to extend our method to higher-order perturbation approximations of nonlinear models without perfect foresight. Second, we implicitly assume that the counterfactual policy regimes we compute satisfy the Blanchard-Kahn conditions in the absence of inequality constraints, but our procedure could also be used to study sunspot solutions. Third, it seems worthwhile to use the representation of a model by its impulse responses to construct formal measures of similarity between different models.