Throwing Coins - Inequality and Tax

Throwing Coins - Inequality and Tax preview image

1 collaborator

Rupertpassphotoneu Rupert Nagler (Author)

Tags

ergodicity 

Tagged by Rupert Nagler over 5 years ago

game simulation 

Tagged by Rupert Nagler over 5 years ago

gini 

Tagged by Rupert Nagler over 5 years ago

inequality 

Tagged by Rupert Nagler over 5 years ago

inequality & taxation 

Tagged by Rupert Nagler over 5 years ago

wealth distribution 

Tagged by Rupert Nagler over 5 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.1.1 • Viewed 573 times • Downloaded 40 times • Run 0 times
Download the 'Throwing Coins - Inequality and Tax' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Throwing Coins - Inequality and Tax.nlogo

Author: Rupert Nagler, Jan 2020, nagler@idi.co.at

WHAT IS IT?

Simulation of a coin game based on multiplicative growth. Based on the paper "Ergodicity Economics", published 2018 by Ole Peters and Alexander Adamou @ London Mathematical Laboratory: "We toss a coin, and if it comes up heads we increase your monetary wealth by 50%; if it comes up tails we reduce your wealth by 40%. We’re not only doing this once, we will do it many times. Would you submit your wealth to the dynamic our game will impose on it?", see: https://ergodicityeconomics.files.wordpress.com/2018/06/ergodicity_economics.pdf

Our turtles assume they will get rich playing this game. They are presented in their blue 2d-world as yellow circles. Their vertical position reflects their actual wealth, the horizontal position is their unique "who" number. You will experience their fate mislead by a wrong ergodic hypothesis for multiplicative growth - like most traditional economists. You can explore the intrinsic effects why "the rich get richer" and the benefits of cooperation induced by a form of wealth-tax. Lorenz Curve, Gini Coefficient and a histogram show the current distribution of their wealth.

HOW IT WORKS

All turtles play the coin game. Each of them throws a coin at each tick: If heads are shown, individual wealth is multiplied by "mult-heads" and "add-heads" is added. If tails are shown, individual wealth is multiplied by "mult-tails" and "add-tails" is added. After all turtles have thrown their coins and their wealth was adopted, some redistribution in the form of a wealth-tax may be applied: If "tax-factor" is > 0 and wealth is > "tax-limit" a wealth tax (wealth * tax-factor) is subtracted. Then the collected wealth tax is redistributed evenly to all turtles or to the poor turtles below tax-limit, depending on the switch "redist-all?". So you can simulate the effects of cooperation sharing the risk between players.

HOW TO USE IT

  • Use the sliders to control the number of turtles "num-turtles" and the initial wealth "init-wealth".
  • If you switch "random-init-wealth?" to "off" each turtle receives the equal "init-wealth" wealth; if you switch "random-init-wealth?" to "on" each turtle receives a random wealth between 1 and "init-wealth".
  • Set the fraction of actual wealth to bet by "leverage" (default: 1.0).
  • Set the multiplicative factors "mult-heads", "mult-tails" (defaults: 0.6, 1.5) with which your bet will be multiplied in case of win / loss.
  • Set the additive values "add-heads", "add-tails" (defaults: 0.0, 0.0) which will be added to your bet in case of win / loss.
  • Optional set "tax-factor", "tax-limit", and "redist-all?"
  • If you want bancrupt turtles to die, set "turtles-die?" to on.
  • To setup the simulation, press "setup".
  • To play one round press "go-1", to play as long as you wish, press "go".

THINGS TO NOTICE

  • You see all turtles sitting on the blue world area. Each turtle will go up or down vertically dependent of its current wealth after each tick.
  • In the wealth-plot you see min, max, mean and median of the turtles wealth on a log10 scale.
  • In the wealth-distribution histogramm you see the number of turtles in different classes of wealth.
  • In the Lorenz Plot you see the actual shape of the Lorenz Curve.
  • In the Gini Plot you see the value of the Gini Coefficient over time.

THINGS TO TRY

  • Try different values for multiplicative growth ("heads-mult", "tails-mult") and additive growth ("add-heads", "add-tails"),
  • Compare the wealth-distribution for no multiplicative growth (set both "heads-mult", "tails-mult" to 1.0) to other values of multiplicative growth (eg. 0.6, 1.5)
  • Compare the wealth-distribution for no additive growth (set both "heads-add", "tails-add" to 0.0) to other values of additive growth (eg. -0.2, 0.3)
  • Try different "tax-factor"s and "tax-limit"s, switch "redist-all?" on/off.
  • What changes can you see in the histogram, Gini Plot and Lorenz Curve?

EXTENDING THE MODEL

  • better visualization ideas?
  • turtles get children and die of age
  • implement inheritance tax

NETLOGO FEATURES

  • plotting on a log scale,
  • using turtle world to show turtle ranking by position,
  • histogram on varying upper and lower bounds,

RELATED MODELS

http://ccl.northwestern.edu/netlogo/models/WealthDistribution http://ccl.northwestern.edu/netlogo/models/Sugarscape3WealthDistribution

CREDITS & REFERENCES

credit: computation of lorenz curve and gini index copied from: NetLogo models WealthDistribution

in-depth readings:

Wikipedia: Distribution of wealth, retrieved 12/2019 https://en.wikipedia.org/wiki/Distribution_of_wealth

Wikipedia: Lorenz Curve, retrieved 12/2019 https://en.wikipedia.org/wiki/Lorenz_curve

Wikipedia: Gini Coefficient, retrieved 12/2019 https://en.wikipedia.org/wiki/Gini_coefficient

