The Bank Names Its Rate

monetary policy · interest rate target · IS-LM · money supply

The central bank of Sorrel announces a target interest rate and then supplies exactly the money that makes the equilibrium rate equal to it. Output Y is in millions of base-year crowns per year, the interest rate r is a fraction (5 % is 0.05), T is a fixed tax, G government purchases, M the money supply and P the price level, which stays fixed:

  • goods market: output equals planned spending, Y = C + I + G, with consumption C = c_0 + c_1 \, (Y - T) and investment I = i_0 - i_1 \, r;
  • money market: the real money supply equals real money demand, \dfrac{M}{P} = k \, Y - h \, r.

The IS-LM equilibrium is the one pair (Y, r) that clears both markets. The economy e is in its equilibrium with money supply e["M"].

Write rate_target(e, r_target) that returns a tuple (M, Y, dY): the money supply that makes the equilibrium rate equal to r_target (everything else as in e), the equilibrium output it gives, and the change in equilibrium output from the current one. If reaching the target would take a money supply of zero or less, return None.

The tests build each economy with the helper economy(c0, c1, T, i0, i1, G, k, h, M, P), which returns the dict {"c0": c0, "c1": c1, "T": T, "i0": i0, "i1": i1, "G": G, "k": k, "h": h, "M": M, "P": P}; you may use it too.

Examples

Input:  e = economy(100, 0.75, 100, 300, 2000, 200, 0.5, 4000, 1300, 2), r_target = 0.04
Output: (1460.0, 1780.0, 80.0)
Explanation: at r = 0.04 investment is 220 and the goods market clears at
(225 + 220) / 0.25 = 1780. Money demand there is 0.5 * 1780 - 4000 * 0.04 = 730,
so the real money supply must be 730: M = 730 * 2 = 1460. The current output is 1700.

Input:  e = economy(100, 0.75, 100, 300, 2000, 200, 0.5, 4000, 1300, 2), r_target = 0.15
Output: None
Explanation: at r = 0.15 output is 900, and money demand 450 - 600 is negative.

Constraints

  • answers are compared with a tolerance of 1e-6; do not round

Goals

  • See that with the rate fixed, the goods market alone pins down output
  • Find the money supply that makes the money market clear at the target rate
  • Compare the new equilibrium with the current one
Starting Python…