Saturday, April 27, 2013

Are the thermodynamic analogies useful?

The short answer is: I have no idea. It is fun to think about. Moving along the demand curve is analogous to an isothermal process and there is an additional law for an isoentropic process:
$$P (Q^s)^{1\mp1/\kappa} = \text{constant}$$
One interesting idea is that if $\kappa \sim 1$, (as might be inferred from the price elasticities of supply/demand), then an isoentropic process could obey
$$P (Q^s)^{1 - 1/\kappa} \simeq P (Q^s)^{0} = P = \text{constant}$$
So that whenever you are experiencing sticky prices, maybe the market is undergoing an isoentropic process where the number of microstates that are consistent with the given macrostate is constant. This doesn't mean supply and demand don't change; it just means that there are the same number of microstates that describe the earlier market and the later market. In thermodynamics, an isoentropic process is also reversible. Both signs are allowed in principle and in the thermodynamics case the "plus" gives you an exponent of 5/3.

PS In an ideal gas in two dimensions, $\kappa = 2 \cdot 1/2 = 1$ where there are two degrees of freedom and the 1/2 comes from $\langle x^2 \rangle / \langle 1 \rangle$ with a Gaussian distribution. However, again, the plus sign is what gives the result that agrees with experiment.

Thursday, April 25, 2013

The philosophical motivations

I have been following these discussions of "DSGE models", microfoundations and the Lucas Critique. My own take is: how could microfoundations possibly survive aggregation into a macroeconomic model as anything other than a coefficient? If they do, the resulting model is likely intractable!

Does this look intractable? Does it even look like more than two numbers (slope and intercept) survive to the macroeconomic scale?

Snark aside, I'm motivated by the many cases in nature where the details of the microtheory end up as single numbers in the macrotheory: thermodynamics, quantum chromodynamics (there was a great letter published in a 1960s era Scientific American where there was a mysterious factor of three difference from the expected cross section), Galilieo's law, etc. Thermodynamics is an especially appropriate model as Boltzmann didn't know about atoms or how they worked (and in thermodynamics, it doesn't really matter), he just needed to know there were a lot (~ 10^23). Nature has a way of inventing new degrees of freedom (quarks give way to hadrons at low energy) or destroying the details (why Hydrogen forms a diatomic gas at STP based on its orbital structure and electrons being spin 1/2 simply becomes a heat capacity at constant volume of 5/2 vs 3/2 for e.g. Helium to good approximation). I imagine the details of why and how humans  decide what to spend their money on pretty much get subsumed into the slope and intercept above. However! This doesn't mean the details are unimportant -- many (most?) policy ideas in macroeconomics try to cross the boundary from micro to macro (tax incentives, health care economics) where economists try to figure out how changes to the microtheory affect the macrotheory. No one really knows how to do this very well -- in nature, the applicability of the degrees of freedom in the macrotheory usually breaks down before the applicability of the degrees of freedom in the microtheory really kick in. You go from hadrons to a mess and only then to quarks as you zoom in. In String Theory this is actually explicit -- with T-duality the physics at scale R is the same as the physics at scale α/R and neither can be small (in perturbation theory) at the same time.

Second, and on a more personal level (and speaking of string theory), from the outside, the whole DSGE model discussion reminds me of how String Theory is seen in physics: awesome models, awesome mathematics, little connection to experiment, pretty much intractable except with various simplifying assumptions, and kind of a big deal for a limited reason (DSGE has microfoundations and can look like an economy, string theory has something that looks like what we think quantum gravity should look like). I would hope that maybe this blog-paper could come along like Verlinde's paper on entropic gravity and say: maybe we don't need the details of the string theory to derive gravity ... maybe quantum gravity doesn't really even exist at a fundamental level because it is an entropic force much like diffusion that goes away when you look at a single molecule. We just need to know there are a lot of degrees of freedom and some basic concepts from the string theory microfoundations (emergent dimensions,  AdS/CFT correspondence). It seems something like inflation would go away  at a small enough scale ... but I don't want to prejudge anything and I as yet have no idea how inflation fits in the information transfer framework.

