Research lab · New Keynesian model, fiscal and monetary shocks
A small New Keynesian model with habits, investment adjustment costs, sticky prices and an inertial Taylor rule, solved under rational expectations in the browser. Choose a government spending shock and a policy rate surprise and read the response of output, inflation, rates, consumption and investment.
Peaks are the largest move away from rest in either direction, with the quarter in which it occurs. The multipliers are computed from the fiscal shock alone and do not depend on its size: output change divided by spending change, on impact and summed over the horizon.
The model is linear, so the response to both shocks is the sum of the response to each. Exhibit 4 shows which one is doing the work.
Model. Nine linear equations in quarterly time. Lower-case variables are percent deviations from steady state. Inflation π and the policy rate i are annualised, so the quarterly real rate is one quarter of their difference. E is the model-consistent expectation.
Output. Output is the sum of its parts. Government spending g is measured in percent of steady-state GDP, with consumption and investment shares sc = 0.64 and si = 0.18.
yt = sc·ct + si·xt + gt
Consumption. Households smooth spending, hold habits (h) and cut back when the real rate rises, with strength set by 1/σ.
ct = h/(1+h)·ct−1 + 1/(1+h)·E ct+1 − (1−h)/((1+h)σ)·(it − E πt+1)/4
Investment. Firms invest when the value of installed capital q is high. Changing the pace of investment is costly (φ), which produces the slow, hump-shaped response. q falls when the real rate rises and rises with the expected return on capital, which goes up with the output gap and down as the capital stock k builds. β = 0.99, δ = 0.025.
xt = 1/(1+β)·xt−1 + β/(1+β)·E xt+1 + qt/((1+β)φ)
qt = β(1−δ)·E qt+1 + (1−β(1−δ))·(E yt+1 − kt) − (it − E πt+1)/4
kt = (1−δ)·kt−1 + δ·xt
Inflation. A hybrid Phillips curve. Prices respond to slack with slope κ, and a share of firms index to past inflation (ι).
πt = ι/(1+βι)·πt−1 + β/(1+βι)·E πt+1 + κ·yt
Policy rule. The central bank moves gradually (ρ) toward a rate that responds to inflation and the output gap. The monetary shock m is the deviation from that rule.
it = ρ·it−1 + (1−ρ)·(φπ·πt + φy·yt) + mt
Shocks. Both decay geometrically after quarter 0.
gt = ρg·gt−1 + εgt mt = ρm·mt−1 + εmt
Levels. Reported inflation is the target plus π. The reported policy rate is r* plus the target plus i. The ex-ante real rate is r* + it − E πt+1. The fiscal shock in dollars is converted with the nominal GDP entered above: εg = 100 × shock / GDP, both at annual rates.
Solution. Writing the system as A0zt = A1zt−1 + B·E zt+1 + Cεt, the page looks for the law of motion zt = P zt−1 + Q εt, where P solves
B·P² − A0·P + A1 = 0, Q = (A0 − B·P)−1 C
P is found by cyclic reduction, which doubles the time step at each pass. The solution is accepted only if all roots of P are inside the unit circle (the economy returns to rest) and all roots of (A0 − B·P)−1B are too (no second stable path exists). That is the usual Blanchard and Kahn condition. If it fails, the page says so and shows nothing.
Calibration. The default habit (0.71), investment adjustment cost (5.74), rule smoothing (0.81), response to inflation (2.04) and monetary shock persistence (0.15) equal the posterior means reported for the United States in Table 1 of Smets and Wouters (2007), a medium-scale model that this page simplifies. The default output coefficient of the rule (0.32) is their quarterly estimate of 0.08 quoted for an annualised rate, which is four times larger. Their rule also responds to the change in the output gap, a term left out here. Risk aversion (1.5) is a round illustrative value, a little above their estimate of about 1.4. The Phillips curve slope, indexation and fiscal persistence are round illustrative values in the range of estimated medium-scale models, not taken from that paper. The default shock sizes, r*, the inflation target and nominal GDP are illustrative, not current data.
Limits. This is the demand block of a New Keynesian model, not the full medium-scale system. There is no wage rigidity block, no labour market, no financial sector and no open economy. Potential output is held fixed: extra government spending does not raise labour supply and the capital stock affects the return on capital but not supply, so the output deviation equals the output gap. That is a fair shortcut over a few years and a poor one over decades. Spending is financed by lump-sum taxes and households are Ricardian, so deficits and debt do not matter by themselves. The model is linear: responses scale with the size of the shock, a cut is the mirror image of a hike, and the policy rate is allowed to go below zero. Agents learn of the shock in quarter 0 and know the model, which makes them react faster than the data usually show.
Educational tool. Illustrative inputs, not live data. Not a forecast and not investment advice.