What It Costs to Bring Prices Down

disinflation · sacrifice ratio · Okun's law · credibility · Phillips curve · simulation

Inflation in Dunmere has settled at pi0, and the new governor of its central bank wants it down to target. The only tool in this model is unemployment: the bank can push the unemployment rate above its natural rate by x_t \ge 0 (the excess unemployment in year t, as a fraction: 0.02 is two points). Year by year (t = 0, 1, 2, ..., with \pi_{-1} = pi0):

  • expectations: \pi^e_t = \theta \, \pi_{t-1} + (1 - \theta) \, \text{target}, where 0 \le \theta \le 1 says how much people still go by last year's inflation rather than believe the target;
  • Phillips curve: \pi_t = \pi^e_t - \kappa \, x_t, with \kappa > 0;
  • Okun's law: output is \text{okun} \cdot x_t below its normal level (a fraction of normal output), so okun = 2 turns one point of excess unemployment into two points of lost output.

The bank's plan: in every year that starts with last year's inflation \pi_{t-1} above target + 1e-9, it sets x_t to max_rise or to the excess unemployment that brings \pi_t exactly to target, whichever is smaller. As soon as a year starts with \pi_{t-1} \le target + 1e-9, the disinflation is over.

Write disinflation(pi0, target, theta, kappa, okun, max_rise) that returns a tuple (years, loss, ratio):

  • years: the number of years the plan ran, counting every planned year, even one in which the bank chose x = 0;
  • loss: the total output lost, the sum of \text{okun} \cdot x_t over those years;
  • ratio: the sacrifice ratio, loss / (pi0 - target): output lost per unit of inflation removed.

All rates are fractions (2 % is 0.02).

Examples

Input:  pi0 = 0.08, target = 0.02, theta = 1, kappa = 0.5, okun = 2, max_rise = 0.02
Output: (6, 0.24, 4.0)
Explanation: each year x = 0.02 cuts inflation by 0.01, from 0.08 down to 0.02
in 6 years, losing 2 * 0.02 = 0.04 of output a year.

Input:  pi0 = 0.08, target = 0.02, theta = 1, kappa = 0.5, okun = 2, max_rise = 0.05
Output: (3, 0.24, 4.0)
Explanation: x = 0.05, 0.05, then 0.02 lands on the target: faster, but no cheaper.

Input:  pi0 = 0.08, target = 0.02, theta = 0.5, kappa = 0.5, okun = 2, max_rise = 0.02
Output: (2, 0.08, 1.3333333)   (rounded here)
Explanation: with half of expectations on the target, year 0 expects 0.05,
and x = 0.02 gives 0.04; year 1 expects 0.03, and x = 0.02 lands on 0.02.

Constraints

  • answers are compared with a tolerance of 1e-6; do not round
  • every test's plan ends within 10 000 years

Goals

  • Simulate a disinflation in which the central bank holds unemployment above its natural rate
  • Add up the output lost and divide by the fall in inflation: the sacrifice ratio
  • See how fast or slow paths and more credible expectations change the cost
Starting Python…