I will get to the title eventually, but the first part is some fun numerical differential equation solving. In particular, I'll be looking at the equation

\text{(1) } \frac{dNGDP}{dMB} = \frac{\log NGDP/c_{0}}{\log MB/c_{0}} \; \frac{NGDP}{MB} + NGDP\cdot n(\log MB)

$$

where

An approximate solution to this differential equation assuming $\kappa$ is slowly changing gives us a pretty good fit to the price level and I use it to establish the value of $c_{0} = 0.48$.

The last term is an exogenous noise term (NGDP shocks) I've added to account for the fact that NGDP is not entirely determined by the monetary base -- it experiences exogenous shocks.

You may have noticed that this is all written with the monetary base (MB) as an independent variable, not time. This will lend itself to the sand pile analogy at the end, but mathematically $\log MB$ is a linear function of time so the only effect is a scale factor (linear transform) relating time and the (log of the) monetary base. More on this later.

So let's numerically solve the differential equation (1)!

Wait, what? Of course this is wrong; this first solution neglects the "shocks". Basically, this is what NGDP would be in the absence of exogenous (systematically negative) factors. We'll use this counterfactual to estimate the shocks -- shown in blue here:

The gray line is a random AR(2) process with parameters estimated from the "empirical" shocks (i.e. the difference between the blue and black line in the first graph). We'll take several (30) of these gray paths and see the effect on NGDP (I'm basically doing a Monte Carlo simulation) -- that's in the graph on the right below. The graph on the left is the result with the "empirical" shocks (effectively showing that the procedure checks out):

Let's average the results on the right (shown with two-sigma errors in the shaded region):

This isn't perfect, but it's pretty good for such a simple model. I've never seen an economic model that tries to model NGDP over such a long stretch of time (correct me in the comments). The model is systematically low in the 1960s, but otherwise the empirical data is within the error.

Now there are two immediate issues/opportunities for future blog posts:

The idea is that instead of NGDP shocks occurring at random moments in time, they occur at random points after the accumulation of money in the economy. Think of a pile of sand with a stream of sand falling on top of it (say, in an hourglass, keeping with the relationship with time ... the picture below is from Wikimedia Commons). The stream is the addition of money to the base, the total amount of sand is the total monetary base, and the height of the sand pile is NGDP [1]. As sand accumulates, there are random moments when small avalanches occur, causing the height of the sand pile to drop -- these are analogous to exogenous NGDP shocks (they are caused by gravity), but -- and this is the insight in this analogy -- are inevitable as you add more sand to the pile. As the central bank adds money to the economy, a recession is inevitable (the central bank can offset the impact by increasing the flow of money/sand). A question I have: are these avalanches related to changes in the flow rate? This is essentially issue #2 above. Certainly a slower flow rate will reduce NGDP growth, but does slowing the flow rate cause an avalanche/recession?

I'll leave these issues for future blog posts.

*NGDP = NGDP(MB)*is a function of the monetary base. Everything except the last term is motivated in this post. This equation models aggregate demand (NGDP) transferring information in the market that is captured/recorded by the money supply (the currency component of the monetary base). The ratio of logarithms (referred to as the information transfer index $\kappa$ in the link) accounts for the fact that NGDP is measured in the same units that are defined by the monetary base (dollars in the US) which creates the "unit of account" effect. This effect allows e.g. persistent deflation as seen in Japan, or low inflation as seen in the US.An approximate solution to this differential equation assuming $\kappa$ is slowly changing gives us a pretty good fit to the price level and I use it to establish the value of $c_{0} = 0.48$.

The last term is an exogenous noise term (NGDP shocks) I've added to account for the fact that NGDP is not entirely determined by the monetary base -- it experiences exogenous shocks.

You may have noticed that this is all written with the monetary base (MB) as an independent variable, not time. This will lend itself to the sand pile analogy at the end, but mathematically $\log MB$ is a linear function of time so the only effect is a scale factor (linear transform) relating time and the (log of the) monetary base. More on this later.

So let's numerically solve the differential equation (1)!

Wait, what? Of course this is wrong; this first solution neglects the "shocks". Basically, this is what NGDP would be in the absence of exogenous (systematically negative) factors. We'll use this counterfactual to estimate the shocks -- shown in blue here:

The gray line is a random AR(2) process with parameters estimated from the "empirical" shocks (i.e. the difference between the blue and black line in the first graph). We'll take several (30) of these gray paths and see the effect on NGDP (I'm basically doing a Monte Carlo simulation) -- that's in the graph on the right below. The graph on the left is the result with the "empirical" shocks (effectively showing that the procedure checks out):

Let's average the results on the right (shown with two-sigma errors in the shaded region):

This isn't perfect, but it's pretty good for such a simple model. I've never seen an economic model that tries to model NGDP over such a long stretch of time (correct me in the comments). The model is systematically low in the 1960s, but otherwise the empirical data is within the error.

Now there are two immediate issues/opportunities for future blog posts:

- Is the AR(2) process correct? It seems to look about right except for a couple of large corrections (see the shocks graph above). We can look at this more closely by doing a larger number of Monte Carlo paths and see if systematic deviations hold up. We know if we get the shocks right, we get the empirical NGDP (the graph on the left in the pair above).
- As it was modeled, the shocks are uncorrelated with changes in the monetary base. This seems like a bad assumption (remember the financial crisis?) ... Again, this can be seen if we do a larger number of Monte Carlo paths -- do systematic deviations occur near large changes in the monetary base? I'd like to produce a random sequence that is correlated with changes in the monetary base as well. This would lend credence to the theory that the central bank can cause a financial crisis that has larger effects than would come from monetary policy alone.