It is in that sense that I am going to try and describe the "emergent" theory of macroeconomics rather than build up a model from the ground up ... or another way: what would we say about macroeconomics if we didn't know about the existence of people in the same way Boltzmann didn't know about the existence of atoms? Imagine we are aliens measuring fluctuations in CO2 production from a distant observatory. There would be a story of various natural factors but a piece would be missing. It would grow exponentially (as Earth industrialized) and changes would happen (the "Great Recession" has reduced CO2 production by a significant amount, the "technology shock" of changing from coal to natural gas in the US has also reduced emissions). An alien comes along and proposes the idea of a "civilization" on that planet that does something faster than organisms generally grow through network effects so that maybe the individual components of this civilization interact and exchange information. The CO2 measurement would be a proxy for the information exchange -- and is essentially the price level in the economy in our model.

Sticky prices from non-ideal information transfer

This post will be more speculative than the derivation of supply and demand -- it will give one possible take of how sticky prices appear in the model (which are key to at least some schools of modern macroeconomic theory). If we return to non-ideal information transfer $I_{Q^s} \leq I_{Q^d}$ such that Equations (4) and (5) become
$$(10) \space P\leq \frac{1}{\kappa }\frac{Q^d}{Q^s}$$
$$(11) \space \frac{dQ^d}{dQ^s}\leq\frac{1}{\kappa }\frac{Q^d}{Q^s}$$
and we can use Gronwall's inequality [2] (for ODEs/stochastic differential equations) to use our supply and demand systems of equations (8a,b) and (9a,b) as upper bounds on the perceived supply and demand curves. These upper bounds are the ideal supply and demand curves that intersect at the ideal price $P^*$. By perceived supply and demand curve, we mean the supply and demand curves that have the observed price $P$ as the equilibrium price. In the case of ideal information transfer, the ideal price is the observed price. However, in the case of non-ideal information transfer the observed price can occur anywhere in the area below the the ideal supply or demand curves.

