Saturday, July 5, 2014

Sunday, April 13, 2014

Nick Edmonds' simulation model for Samuelson and inside money: interactive version

Here is an updated interactive sheet. Six iterations are done now at each time step and I've produced all the plots. If you download the spreadsheet you'll see all the calculations are done on a single page now. Instead of parameter "gL" entered as a percentage (like I had before) I kept it as factor "g" so for example instead of entering 2% you'd now enter 1.02. I did this just to be consistent with Nick Edmond's blog post. I kept my original blog post here underneath this new spreadsheet. Enjoy! (There may be a bug: this one is not as robust as the old one: it doesn't handle changing in the inflation rate very well: but on the plus side you can try changing some of the other parameters). I corrected one bug: the solution always started from the same initial guess when it should have used the solution for the time step before as the first guess, thus it didn't always converge: Newton's method (in this case the vector version) is sensitive to where you start: you need to be close enough (in which case it converges rapidly), which you can get a feel for here. But I still have a problem with the auto-scaling of the plots. I think this is because I'm plotting values across hidden rows. The values in the hidden rows are not plotted, which is what I want, but I suspect they still do contribute to the axis auto-scaling solution. This problem is only apparent in the Price of Land plot with the default input parameters, but becomes apparent in other plots when you change some of the other parameters. The "eps" parameter only affects the Newton's method solution (it's the size of perturbations used to numerically calculate the Jacobian matrix) and has nothing to do with the model, but you can change that too (note in this case the Jacobian could well be calculated in closed form, but I wanted a more general approach). I have not tried changing all the different parameters, so it's quite possible you could break it! I've mostly just played with "g" and "alpha."





I never did end up using the circular reference iteration facility in Excel because of the nature of this problem: each time step depends on the prior one. Thus you can't really iterate at each time step independently. Thus the iterations are hardcoded in the spreadsheet, but in a fairly compact fashion. If you try downloading the spreadsheet, the "Results" sheet does all the work and looks fairly tidy, with the solution at each time step laid out one per row in a table. If you were to unhide all the rows and columns however, it would look worse, but not unmanageable. Between each pair of rows (save the 1st two), are the six Newton's method iterations laid out with the solutions in columns (I transpose to save vertical space). It's set up in such as way that if you want to add time periods, you can just copy and paste these unhidden blocks to the end (so, for example, it'd be easy to nearly double the number of time steps with a single copy and paste of the existing solution blocks appended to the end). Unhiding all the cells is not obvious, but only because I hid cell A1. Unhide that one and you're good (I'll let you figure that out... you may need to do some Googling). In fact, probably unhiding is not necessary to simply extend this solution to more time steps: simply copy paste rows of the existing table to the end. You'd need to adjust the plots of course. But if you want to see how it works or change the formulas, then you need to unhide.

