## Sunday, September 23, 2012

### An entitled derelict (me) simulates the economy

Disclaimer: All characters depicted in the following post are entirely a work of the author's (sleep-deprived) imagination. All models are wrong and probably not useful.
The Daily Show with Jon StewartMon - Thurs 11p / 10c
Exclusive - An Elegant Message to the 47%
www.thedailyshow.com
 Daily Show Full Episodes Political Humor & Satire Blog The Daily Show on Facebook

### Political rant

At a fundraiser in May, Republican presidential candidate Mitt Romney (paraphrased above) characterized almost half of the American populace as hopeless plebians desperately attached to the sore teat of the government. As a generally left-leaning graduate student dependent on federal research grants for income, I can only assume I'm included within this group. Maybe I should feel insulted, but I'd rather understand the worldview that allows a presidential candidate to become a Simpsons-style caricature of himself and still garner support from half the country. This could lead to a discussion of zero-sum games or the psychology of authoritarianism. For now, I want to focus on something more fundamental and (seemingly) nonpartisan - the notion of causality.

As far as I can tell from the rhetoric, the current Conservative narrative goes something like this:

Once upon a time there were two brothers, Lefty and Righty. Every day after school Righty would invest time into his lemonade stand, "Trickle-down treats", which he built with his own hands using personally obtained venture capital. By age 10 he had successfully incorporated all neighborhood lemonade stands into his company, allowing him to create 50 jobs for area children. He eventually went on to additional fame and fortune as the CEO of bootstrapped bootstraps, the finest purveyor of self-replicating footwear accessories. Meanwhile, Lefty delved into Marxist literature, writing diatribes on dialectical materialism whilst demanding the occasional handouts from Righty and thus depriving his brother from his grand ambition: opening the Grover Norquist bathtub emporium.
Essentially, the message is that hard work leads to success; therefore, success comes from hard work. Likewise, laziness leads to economic hardship and dependency, meaning that poor people are lazy, entitled fuckwads.

This notion of economic causality is actually a very comforting thought, perhaps increasing the appeal of the right beyond their legitimate economic base. After all, most people (rightfully) believe they work hard and deserve the American dream - a house, two cars, and plenty of useless Chinese-manufactured crap to regift to their 2.5 kids when they move to Florida in their old age.

Yet the world is not causal. As great sages have said before me, "shit happens". Kids happen. Unexpected bills happen. Market changes happen. Still, many hold onto the notion that hard work guarantees success. Fortunately, as someone who can program, I'm in the position to play armchair economist and ask what happens when the only factors distinguishing the economic success of one person from another are the random vicissitudes of life. Now let's play make-believe with the economy!

### Simulating the economy

Here's my scenario: In the beginning there are 500 families, each with 80 dollars to their names. I then simulate their economic histories through the course of 50,000 days (about 137 years), so there are multiple generations here. On each day of the simulation, I guarantee every family an income of 80 dollars. However, each family also has daily expenses that are sampled from a normal distribution, where the mean of the distribution is given by the following, where $x$ is total savings up to that point: $$f(x) = \frac{80}{1+(0.01)0.995^{-0.01x}}$$ Basically, this function means that families with very low savings are spending almost all of their incomes on expenses, while wealthier families devote a much smaller portion toward expenses. I also set the standard deviation of the expense distribution to one-fifth of the income. This allows for families to lose or gain money with each passing day, though they do have a slight positive edge on average. Additionally, families with positive savings (those who aren't in debt) invest their savings, which yields returns (or losses) through a normal distribution with mean 0 and a standard deviation equal to 1% of the accumulated wealth of the family.

