Economics Simulation
nbviewer.ipython.org
nbviewer.ipython.org
Steve Keen was predicting a big debt triggered crash before 2008 and believes in economic models that at least have the possibility of crisis and disequilibrium being the normal state (which is regarded as unorthodox in economics).
Minsky can model chaotic system (even outside of economics)[3].
[1] http://www.debtdeflation.com/blogs/minsky/
[2] http://sourceforge.net/p/minsky/home/Home/
[3] http://www.debtdeflation.com/blogs/2013/09/10/famous-models-...
Its a nice exposition of using python for a simulation, but it has little bearing on economics.
The idea that fields have certain "ways of knowing" something was interesting to me - that for economics, its about the analytic solution of an equilibrium.
My own field has something similar - generally speaking, the "hierarchy of evidence" starts with single case reports at the bottom, and then way up at the top are meta-analyses of large randomized clinical trials. As a modeler, I was once asked by a clinician where models (be they analytical or simulation) fit in that framework, and the only answer I could give was "along side it". Analytic results are Capital-T True in a way that even RCTs aren't, but are only true in the universe laid out by the model itself, for example.
It was also just an interesting read as models in my field have been migrating from analytic (or numerical) solutions to equilibrium problems toward more simulation and agent based models, and that same "Yes, but how do you know it's right" type questions are coming up.
This simulation includes the concept propagation of disease, again in a sort of "Maximally-Minimalist" way. While it's suitable in the sense that it fits with the rest of simulation, I've identified it as something that I am going to have to learn about before I extend that part of the simulation beyond what's already been described.
So I was wondering if you might know of a resource which presents various minimalist models of disease propagation that you could recommend. I'm not epidemiologist, I'm actually retired and studying economics as they pertain to environmental systems, so I'm not actually looking for anything that extremely complex or compute intensive... I'm just looking for something slightly more detailed that what I've got now and perhaps describes a step-by-step method towards modeling that's actually realistic.
It's a textbook on agent-based models written by an ecologist (where an awful lot of disease modeling is done). I believe there's a cheaper paperback version on Amazon, and they use NetLogo, which is pretty gentle computationally.
It is true that economists have an unjustified preference for analytic solutions over numeric solutions.
However, the main reason to avoid simulations, is that the assumption of rational agents is not very amenable to the typical approach of simulation. Any simulation that imposed the assumption of rationality would look very different to the simulations that are usually done.
For example, rational agents make decisions based on future prices. I might decide to build a factory, because I expect positive profits given the future prices of inputs and outputs. But I can only know this if I have myself modeled the entire economy. Economists do this using backward induction. They solve for equilibrium in the future, and work backwards.
Another more basic example is that rational agents naturally form markets. Buying/selling of goods is much more accurately described by a perfect market, than by some random matching with random prices.
So this is a valid contribution to economics in the form of an inadequate dynamic model.
With that line of reasoning, don't you feel that anything is a "valid contribution to economics" ?
Hedge funds very definitely watch the weather projections.
So perhaps the discrete diffusion simulation being discussed just doesn't look like what an economist regards as a "good" model.
[NB I've spent a lot of time writing simulations in the industrial domain - where the simulated result is generally primary and the logical structure is a means to that end].
(I'm an economist).
It would be more interesting to look at where the agents end up from their starting positions. Besides looking at wealth inequality, one could look at "consistency" or whatever you call it.
In third-world countries we (the US) have repeatedly bought up land in exchange for short-term goods. The people in the country increasingly become dependent on providing services to the foreign land-holders, or factory work for the outside market.
Once they get fed up with this near-slavery they often try land reform, and that's when we send in the troops/CIA-paid thugs in the name of anti-communism (see Guatamala or Haiti as good examples).
It's like the Asimov story where aliens offer to extend humans' life by ten years for a price in natural resources, which they repeatedly double every ten years. Every resource on earth is eventually strip-mined, life can no longer be supported, and the aliens just move on to the next "voluntary" target.
The WTO plays a big role in these kind of attacks on societies as well. Of all the third-world countries that have developed, they have almost uniformly made heavy use of protectionism, foreign-ownership limitations, etc. The Seattle WTO protests in the 90's were actually seeded with some really interesting arguments and analysis.
Still focusing on land, but bringing things back towards Norvig's simulation (lots of individual actors), Thomas Paine's short essay, "Agrarian Justice," has some good descriptions of what goes on and offers some pretty good solutions.
What is this resource you talk about?
Land values are f(productivity, past productivity).
That is they are derivatives of income and wealth.
Notwithstanding the critique of the author, the GP has a point that the science of economics is about the relationship between (production, distribution).
Eliminate that feedback loop, and ... yes, you are just looking at the diffusion of "fake games" people play.
Which are only insightful in the assumptions, but broadly speaking, not so much
All of that in mind, this type of essay/article is just a demonstration of ~technique in a very broad sense.
Its useful to mention/caveat any extrapolations are problematic, but no need to dwell or be overyly crtitical here. IMHO.
Land acreage is a fixed resource.
This is one of the reasons that a lot of economic models depend on land: there is a very real scarcity there to drive the equations with, and it forms a foundation for virtually every other form of scarcity besides labor.
With sufficient energy, you can provide other inputs (raw materials, labor, capital). Without it, you're sunk.
In a preindustrial society, energy == land (and sea), in the form of food and fuel production (agriculture, grazing, fuelwood, wild herds, fish, all by way of direct or indirect sunlight conversion), as well as in the form of wind and water power resources which can be tapped through mechanisms. Ricardo's "law of rent" was in part a lament that all the good ones -- that is, most productive acres -- are taken. He was complaining about asset allocation in his day (he also saw economic surpluses accruing to landowners and labor rather than hard working capitalists and bankers, which is a tad curious).
With an industrialized society, energy's become something we extract from the land (coal, oil, gas, uranium), rather than which is produced or converted by it. But the fundamental truth remains.
In a future sustainable world, we'll again either be at the point where what we take from the land matches the rate at which it's created, or we'll have found some entropy gradient so abundant (fusion? thorium?) that it can be used extractively for tens to hundreds of thousands of years or more without exhaustion, despite the very formidable technical challenges to its utilization.
My leaning is more toward the former than the latter.
More recently I've been looking at some of the principles of dissipative systems and wondering if one of the fundamental inequality equations of that field isn't applicable as a general concept of capital accumulation. Let's see if I can't find that ... OK: the storage function here:
https://en.wikipedia.org/wiki/Dissipative_system#In_control_...
I've also been kicking around the ideas of, variously, an organism (say, a human), or a herd, or an ecosystem, as an economic analog, and trying to figure out what the equivalent systems within them are. For the body analog, there's the long-standing metaphor within economic literature of the banking system and money as the heart and blood. My read is that these are mistaken -- those correspond to physical constructs within the economy (transportation systems and energy), not the control and signaling systems of the economy. There I think you'd want to map something more on the lines of Ca+ ion exchange or endocrine signaling, though honestly my understanding of biology and systems is pretty loose. I've been meaning to look at how biological and ecological systems signal for resource utilization.
I guess the Norvig approach would be to feed in all data from the real economy and tally random sequences of transactions of various lengths, like linguistic n-grams, then for the model just generate transactions using Markov chains derived from that data. If it works for translating languages and modeling human thought, no reason it shouldn't work here.
Suppose actor A has no land and $1000 in cash, and actor B has $500 worth of land and $500 in cash. B is willing to sell A his land for $500. A agrees and they engage in the transaction. After the transaction, A lost $500, but gained $500 worth of land so A still has $1000 of property. B lost $500 worth of land, but gained $500 in cash.
So before the transaction, each has $1000 of property (cash + land), and after the transaction, each still has $1000 worth of property (cash + land). It's just been shuffled a bit based on what each actor desired and what they were willing to pay for what they wanted.
In general, LOTS of transactions in the real world work this way, i.e., actors engage in the transaction to result in a net increase (perceived) of value to themselves. So the simulation is unrealistic in that respect: it assumes transactions in which one party loses are just as likely (if not more likely) than those in which the transaction only occurs if both parties win. In the real world, most transactions occur only if both parties feel the trade is a fair exchange of value (no net loss to either side).
Cash, of and by itself doesn't, though there are investment opportunities. It's a transfer and exchange medium.
The reasons someone would care to exchange land for cash could vary, but generally would indicate a need for liquidity. That could be because of a perceived profitable investment elsewhere, but could just as easily be the result of financial pressures (bad loans, business losses, poor financial management, a need to move, being forced from the land (refugee or other forms of political repression), etc.
Just because both parties benefit from a transaction doesn't mean that one doesn't end up with, net net, a better position afterward.
Do you have a citation for that? I suspect it might just be trivially true because all countries, especially developing countries, make heavy use of protectionism for some definitions of "heavy". It would be useful to show a relationship between level of protectionism and economic growth. My impression is that most economists think that protectionism harms economic growth.
I pre-commit to changing my mind if there's a correlation between greater protectionism and greater economic growth.
As mentioned in the latest Gates letter, huge progress has been made on reducing global poverty recently, and it continues to be made. He says it's likely that there will be almost no poor countries by 2035.
One of America's biggest exports is civilian aircraft. I think for a while it was the US's #1 export in terms of profit.
It was also one of the most state-subsidized industries.
Giant aircraft presses can run into the "natural monopoly" problem, there are defense concerns with having military production happen in America, etc., so there are lots of justifications we can make for it. But a subsidy is functionally a tariff.
http://en.wikipedia.org/wiki/Heavy_Press_Program http://en.wikipedia.org/wiki/Natural_monopoly
https://en.wikipedia.org/wiki/Ha-Joon_Chang
His books include Bad Samatarians (which cma mentioned) and 23 Things They Don't Tell You About Capitalism.
He has a few online articles and videos on YouTube.
But hey, Python has lots of cool packages that are useful here, which is the real point.
It might be a realistic simulation of professional poker players.
At least, the perceived value, but often times in real economies this does not match up with actual value at all. People hoping to better their fortunes end up making poor decisions to that end, particularly -- but certainly not limited to -- poor people without much financial savvy. This part of the simulation seems perfectly accurate to me.
Poor people are certainly sometimes bitten by lack of savy, but more often bitten by the exigencies of their lives pushing them towards shorter planning horizons.
I know we have to draw the line somewhere, but it would be interesting to throw in some renewable and non renewable resources for transforming goods.
I’m pointing this out because it is quite a common misunderstanding that a certain amount of wealth exists in the world, and that it is a zero sum game, where someone has to loose every time someone wins.
But it happens all the time, through manifactured desire and the exploitation of people's addictions. People are not "rational actors" even though economic theory attempts to dictate it. In fact, most of consumerism seems to be built on getting people to buy things that in turn does not help them to create even more value.
> In fact, most of consumerism seems to be built on getting people to buy things that in turn does not help them to create even more value.
In this context, "creating wealth" is not about accumulating resources to create 'even more value' a la Capital. It seems like you're confounding wealth and capital, and they're very different things here. Here we're talking about wealth as meaning economic welfare. Society has more economic welfare--Wealth--when economic exchange happens because resources are allocated in a way that increases utility for everyone.
Life wouldn't be worth living if we worked for the sole purpose of creating lasting capital, in order to build more capital. Consumerism is necessary, so
>In fact, most of consumerism seems to be built on getting people to buy things that in turn does not help them to create even more value.
isn't really a bad thing.
So your first idea and your second idea are only marginally related, and combining them probably hurts your argument overall.
That's not a free market with perfect information, which is the economics equivalent of assuming away friction in Freshman physics exercises.
> People are not "rational actors" even though economic theory attempts to dictate it.
Economic theory doesn't "attempt to dictate" that people are rational actor, it uses the rational actor as a useful simplification that is broadly useful in describing large scale effects, and also one for which it is easy to identify specific difference between the model and reality and their effects, as well.
Admittedly, lots of people -- either through ignorance or because it suits what they are trying to sell -- treat the rational actor model or its implications for an idealized market as descriptions of real (or proposed) conditions when this is inappropriate given readily verifiable differences between the conditions that apply in the market and the explicit assumptions of the rational actor model, but that's more political salesmanship than economic theory.
Also, economics is quite radically value-neutral; if you come to enjoy using deodorant, even if you've never heard of it before it was advertised at you, you are still obtaining utility and value from purchasing deodorant. There's no morality in the "value" that is used in economics, no decision about whether a person "really" gets value out of an item or not. It is also a very cognitively tempting idea, that one can declare oneself the arbiter of what is "true value", but if you actually try to use it in the math the model completely fails to match reality. You may feel free to create your own such definition; I unashamedly have one myself, we all do, really. But it's not what economics use, because it doesn't produce useful results.
If I saw a commercial for a pet rock, and decided that I wanted to buy one, what's to say that this desire is not real?
Of course, in the real world, people need upkeep (which could be modeled as a fixed amount subtracting from their wealth over time). So not all transactions are net positive, because at some point you have no choice as to whether or not to buy food. Which would even exacerbate the effects of inequality for low income people.
I was educated via the Neoclassical approach, where the macroeconomy is modeled through a microeconomic (individual) foundation. What's needed at least is a budget, a utility function (preference relations), and a transition function. The agent then is modeled through optimizing their utility against their budget constraint at each timestep, then the transition function gets applied. Lather, rinse, repeat.
This form the basis of a recursion model, the simplest one being the Solow model [1]. More details are available in Recursive Methods in Economic Dynamics by Stokey & Lucas [2]. Computer simulations are definitely used in cases where the models are mathematically intractable.
[1]: http://en.wikipedia.org/wiki/Solow_model [2]: http://www.amazon.com/Recursive-Methods-Economic-Dynamics-St...
But it doesn't seem to have much bearing on actual economics.
>>doesn't seem to have much bearing on actual economics
Don't be too quick to assume that, I think your post actually contains everything you're looking for...
It's only a simulation insofar as people are governed by mindless rules and random chance, with no thought or planning involved. So it's a decent simulation of some people, but certainly not everyone.
"...much of contemporary social contract theory has been marked by what might be referred to as a catallactic bias, which results from a tacit conceptual privileging of gains from trade as the primary mechanism of cooperative benefit. [1]"
[1] Joseph Heath. The Benefits of Cooperation. Philosophy & Public Affairs. Volume 34, Issue 4, pages 313–351, Fall 2006
I once tried to develop a similar theory to the link, by applying the principles of statistical mechanics, and treating the rate of circulation of money as the temperature, and each actor's amount of economic activity as their kinetic energy. It seemed like a neat approach but it has it's flaws obviously.
Although this isn't that useful by itself, it's a very nice way to get some basic intuition about how money behaves as a unit of exchange, in a system with a constant money supply. The reason why some commentators think that this isn't a realistic simulation of our actual monetary system is that in the current system, the quantity of money is more or less continuously expanding. But that doesn't imply that more 'wealth' is being created, it just means that more tokens are being created.
The problem is though that as a result the unit of measurement (money) is also expanding, and so you have a monetary system that appears superficially to obey rules of 'growth' as measured in other fields, but in fact is based on something that is quite different, as these experiments show. And you have economists merrily chasing their tails for the last 3 centuries over trying to determine what causes 'growth', when actually it's an illusion of measurement created by the day to day operations of the fractional reserve banking system.
Technological advancement, quality of life, etc..., IS growth...
Go back 150 years, and production was measured as production (tons of coal, etc. You can see this in historical records like the German Statistical Yearbook's from the 1870's.) Today's economists make measurements using money, and ignore the very real problems of money as a unit of measurement.
For example, take the quantity theory of money (and note the word theory there), MV = PQ. V - velocity of circulation of money cancels - this was pointed out in the 1930's, but for some reason has never made it into the textbooks. We're left with P(prices) ~ M (quantity of money)/Q (quantity of transactions.
Now if this equation is valid (and it is mainstream economic theory, although the presence of a cancelling issue probably isn't a good sign there), then we have an inverse relationship between the quantity of money in the system, and the quantity of transactions (i.e. production), indicating that actual economic growth in the sense you're using it would cause decreasing prices, if M is held constant.
OTH, if that equation is wrong, then how can we measure anything with money, since we don't know what the relationship is between production and prices?
m = random.uniform(0, pot)
Once somebody wins a few games, he will fish "wealth" from a bigger and bigger pot, even if he plays against the poor. According to this, you just have to be rich to be even richer. However, your wealth per se doesn't affect your future wealth, this is clear, right?
Maybe this could be a poker game simulation. Certainly not an economics simulation.
No. Your current wealth is a very strong indicator of your future wealth, and indeed, your future income.
I think part of that is for reasons others have stated here, which is that there aren't a lot of people doing market simulation. Even the best simulations are going to be wrong, so what's the point.
If two actors with initial values X and Y interact, their expected outcome would be (X+Y)/2, with expected change being (Y-X)/2 and (X-Y)/2 for the two actors. If X<Y, then (Y-X)/2>0, and so the person with less wealth expects to gain, and the person with more wealth expects to lose, for an overall smoothing effect.
Let D be the difference in wealth post-transaction divided by the total. The expected value of D is 1/2. That means that we should expect that one agent will walk away with 75% of the pot and the other with 25%. Thus, although the expected outcome for an agent is 50% of the pot, we're still pretty much guaranteed to get very uneven splits.
Next, note that a person's wealth affects the payout of the next transaction. In other words, the person who takes 25% is almost guaranteed to be able to make less on the next transaction than the person who walked away with 75%. Suppose all our agents start out with 100, and that the 75%/25% splits are guaranteed. If each agent engages in exactly one transaction, then half our agents will have 50 and half will have 150. A 50's next transaction will either be (50, 50) or (50, 150). A 150's next interaction will either be (150, 50) or (150, 150). The expected outcome for (50, 50) is (25, 75). The expected outcome for (50, 150) is (50, 150). The expected outcome for (150, 150) is (225, 75). None of the expected outcomes even things up. It just gets more and more spread out.
One thing to keep in mind is that even supposedly uniform distributions can have outliers. For example, if you just throw N balls into N bins, there's going to be a bin with log N balls in it with high probability. Something similar is most likely going on here as well.
In a way, the really interesting question is whether the outcomes of that experiment are exponentially distributed. Then again, the simulation has basically nothing to do with real world wealth distribution anyway.
Similarly, if you randomly divide a fixed amount of wealth among n individuals, you end up with a boltzmann distribution of wealth, such that a small number if individuals have a lot of the wealth, while many have only a little.
The boltzmann distribution is the maximum entropy distribution, for fixed total energy or fixed total wealth.
All the people who are on the blue line have enough money to start changing the rules of the market. For example persuading government to grant them a special licence, or bail out their company or letting them bank offshore.
As this is HN I should point out that I don't think this is an argument for no government, just against political funding.
For an example of the latter, observe this HN thread: https://news.ycombinator.com/item?id=7042469
http://www2.econ.iastate.edu/tesfatsi/WhyEconomistsShunSimul...
Economics is not about redistribution of wealth, it is about human actions that generate -- or destroy -- wealth.
Wealth, in economics, is not a quantity of money, it is some set of valuable goods usable in producing other goods or to be consumed.
In fact, every voluntary transaction by definition creates wealth, because it brings the goods (being transacted) from an individual who values them less to an individual who values them more -- and vice-verse.
The guys who came up with it (I think they were Australians) won a Nobel(?) prize for it, but I can't remember what the technique is called. Anyone know? I might be remembering it incorrectly however.
While there are reasonable arguments for free markets which are pure philosophy, from a pragmatic perspective free markets are good, because the the price is probably the most accurate and efficient information channel available to producers and consumers.
It's the old "garbage in / garbage out" problem. If you don't have a good model, you can only simulate a bad one. Also:
> We don't have to be accurate, just directionally correct.
If the model is not accurate, you can't ever falsify it, thus you can't improve it. That's one of the biggest flaws of current economics, their models are not accurate.
Some are more accurate than others. This isn't a flaw BTW, rather an indicator of how complex the problem really is.
If you can figure out a good simulation model there will be someone willing to let you run it on a TOP500 supercomputer.
People already run these kinds of simulations, but the complexity is beyond the capability of today's computers. Not to mention all the random variables - wars, droughts, earthquakes, political change, technological improvements, etc..., which all affect economies.
And of course the information to model it is another problem, because much of it will have to be inferred - what's the probability of a war? What probable effect will technological advances have? Hows the weather going to be this summer? Will there be ice storms this winter?
People wonder why so many assumptions are made in economics - it's because some of the variables are simply too unpredictable.
(1) Because "works the best" is a question of subjective value, not one of objective fact, so it cannot be answered factually, and (2) Because while computers can run simulations, that doesn't even help answer factual questions until you have both a reliable model to use in the simulation that covers the specific area of interest and a complete description of the model-relevant facts from the economic context in which the proposals is to be evaluated. Good luck with that when it comes to any significant question of economic policy.
How do you simulate motivation?
I'd be happy with a flat tax for all, as long as there's a significant death tax. Maybe cap inheritances to (average household income x average life expectancy) for each child. The rest would be distributed to everyone else, equally.
I know that I stopped working as hard to gain more wealth the second my taxes went up.*
* Stated by no one ever.