Here's an update to the above. You can indeed keep the spreadsheet looking tidy and use a copy and paste procedure to extend the solution to more times, but doing this is not completely obvious, so I'll give some instructions here. The problem is a straight copy and paste leaves out some of the hidden cells at the top which allows the solution to propagate forward to each subsequent time. To get around this problem you need to unhide at least one of the hidden rows. First go to the "Results" tab of the downloaded spreadsheet. The cells implementing Newton's method are not present between times 0 and 1 (though unlabeled, time is in the 1st columns of the table on the left on the results page). You *could* just unhide all the hidden rows and columns, but to keep it looking tidy and to make it easier to work with we'll just unhide the first row after the time = 1 row, which at the time of this writing is row 4. Use the instructions here (I'm solving the puzzle I proposed you solve yourself with Google in the above paragraph, except on row 4 instead of cell A1). To do this for row 4, replace "A1" in those instructions with any hidden cell in the spreadsheet under row 1 that you'd be able to see if all rows (not columns) were unhidden. So for example the one on the far left of the unhidden columns in row 4 should work: as of this writing, that would be cell "E4." Following the instruction on the link, select "unhide row" in the drop down box on the format menu. Now you should see a blank row appear between the time = 1 and time = 2 rows: in this case row 4, starting with cell E4 on the left. Now copy the full rows starting with row 4 down to however many times you want to add. If you want to add 5 new times, copy from row 4 to row 108 (keep in mind there's a lot of hidden rows in between, which is why the end row is not row 9 = 4 + 5 here), then paste them starting in the first row beyond the bottom of the table (row 403). Be sure to select that whole blank row (row 403) to paste into, otherwise it won't let you do the paste operation, as depicted in Figure 1. Also note in Figure 1 the dashed green outline near the top showing the cells selected to copy. Column W separates the results table on the left from the charts data table on the right (only two columns of which are depicted).

Figure 1: Screenshot of spreadsheet just prior to pasting the copied rows

You should see the block of rows get filled in with answers. The times in the far left column should now range from 21 to 25 in the new rows. This is depicted in Figure 2. Notice how the 1st column on the left (time) started not with 2 (the time in the copied row 4) but with 21 (the first time past the last time entry in the existing table).

Figure 2: Screenshot of spreadsheet immediately after pasting the copied rows.

Now you can continue to paste more cells until you get the table extended out to the time you want. Finish up by re-hiding all the blank rows in the results table. You'll notice that you get some bad values in the table to the right of the results table (in the otherwise blank rows): that's the chart data table for the charts on the "Parameters" sheet. Ignore those: once the row is hidden you can make new charts by either creating them from scratch or updating the data series in the existing charts to include the new rows: the bad values in the hidden rows should not get plotted. You'll need to reformat the x-axis of the chart(s) too because I fixed the maximum value at 20. Good luck!


Below is my original post which I'll leave intact for now:

 

From Nick Edmonds' Simulation Model for Samuelson and Inside Money post. You can edit the whole workbook. If you mess it up and want to start over, just reload the page. This is a first attempt at doing this kind of thing online iteratively with free online spreadsheets. I think I may be onto a better approach here, but have yet to connect all the dots. The "Growth rate for nominal loans" cell at the top changes the gL variable in Nick's write up (see this comment). Nick actually discusses the "Growth parameter for nominal loans (g)" in his table of variables, but the relationship is simple: g = 1 + gL. Enter it as a percentage in the long orange cell near the top (A2:E2). The workbook iteratively solves the equations, but only two iterations are used for each point in time. Check the columns "Cw err," "pa err" and "pc err" to see how close to a solution the two iterations get you. You may need to use the scroll bars. You should see the plot change when you change gL. It's definitely not perfect, but it should work reasonably well for values of gL near 2%.



Newton's method: a forward difference is used to calculate a Jacobian to solve the problem and "delta_base" is the size of the perturbation to the Cw, pa, and pc variables at each time (Each year is a row in the spreadsheet). You can change "delta_base" by editing cell F2 (dark gray) just to the right of gL. The solution shouldn't be too sensitive to delta_base. I could improve the solution by adding more iterations to each of the other tabs labeled 2 through 21. These sheets are a bit ugly... I was interested in getting it to work online with minimal effort (Excel "Solver" and macros are not available online). You can download the workbook by clicking on the Green "X" Excel symbol on the right hand side of the black bar across the bottom of the spreadsheet.

Friday, March 21, 2014

Nick Rowe's example from 'The sense in which the stock of money is "supply-determined"'

Figure 1: Diagram of Nick Rowe's example

In a post from Nick Rowe regarding the sense in which the stock of money is "supply-determined" he sketches out an example with the following definition for the money demand function:
Md=L(P,Y)=PY
He also mentions that:
By cutting the rate of interest, the central bank increases the quantity of loans from the central bank, which creates more money. Eventually P and/or Y will increase and the quantity of money demanded will increase in proportion to the quantity created.
Figure 1 is my attempt to sketch out what this example looks like. The items with "0" indicate the original values prior to the central bank's exogenous cut in interest rates from r0 to r1. Keep in mind that the central bank (CB) is the ONLY bank in this example: there are no commercial banks, and it only loans cash (so no deposits at all in this world) and it is compelled to lend to anyone because they are all good credit risks. I'll also assume that the bank is compelled to sell back to each individual borrower their debt on a dollar for dollar basis at the discretion of the borrower. Some of these assumptions may not be important for the logic of the post though!

Note that the blue downward sloping curve in the upper plot is the "supply curve for loans determined by borrowers" which Nick states is equivalent to "demand for loans by borrowers" in "normal language." He points this out in the comments in his previous post. Also note Md0 corresponds to Y0 and Md1 corresponds to Y1 (if P did not change from P0). However, it's possible also that Y does not change from Y0 and P instead changes from P0 to P1. In fact Nick implies that either or both P and Y could increase in this case which gives us the set of solutions for 1/P lying between the two blue money demand curves (Md0 and Md1) along the red supply curve on the right (Ms1).

Scott Sumner thinks that Nick must mean that where Md0 and Ms1 cross is the solution. He also claims that the MMT people would say that the solution is where Md1 and Ms1 cross. I think Nick is actually saying it can lie anywhere between those extremes.

Also note that in the upper plot the two horizontal green solid lines are the "perfectly-elastic supply functions" for money (each at a fixed interest rate, r0 and r1), and that the two vertical red lines in the upper chart are the two "perfectly interest inelastic" demand curves for  money. Assume the red vertical line on the left is Md0 and that it has already reached equilibrium to match the supply of money (Ms0 in the lower chart). After r is lowered from r0 to r1, then Ms0 goes to Ms1 in accordance with the borrower determined supply for loans curve in the upper plot. Then *eventually* the demand curve for money in the upper plot (still perfectly interest inelastic, and thus vertical) will move right to match the supply curve (Ms1) in the lower plot.

One more thought on the upper plot (with the CB "exogenously" determined interest rate on the y-axis). The solution where the downward sloping blue curve (borrower determined supply curve for loans) intersects the horizontal green "perfectly interest-elastic 'supply' curves for money." I've already noted how in "normal language" (according to Nick) the "supply curve for loans" is called "demand for loans." However, it's better described as a supply curve. But then we have two supply curves intersecting. But then it occurred me to make the following linguistic substitutions, and I think it all becomes a lot more clear:

Replace "loans" with "bonds."
Replace "borrowers" with "bond issuers."

Then the blue line's name makes more sense as a supply curve as we've noted. But also, the horizontal "supply for money" curves instead become "perfectly interest-elastic *DEMAND* curves for bonds at exogenously fixed rates of interest." So then we're back to quantity being determined in the usual way by a supply curve intersecting a demand curve. Hurray! I comment on that here on Nick's post.

The red perfectly interest-inelastic vertical demand for money curves in the upper plot do NOT determine the quantity of money, and instead follow the solution determined by the other two curves.

Note: Scott Sumner suggested in a comment that instead of 1/P on the y-axis in the lower plot, I should instead plot 1/NGDP = 1/(P*Y). If I did this, then there would only be a single downward sloping (rectangular hyperbola) blue Md curve and the solution set of Nick Rowe at Ms1 would collapse to a single point on that curve. I.e. Scott's solution and the "MMT" solution would be indistinguishable (which would probably not please Scott!).

Note that in the upper plot, the x-axis could be labeled "Quantity of loan-principal demanded/supplied (measured in dollars)."

With this later comment, Nick Rowe essentially establishes his solution set at r1 (in Figure 1's lower plot) to be the entire red ray labelled "Ms1"... it would be the small line segment if P and Y were precluded from decreasing.

Tuesday, March 18, 2014

Nick Rowe vs Scott Sumner: Different Answers to a Simple HPE Hypothetical

Figure 1: Nick Rowe's and Scott Sumner's solutions for P

This is a simple hypothetical that I feel get's to the core of concepts like the long term neutrality of money, the quantity theory of money (QTM), and the hot potato effect (HPE) which undergird much of Market Monetarist (MM) thought. If I'm not mistaken, Nick Rowe seems to think my hypothetical is a case where those concepts don't work, while Scott disagrees. Why do I care? Well if they don't work here, then what about our real situation does make them work? How can we be certain that they are indeed working, and if they are how do we know they are completely working?

Setup: This is basically the same as Scott Sumner's "cashless society" hypothetical (case 7) except with the added stipulation that there's just one commercial bank and that the reserve requirement is 0% (Scott didn't specify the number of commercial banks or the reserve requirement). In particular, we have:
  1. Cashless society (no paper reserve notes and no coins).
  2. A central bank (CB) which can buy and sell assets (open market operations (OMOs)).
  3. A single commercial bank with a CB deposit (i.e. reserve deposit). This is the only existing CB deposit account.
  4. The reserve requirement is 0%.
  5. A non-bank private sector which holds deposits at the commercial bank.
Scott points out that in such a case base money consists only of bank reserves (as there's no cash) and thus reserves alone are the medium of account (MOA)*. Now for some important definitions:
P = average steady state price level in the private economy
Ms = reserve supply
Mdn = nominal reserve demand
Mdr = real reserve demand = Mdn/P
Scott Sumner and Mark A. Sadowski say that if Ms changes (e.g. through CB OMOs), then P will change in proportion. Nick Rowe says that in this case demand for reserves will change with Ms. Specifically he noted that if Ms goes to zero then demand for reserves will go to zero. If we take this to mean that demand is proportional to Ms, then P stays fixed regardless of the change in Ms.

The difference between Nick's and Scott's solution is illustrated in Figure 1 for two different values of Ms: we're assuming they start off the same at Ms = Ms0, but then the CB sells assets such that Ms = Ms1. The demand curve (Mdn) in Nick's case scales in proportion to Ms (this is accomplished by scaling Mdr). Nick Rowe says that my Figure 1 looks roughly right. Click here to see an animation.

My question for Nick is what is preventing the long term neutrality of money in this case? What would I need to change about my example, aside from adding cash, for him to agree with Scott? For example, would adding multiple commercial banks do it? Something else? What's the minimum change required?

Relating my hypothetical back to reality, is it really so outlandish to consider the case of a single commercial bank? Mark Sadowski identified a case in France in which the banks were nationalized, and he notes with little effect. In terms of a cashless society, Mark is convinced we'll still have cash a hundred years from now, but Scott agrees it is going away at some point. I believe Canada looked into the consequences of going cashless. But even if Mark is right and cash is here for the long haul, does it really make much of a difference? Isn't it just an arbitrary choice by the depositor about which form to keep his money in? (Mark & Mishkin agree it's the "depositor's choice.") Does it really affect the long term neutrality of money, the QTM and the HPE?

*Although only reserves are MOA, I think both Scott & Nick would agree that both reserves and commercial bank deposits are a medium of exchange (MOE) in this case.

For those wishing to see the above change in Ms sketched out in balance sheets, look here.

Additional notes and links can be found here (warning: redundant and unorganized!)

Although I compiled a more succinct history of this question here, (a copy here) and the question itself has been brought up again here and here. Also, I discuss the history of a preceding related question here (in which the CB buys up the commercial banks).