Now, I know the model is not taking into account many aspects of economic life - rare extreme disastrous events (black swans to use Taleb's terminology), loan interest, the idiotic spending habits of certain individuals. However, the main point I want to address is what happens when everyone follows the same (not unrealistic) economic strategy. My Python code is below. It runs the simulation, plots the economics histories, and plots the fraction of wealth accumulated by the top 20% and top 5% of the population over time. I encourage you to try it for yourself and modify it if you want. If you think I'm being a total idiot, I encourage you to show me a better way!

from scipy import stats
import numpy as np
import matplotlib.pyplot as plt

# Run the simulation
histories = [np.zeros(50000) for x in xrange(500)]
income = 80.
expense_func = lambda x: 1./(1.+0.01*0.995**(-0.01*x))
for his in histories: his[0] = income
for i in xrange(1,50000):
print i
for his in histories:
saved = income - stats.norm.rvs(loc=expense_func(his[i-1])*income,scale=income/5.)
if his[i-1] > 0: his[i] =  his[i-1] + saved + \
stats.norm.rvs(scale=0.01*his[i-1])
else: his[i] = his[i-1] + saved

# Plot money vs. time
for his in histories: plt.plot(np.arange(0,50000,50),his[np.arange(0,50000,50)])

plt.xlabel('time')
plt.ylabel('Dollars')
plt.show()

# Plot fraction owned by top 20% over time
wealth_frac = []
for i in xrange(50000):
wealth = sorted([his[i] for his in histories])
wealth_frac.append(np.sum(wealth[400:])/np.sum(wealth))

wealth_frac = np.array(wealth_frac)
# Plot out fraction owned by top 20% over time
plt.plot(np.arange(0,50000,50),wealth_frac[np.arange(0,50000,50)])
plt.xlabel('time')
plt.ylabel('Ownership by top 20%')

# Plot fraction owned by top 5% over time
wealth_frac = []
for i in xrange(50000):
wealth = sorted([his[i] for his in histories])
wealth_frac.append(np.sum(wealth[475:])/np.sum(wealth))

wealth_frac = np.array(wealth_frac)
plt.plot(np.arange(0,50000,50),wealth_frac[np.arange(0,50000,50)])
plt.xlabel('time')
plt.ylabel('Ownership by top 5%')
plt.show()


In the end the richest family ended up with 38,281,980 dollars, while the poorest had only had 1,528 despite the fact that they pursued the same economic strategies. I can only assume the richest family - represented by the black line in the first figure - would be lauded for their success, a testament to the value of hard work. After all, Grandpa Richy McRicherton started with 80 dollars in his pocket and ended up a multi-millionaire. Meanwhile, the poorer families might be decried for their use of public services and desire to fund them.

Obviously this wasn't totally realistic, since no one ended up in debt in the end, but the inequalities stand out over repeated simulations. A couple issues - although the figures appear to show that the top 20% started with 50% of the wealth, this is actually due to a sharp upswing in inequality at the beginning of the simulation as the families depart from the equal starting values. Curiously, the top 20% reaches a high of owning approximately 80% of the wealth, which falls in line with the famous Pareto principle, but this may just be a coincidence. I would need to run the simulation for longer to see if the top 20% continues to account for approximately 65% of the wealth or if there is another longer term trend. Either way, enough inequality occurs to allow the top 5% to control between 35% and 40% of the total wealth in the end, and a few different runs with varying parameters show this to be robust to changes in the values used in the simulation.

So what can we conclude from this excercise (assuming my simulation wasn't totally naive)? 1.) inequality is the natural tendency for unconstrained economic systems and 2.) the causal economic storyline is bullshit.

John Galt can kiss my ass

#### 1 comment:

1. As great sages have said before you, shit does indeed happen. But equally old is the attitude of Job's friends, that even if it isn't obvious how you brought your misfortune upon yourself, nonetheless the principles of the universe are so that you definitively deserve it somehow.

It's a very pagan attitude. By that, I mean it's the sort of view about existence that people (in societies of a certain size, at least) tend to adopt unconsciously, drift into so to say, from whatever world view they nominally held before. If it doesn't immediately affect you - maybe even if it does - it's easier to deny the existence of manifest injustice in order to get by.