The idea is that instead of NGDP shocks occurring at random moments in time, they occur at random points after the accumulation of money in the economy. Think of a pile of sand with a stream of sand falling on top of it (say, in an hourglass, keeping with the relationship with time ... the picture below is from Wikimedia Commons). The stream is the addition of money to the base, the total amount of sand is the total monetary base, and the height of the sand pile is NGDP [1]. As sand accumulates, there are random moments when small avalanches occur, causing the height of the sand pile to drop -- these are analogous to exogenous NGDP shocks (they are caused by gravity), but -- and this is the insight in this analogy -- are inevitable as you add more sand to the pile. As the central bank adds money to the economy, a recession is inevitable (the central bank can offset the impact by increasing the flow of money/sand). A question I have: are these avalanches related to changes in the flow rate? This is essentially issue #2 above. Certainly a slower flow rate will reduce NGDP growth, but does slowing the flow rate cause an avalanche/recession?

I'll leave these issues for future blog posts.

[1] An additional benefit of this picture is that it eliminates the linear relationship $NGDP \sim MB$ (the quantity theory of money). However, the exponent is wrong. This analogy implies that $NGDP \sim MB^{1/3}$ when in fact it is more like $NGDP \sim MB^{2}$.

Thanks for linking to this one Jason. I hadn't seen it before.

ReplyDeleteJason, you lost me with this:

ReplyDelete"We'll use this counterfactual to estimate the shocks -- shown in blue here:"

Can you please outline exactly what's involved in this step?

If you take the difference between the two curves you get the cumulative version of the shocks in the other picture above. If you take the differences between each point in that difference curve, you get the shocks. Inverting the process, the integral of the shocks is the difference between the blue and black curves ... I then show this is true by solving the diff Eq with the empirical shocks and get back NGDP in the graph before the result graph.

DeleteAh, OK, thanks. That's why the blue curve (and gray one too I guess) in your second chart above appear to have a negative mean value. I didn't notice this the first time. Last bit of confusion, the "graph before the result graph" is this one?

DeleteActually it's this one ... it was a check on whether the shocks were correctly extracted.

DeleteI didn't realize there were two curves there until I looked at the link (so it was big). Now it makes sense: the original and the reconstructed I suppose.

DeleteYes, the numerical DiffEq solver isn't perfect (limited by how long I wanted the program to run) so there are tiny differences.

DeleteIt is interesting the analogy that you use. A sand pile just settles a little bit but is still a sand pile. I use things like a forest fire, where after the fire things are just not the same. Again, I think you are looking at normal inflation and I am looking at hyperinflation. After hyperinflation, things are not the same. Here is my list of analogies:

ReplyDeletehttp://howfiatdies.blogspot.com/2014/08/positive-feedback-theory-of.html

I'd imagine the hyperinflation scenario would be when the political winds change and blow the sand pile away ...

DeleteHowever, hyperinflation seems to be fundamentally a political process and current conditions in e.g. Japan or the US don't seem to be ripe for that. Sure, things could happen quickly ... I've always looked at the Erdos-Renyi random graph model as a guide to this: essentially many properties of random graphs undergo rapid phase transitions as links are added between graph nodes. This is my intuition behind e.g. revolutions or other sudden sweeping changes.

More on random graphs:

http://jeremykun.com/2013/08/22/the-erdos-renyi-random-graph/

But I agree that hyperinflation represents a major shift/calamity rather than a gradual change.

"Again, I think you are looking at normal inflation and I am looking at hyperinflation."

DeleteTrue, but you also do an avalanche analogy... and the avalanches in Jason's analogy are not really bouts of inflation (although I guess they can be correlated with bouts of inflation or disinflation or deflation), they are episodes of recession or shocks which depress NGDP from where it could have been: very different from your analogy! At least *I think* that's what Jason is saying.

I got an email from someone who had been reading my blog saying that Ukraine's central bank did not have nearly enough assets and looked prime for hyperinflation some time before the revolution and war in Ukraine. I think when the government and central bank get in big trouble the risk of revolution and war goes way up. If Japan's finances fall apart the odds of China trying to take over a bunch of japanese islands goes way up. But as Japan increases their military budget to try to counter this, the odds of their finances getting into trouble goes up. Anyway, if the hyperinflation is right the political winds will change too. I just claim that you can tell there is high risk when the finances get in such trouble before the political winds change.

DeleteIt will be very interesting to watch this unfold. To me it is like a slow motion train wreck. You know it is horrible but just fascinating to watch.

A sand pile with a little shifting of sand is like a microscopic avalanche. I am talking about real full sized avalanches. Where a town is wiped away type things. The pile of sand looks almost the same after a bit of it slides a bit. As you drop sand on the sand pile you regularly gets these little slides. In a landslide the ground might have been stable for 100 years. So a landslide is much more like hyperinflation.

Delete"To me it is like a slow motion train wreck. You know it is horrible but just fascinating to watch."

DeleteI knew it! Vincent has his lawn chair up on a hill overlooking the tracks... beach umbrella up, bowl of popcorn on his lap... just waiting for the show to start!