We first look at the case where we have a constant supply source analgous to Eq. (9a,b). In the case of imperfect information transfer, the equations become (via Gronwall's inequality):
$$(12a) \space P\leq\frac{1}{\kappa }\frac{\left\langle Q^d\right\rangle }{Q_0^s}$$
$$(12b)\space \Delta Q^s\geq \kappa Q_0^s\log \left(\frac{\left\langle Q^d\right\rangle }{Q_{\text{ref}}^d}\right)$$
This creates a situation where all allowed prices for a given demand curve fall in the red shaded area below the ideal supply curve defined by the equality in Eq. (12b) in the figure below and the observed price $P$ will fall below the "ideal price" $P^*$.
If we have imperfect information transfer, then all prices along the demand curve (gray) beneath the supply curve are valid. Specifically, the prices marked in dark blue are valid and they remain valid price solutions under downward shifts in the demand curve until it reaches the bounding supply curve and then will be forced to follow the supply curve to price $P'$ and beyond. This looks different from the standard economics perspective in the next figure below. The price $P$ appears to be sticky downward under small shifts of the demand curve, but could revert to ordinary (non-sticky) behavior for large shifts (compared to how far we are from ideal information transfer). The upper portion of the supply curve (here shown in dashed gray) is assumed -- but is technically unknown in this picture.

The size of downward shifts in the demand curve for which prices remain sticky could ceterus paribus (including keeping the ideal supply and demand curves constant) give an indication of the magnitude of the "information gap" between the observed imperfect information transfer and perfect information transfer.
 Note: The dashed gray line is assumed in the economic narrative. The counterfactual of a rightward shift in  the demand curve is never observed when prices are observed to be sticky downward with a leftward shift in the demand curve.
If we bound the information transfer from below, we see we can actually get prices that are sticky upward. See next figure below. In general, a point appearing inside the red shaded area will experience sticky prices for shifts upward and downward over some region of changes in demand, only to revert to ordinary (non-sticky) supply and demand behavior as shifts become large and we approach the boundaries of the shaded region.

One interesting point is that given the preponderance of sticky downward prices vs sticky upward prices would imply that our observed price (dark red point) tends to be nearer the lower bound. This makes intuitive sense as we could imagine what we know at the time of observing the price $P$ as being a lower bound on the information we have about the supply curve.
Again, we show how this figure looks in the standard economics narrative in the figure below. We have a price that is sticky upward and downward for small shifts in the demand curve, but becomes "unstuck" for larger shifts.

These results imply a large deviation from ideal information transfer for a given good will result in stickier prices. What causes the non-ideal information transfer? One could imagine cases where the good is difficult to assess (from lots of variables) or is rarely assessed (an inefficient market) -- both situations that come into play in the employment market (people are complex and they may have annual salary reviews but this doesn't mean they are being fully assessed in an open market).

The problem is that while the sticky price trajectory remains consistent with Equations (12a,b) -- it is a solution to the differential inequality -- it may not be required by Equations (12a,b). It is consistent for a pencil standing on its end to fall with the point facing west, but it is not required to fall with the point facing west. A potential direction would be to look at all possible trajectories using some kind of stochastic process and see if they converge to some value.

There is the additional issue that the sticky price trajectory implies that the size of the "information gap" is decreasing assuming the ideal supply curve remains constant in order for the trajectory to reach the edge. But why should it reach the edge? Maybe the information gap is preserved in the short run so that the ideal supply curve moves to the left in tandem. Maybe in the long run, more efficient markets could cause the gap to shrink? I don't know, but again I think a stochastic model might shed some light here.

In particular, Markov information sources are frequently used in communication theory and Markov models are of interest in economics; the information transfer model may just create constraints ... which is my goalThe actual dynamics of how a price sticks and how the information gap will be potential subjects for future posts. As you can see, this is an incomplete picture and hence why I decided to go the blog/working paper route. I don't have all the answers!

References

[1] Information transfer model of natural processes: from the ideal gas law to the distance dependent redshift P. Fielitz, G. Borchardt http://arxiv.org/abs/0905.0610v2
[2] http://en.wikipedia.org/wiki/Gronwall's_inequality
[3] http://en.wikipedia.org/wiki/Noisy_channel_coding_theorem#Mathematical_statement
[4] http://en.wikipedia.org/wiki/Entropic_force
[5] http://en.wikipedia.org/wiki/Sticky_(economics)

The previous post with more words and fewer equations

The idea behind the information transfer model is that what is called "demand" in economics is essentially a source of information that is being transmitted to the "supply", a receiver, and the thing measuring the information transfer is what we call the "price".

Choosing constant information sources (i.e. keeping demand constant) or constant information destinations (i.e. a fixed quantity supplied) allows you to trace out supply and demand curves and the movement of those curves (allowing the information source and destination to vary) recovers the Marshall model. We can see diminishing marginal utility in the downward sloping demand curves; this comes from the definition of the "detector" measuring the price having supply in the denominator which follows from the identification of the demand as the information source.

Note that since Fielitz and Borchardt originally described physical processes with this information transfer model, we can make an analogy between economics and thermodynamics, specifically ideal gasses:
• Price is analogous to the pressure of an ideal gas
• Demand is analogous to the work done by an ideal gas (and is related to temperature and energy content)
• Supply is analogous to the volume of an ideal gas

The equation relating the price, supply and demand is analogous to the ideal gas law. One point to make here is that we haven't made any description of how the demand behaves over time, just how it behaves under small perturbations from "equilibrium" -- by which we mean a constant price defined by the intersection of a given supply and demand curve (with ideal information transfer). Humans will decide they don't want e.g. desktop PC's anymore (because of tablets or laptops or whatever reason) and the demand will drop. The economy (and population) grow. Economists frequently use supply and demand diagrams to describe models or specific shocks and this information transfer framework recovers that logic. In the future, I would like to see where else we can take model. In the next post, I will show how you could get (downward) sticky prices from this model by looking at non-ideal information transfer.

PS If we use the linearized version of the supply and demand relationship near the equilibrium price, we can find the (short run) price elasticities from
$$Q^d =Q_{\text{ref}}^d +\frac{Q_0^d}{\kappa }-Q_{\text{ref}}^s P$$
$$Q^s = Q_{\text{ref}}^s-\kappa Q_0^s+\frac{Q_0^s{}^2\kappa ^2}{Q_{\text{ref}}^d}P$$
Such that
$$e^d = \frac{dQ^d/Q^d}{dP/P} =\frac{\kappa Q^d- Q^d_0 - \kappa Q_\text{ref}^d}{\kappa Q^d}$$
Expanding around
$$\Delta Q^d=Q^d-Q_{\text{ref}}^d$$
$$e^d \simeq - \frac{Q^d_0}{\kappa Q^d_\text{ref}} + O(\Delta Q^d)$$
And analogously

$$e^s \simeq \frac{\kappa Q^s_0}{Q^s_\text{ref}} + O(\Delta Q^s)$$

From which we can measure $\kappa$.

(Note, I said fewer equations.)

Wednesday, April 24, 2013

Supply and demand from information transfer

At this point we will take our information transfer process and apply it the the economic problem of supply and demand. In that case, we will identify the information process source as the demand $Q^d$, the information transfer process destination as the supply $Q^s$, and the process signal detector as the price $p$. The price detector  relates the demand signal $\delta Q^d$ emitted from the demand $Q^d$ to a supply signal $\delta Q^s$ that is detected at the supply $Q^s$ and delivers a price $P$.

We translate Condition 1 in [1] for the applicability of our information theoretical description into the language of supply and demand:
Condition 1: The considered economic process can be sufficiently described by only two independent process variables (supply and demand: $Q^d, Q^s$) and is able to transfer information.
We are now going to look for functions $\langle Q^s \rangle = F(Q^d)$ or  $\langle Q^d \rangle = F(Q^s)$ where the angle brackets denote an expected value. But first we assume ideal information transfer $I_{Q^s} = I_{Q^d}$ such that:
$$(4) \space P= \frac{1}{\kappa} \frac{Q^d}{Q^s}$$
$$(5) \space \frac{dQ^d}{dQ^s}= \frac{1}{\kappa} \frac{Q^d}{Q^s}$$
Note that Eq. (4) represents movement of the supply and demand curves where  $Q^d$ is a "floating" information source (in the language of Ref [1]), as opposed to movement along the supply and demand curves where $Q^d =Q^d_0$ is a "constant information source".

If we do take $Q^d =Q^d_0$ to be a constant information source and integrate the differential equation Eq. (5)
$$(6) \space \frac{\kappa }{Q_0^d}\int _{Q_{\text{ref}}^d}^{Q^d}d\left(Q^d\right)'=\int_{Q_{\text{ref}}^s}^{\left\langle Q^s\right\rangle } \frac{1}{Q^s} \, d\left(Q^s\right)$$
We find
$$(7) \space \Delta Q^d=Q^d-Q_{\text{ref}}^d=\frac{Q_0^d}{\kappa }\log \left(\frac{\left\langle Q^s\right\rangle }{Q_{\text{ref}}^s}\right)$$
Equation (7) represents movement along the demand curve, and the equilibrium price $P$ moves according to Eq. (4) based on the expected value of the supply and our constant demand source:
$$\text{(8a) }P= \frac{1}{\kappa }\frac{Q_0^d}{\left\langle Q^s\right\rangle }$$
$$\text{(8b) } \Delta Q^d=\frac{Q_0^d}{\kappa }\log \left(\frac{\left\langle Q^s\right\rangle }{Q_{\text{ref}}^s}\right)$$
Equations (8a,b) define a demand curve. A family of demand curves can be generated by taking different values for $Q_0^d$ assuming a constant information transfer index $\kappa$.

Analogously, we can define a supply curve by using a constant information destination $Q_0^s$ and follow the above procedure to find:
$$\text{(9a) }P= \frac{1}{\kappa }\frac{\left\langle Q^d\right\rangle }{Q_0^s}$$
$$\text{(9b) }\Delta Q^s = \kappa Q_0^s \log \left(\frac{\left\langle Q^d\right\rangle}{Q_{\text{ref}}^d}\right)$$
So that equations (9a,b) define a supply curve. Again, a family of supply curves can be generated by taking different values for $Q_0^s$.

Note that equations (8) and (9) linearize (Taylor series around $Q^x=Q_\text{ref}^x$)
$$Q^d =Q_{\text{ref}}^d +\frac{Q_0^d}{\kappa }-Q_{\text{ref}}^s P$$
$$Q^s = Q_{\text{ref}}^s-\kappa Q_0^s+\frac{Q_0^s{}^2\kappa ^2}{Q_{\text{ref}}^d}P$$
plus terms of order $(Q^x)^2$ such that
$$Q^d=\alpha -\beta P$$
$$Q^s=\gamma +\delta P$$
where  $\alpha =Q_{\text{ref}}^d+\left.Q_0^d\right/\kappa$, $\beta = Q_{\text{ref}}^s$ ,$\gamma = Q_{\text{ref}}^s-\kappa Q_0^s$ and $\delta =\kappa ^2 Q_0^s{}^2/Q_{\text{ref}}^d$. This recovers a simple linear model of supply and demand (where you can add a time dependence to the price e.g. $\frac{dP}{dt} \propto Q^s - Q^d$).

We can explicitly show the supply and demand curves using equations (8a,b) and (9a,b) and plotting price $P$ vs change in quantity $\Delta Q^x=\text{$\Delta $Q}^s$ or $\text{$\Delta $Q}^d$. Here we take $\kappa = 1$ and $Q_{\text{ref}}^x=1$ and show a few curves of $Q_0^x = 1 \pm 0.1$. For example, for $x = s$ and +0.1, we are shifting the supply curve to the right. In the figure we show a shift in the supply curve (red) to the right and to the left (top two graphs) and a shift in the demand curve (blue) to the right and to the left (bottom two graphs). The new equilibrium price is the intersection of the new colored (supply or demand) curve and the unchanged (demand or supply, respectively) curve.
References

[1] Information transfer model of natural processes: from the ideal gas law to the distance dependent redshift P. Fielitz, G. Borchardt http://arxiv.org/abs/0905.0610v2
[2] http://en.wikipedia.org/wiki/Gronwall's_inequality
[3] http://en.wikipedia.org/wiki/Noisy_channel_coding_theorem#Mathematical_statement
[4] http://en.wikipedia.org/wiki/Entropic_force
[5] http://en.wikipedia.org/wiki/Sticky_(economics)

The information transfer model

We will describe the economic laws of supply and demand as the result of an information transfer model. Much of the description of the information transfer model follows [1].

Following Shannon [3] we have a system that transfers information $I_q$ from a source $q$ to a destination $u$ (see figure above). Any process can at best transfer complete information, so we know that $I_u \leq I_q$.

We will follow [1] and use the Hartley definition of information $I= K^s n$ where $K^s=K^0 \log s$ where $s$ is the number of symbols and $K^0$ defines the unit of information (e.g. $1/\log 2$ for bits). If we take a rod of length $q$ (process source) and subdivide it in to segments $\delta q$ (process source signal) then $n_q=q/\delta q$ and we get (defining $\kappa = K_{u}^{s}/K_q^s$ the ideal transfer index)
$$(1) \space \kappa \frac{u}{\delta u} \leq \frac{q}{\delta q}$$
Compared to paper [1], we have dropped the absolute values in order to deal with positive quantities $q$, $u$ (and changed some of the notation, e.g. $\Delta q \rightarrow q$).

Now we define a process signal detector that relates the process source signal $\delta q$ emitted from the process source $q$ to a process destination signal $\delta u$ that is detected at the process destination $u$ and delivers an output value:
$$(2) \space p =\left(\frac{\delta q}{\delta u}\right)_\text{detector}$$
If our source and destination are large compared to our signals ($n_q , n_u \gg 1$) we can take $\delta q \rightarrow dq$, we can re-arrange the information transfer condition:
$$(3) \space p=\frac{dq}{du} \leq \frac{1}{\kappa} \frac{q}{u}$$
Next, we derive supply and demand using this model.

References

[1] Information transfer model of natural processes: from the ideal gas law to the distance dependent redshift P. Fielitz, G. Borchardt http://arxiv.org/abs/0905.0610v2
[2] http://en.wikipedia.org/wiki/Gronwall's_inequality
[3] http://en.wikipedia.org/wiki/Noisy_channel_coding_theorem#Mathematical_statement
[4] http://en.wikipedia.org/wiki/Entropic_force
[5] http://en.wikipedia.org/wiki/Sticky_(economics)

An informal abstract addition: why now?

Also, I was inspired to do this because of Noah Smith's recent post on why macroeconomics doesn't seem to work very well. Put simply: there is limited empirical information to choose between alternatives. My plan is to produce an economic framework that captures at least a rich subset of the phenomena in a sufficiently rigorous way that it could be used to eliminate alternatives. In a sense, supply and demand is used as a heuristic to do this in economics today. If your model seems inconsistent with supply and demand, you'd better have a good, rigorous reason.

PS -- While it might eventually be related, the work presented here has nothing immediately to do with "information economics" a la Akerlof, Stiglitz, etc. "Information" is being used in the Shannon sense: a price is communicating a signal from the demand to the supply.

An informal abstract

First, I like to follow economics blogs in my spare time in the political and academic spheres (in particular, Noah Smith -- n.b. his post about scientists commenting on blogs, Cosma Shalizi and Scott Sumner). I briefly thought about going to graduate school for economics both before and after my Phd in physics but I went into industry instead -- which would make it difficult to submit an economics paper that would be taken seriously. The idea here is blog as working paper.

Second, I was recently (2011-2012) involved in a project that relied heavily on information theory and I came across this interesting paper:
Information theory provides shortcuts which allow to deal with complex systems. The basic idea one uses for this purpose is the maximum entropy principle developed by Jaynes. However, an extensions of this maximum entropy principle to systems far from thermal equilibrium or even to non-physical systems is problematic because it requires an adequate choice of constraints. In this paper we apply the information theory in an even more abstract way and propose an information transfer model of natural processes which requires no choice of adequate constraints. It is, therefore, directly applicable to systems far from thermal equilibrium and to non-physical systems. We demonstrate that the information transfer model yields well known laws, which, as yet, have not been directly related to information theory, such as the radioactive decay law, Fick's first law and Hubble's law.
http://arxiv.org/abs/0905.0610

Some time later, I came across this blog post by Paul Krugman where he says:
It is not easy to derive supply and demand curves for an individual good from general equilibrium with rational consumers blah blah. And it’s definitely not easy to justify consumer and producer surplus as measures of welfare. And there have always been some purists who condemn any use of the S and D curves we all grew up with, the use of triangles to measure welfare loss, and all that. But for the most part nobody pays attention. The supply-and-demand framework is so convenient, while pretty much getting at what you want to get at, that it’s what almost everyone uses to get a first-pass analysis of economic issues.
Which made me think of the Fielitz and Borchardt information theory paper cited above along with Hayek's description of the price system as a mechanism for transferring information:
We must look at the price system as such a mechanism for communicating information if we want to understand its real function—a function which, of course, it fulfills less perfectly as prices grow more rigid. (Even when quoted prices have become quite rigid, however, the forces which would operate through changes in price still operate to a considerable extent through changes in the other terms of the contract.) The most significant fact about this system is the economy of knowledge with which it operates, or how little the individual participants need to know in order to be able to take the right action. In abbreviated form, by a kind of symbol, only the most essential information is passed on and passed on only to those concerned. It is more than a metaphor to describe the price system as a kind of machinery for registering change, or a system of telecommunications which enables individual producers to watch merely the movement of a few pointers, as an engineer might watch the hands of a few dials, in order to adjust their activities to changes of which they may never know more than is reflected in the price movement.
I thought: it could potentially be easy to derive supply and demand from first principles using information theory using the framework of the Fielitz and Borchardt paper. And I basically started to put together my own paper. Here was the abstract:
Abstract: A generic information transfer model in the case of ideal information transfer is used to derive the relationship between supply (information destination) and demand (information source) with the price as the signal of information transfer. We recover the properties the traditional economic supply-demand diagram. In the case of non-ideal information transfer, prices are observed to be sticky downward.
Instead of trying (and probably failing) to publish it as a paper, I was inspired by Igor Carron to just think out loud with a blog. This blog will be focused on determining if the framework established here is good for anything or just an interesting toy model. Or if it is completely wrong!

The next few posts will consist of what I have done so far: a summary of the Fielitz and Borchardt paper (since I kind of used their notation), deriving supply and demand from ideal information transfer, and demonstrating sticky prices from imperfect information transfer.