Wikipedia: Ergodic process, retrieved 12/2019 https://en.wikipedia.org/wiki/Ergodic_process

Ergodicity Economics, Ole Peters and Alexander Adamou, 2018 https://ergodicityeconomics.files.wordpress.com/2018/06/ergodicity_economics.pdf

Entrepreneurs, Chance, and the Deterministic Concentration of Wealth, Joseph E. Fargione u.a., 2011 https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0020728&type=printable

An evolutionary advantage of cooperation, Ole Peters and Alexander Adamou, 2018 https://arxiv.org/pdf/1506.03414.pdf

Capital and Ideology, Thomas Piketty, 2019 http://piketty.pse.ens.fr/files/Piketty2020SlidesLongVersion.pdf

Farmers Fable: Simulation benefits of cooperation, retrieved 12/2019 https://www.farmersfable.org/

Gier, Marc Elsberg, novel, blanvalet 2019 https://gier-das-buch.de/gier.php

COPYRIGHT

Copyright 2020 Rupert Nagler. All rights reserved. Permission to use, modify or redistribute this model is hereby granted, provided that both of the following requirements are followed: * this copyright notice is included. * this model will not be redistributed for profit without permission from Rupert Nagler. Contact the author for appropriate licenses for redistribution for profit.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

; Throwing Coins - Inequality and Tax.nlogo; Rupert Nagler Jan 2020

globals [
  gini-index-reserve ; actual Gini %
  lorenz-points ; list of Lorenz points
  coins ; number of thrown coins
  tails ; number of tails - results
]

turtles-own [
  wealth ; actual wealth of turtle
  tax ; actual amount of wealth tax turtle has payed
]

to setup
  clear-all
  ask patches [set pcolor 104]
  setup-turtles
  set coins 0
  set tails 0
  update-lorenz-and-gini
  reset-ticks
end 

to setup-turtles
  create-turtles num-turtles [
    set heading 0
    set color yellow
    set shape "circle"
    ifelse random-init-wealth? [; random distributuion
      set wealth random-float init-wealth
    ][; equal distribution
      set wealth init-wealth
    ]
    set tax 0
    ; place turtle on plain according id(own) on x-axsis and wealth on y-axsis
    setxy (who / num-turtles * 100) wealth
  ]
end 

to go
  playing
  taxing
  move-turtles
  if not any? turtles [stop]
  update-lorenz-and-gini
  tick
end 

to playing ; each turtle throws coin
  ask turtles [ ; leverage is the fraction of wealth to bet
    set wealth win (wealth * leverage) + wealth * (1 - leverage); compute new wealth on thrown coin
  ]
end 

to-report win [stake] ; function to compute new wealth according to coin throw with multiplicative and additive win
  let m mult-heads ; initialise with win factors
  let a add-heads
  set coins coins + 1
  if one-of list false true [ ; throw coin, in case loose change to loose factors
    set m mult-tails
    set a add-tails
    set tails tails + 1
  ]
  report (stake * m) + a
end 

to taxing
  if tax-factor > 0 [ ; do we have to compute taxes?
    let notax-turtles [self] of no-turtles ; empty unsorted list of turtles
    let sumtax 0
    ask turtles [ ; pay wealth tax
      ifelse wealth > tax-limit [ ; is there a tax to pay?
          set tax wealth * tax-factor
          set wealth wealth - tax ; turtle pays tax
          set sumtax sumtax + tax ; add to total tax collected
        ] [
          set tax 0
          set notax-turtles lput self notax-turtles ; add to list of notax-turtles
        ]
    ]
    let count-notax-turtles length notax-turtles ; number of notax-turtles
    ifelse redist-all? or (count-notax-turtles <= 0) [ ; do we have to redistribute to all turtles?
      let mtax (sumtax / count turtles) ; divide total tax between all turtles
      ask turtles [ ; redistribute tax to all turtles
        set wealth wealth + mtax ; redistribute
      ]
    ] [; divide total tax between all no-tax-turtles
      let mtax (sumtax / count-notax-turtles)
      ask turtle-set notax-turtles [ ; changes list into agentset
        set wealth wealth + mtax ; redistribute
      ]
    ]
  ]
end 

to move-turtles ; according to new wealth
  ask turtles [
    if turtles-die? [ ; should bancrupt turtles die?
      if wealth < 1.0E-10 [die]
    ]
    set ycor (wealth + min [wealth] of turtles) / max [wealth] of turtles * 100
  ]
end 

to update-lorenz-and-gini
  ; recompute value of gini-index-reserve and the points in lorenz-points for the Lorenz and Gini-Index plots
  let sorted-wealths sort [wealth] of turtles
  let total-wealth sum sorted-wealths
  let wealth-sum-so-far 0
  let index 0
  let c-turtles count turtles
  set gini-index-reserve 0
  set lorenz-points []
  ; now actually plot the Lorenz curve -- along the way, we also calculate the Gini index
  repeat c-turtles [
    set wealth-sum-so-far (wealth-sum-so-far + item index sorted-wealths)
    set lorenz-points lput ((wealth-sum-so-far / total-wealth) * 100) lorenz-points
    set index (index + 1)
    set gini-index-reserve gini-index-reserve + (index / c-turtles) - (wealth-sum-so-far / total-wealth)
  ]
end 

There is only one version of this model, created over 5 years ago by Rupert Nagler.

Attached files

File Type Description Last updated
Throwing Coins - Inequality and Tax.png preview Preview for 'Throwing Coins - Inequality and Tax' over 5 years ago, by Rupert Nagler Download

This model does not have any ancestors.

This model does not have any descendants.