Kiyotaki Wright Model of Money

Kiyotaki Wright Model of Money preview image

1 collaborator

Default-person Pedro Romero (Author)

Tags

barter 

Tagged by Pedro Romero over 8 years ago

exchange, specialization 

Tagged by Pedro Romero over 8 years ago

money 

Tagged by Pedro Romero over 8 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.3 • Viewed 1165 times • Downloaded 54 times • Run 0 times
Download the 'Kiyotaki Wright Model of Money' modelDownload this modelEmbed this model

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


WHAT IS IT?

This model is an agent-based version inspired by the game theoretical model by Kiyotaki and Wright (1989). The model studies the emergence of money or a commodity money out of trading in consumption goods. It is, also, a search theoretical model based on a matching mechanism.

HOW IT WORKS

In this enviroment, there three goods (g1, g2 ,g3) and a population of agents of three types: i) agent type I (yellow color) consumes good g1 and produces good g2; ii) agent type II(blue color) consumes g2 and produces good g3; and iii) agent type III(red color) consumes good g3 and produces good g1. Thus, trade is induced by consumption preferences and specialized production. Only one good can be stored from period to period, a no agent can hold more than one good at a time. Agents move randomly to search for partners, each of them can only have one partner per tick. Every agent, also, produces its especialized production good. Once matched every pair of agents can barter if there is full coincide of preferences and production; or one of the agents will become a middleman who takes one of the goods not for consumption but for exchange; and finally nothin can happen if none of the two previuos cases occur. Contrary to the original model, here agents are not maximizing on a rational basis to achieve this equilibrium. Thus, this parsimoniuos model shows that rationality assumption are not necessary to get the fundamental result of the original paper.

HOW TO USE IT

This section could explain how to use the model, including a description of each of the items in the interface tab.

THINGS TO NOTICE

Only good 2 arises as the commodity money or medium of exchange, and the middleman are agents type II.

THINGS TO TRY

Try increasing population of agents. More interestingly, try to change the production technologies of the agents increasing how much can they produce, to see any changes.

EXTENDING THE MODEL

One natural extension is to explicitly model the maximizing behavior of the agents. Other extension is to introduce a fiat money with zero storage cost. A more challenging extension is to make a model of the co-evolution of specialization and money.

NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.

RELATED MODELS

This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.

CREDITS AND REFERENCES

Kiyotaki and Wright (1989): On money as a medium of exchange. Journal of Political Economy 97(4), http://www.jstor.org/stable/1832197?

Comments and Questions

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

Click to Run Model

;;Written by Pedro Romero, promeroec@gmail.com 2016
;;Inspired by Kiyotaki and Wright 89.
;;Universidad San Francisco de Quito! preliminary version

globals [
  ;;Cost of storage per good
  costGoodA costGoodB costGoodC
]

turtles-own[
  traderType partner partnered? myPartnerType
  goodA goodB goodC consume traded
]

to setup
  clear-all
  ask patches [ set pcolor white ]
  crt population [
    set shape "person"
    setxy random-xcor random-ycor

    set traderType random-float 1.0
    if (traderType <= 1.00) [
      ifelse (traderType > 0.67)
      [ set color yellow
        ] ;;type1 likes goodA prod B
      [ifelse (traderType > 0.33)
        [set color blue
          ]  ;;type2 likes goodB prod C
        [set color red
          ]   ;;type3 likes goodC prod A
        ]]
    set goodB 0 set goodC 0 set goodA 0

  ]
  ;;setting up variables
  ask turtles [
    set partner nobody
    set partnered? false
    set myPartnerType 0
    set consume false
    set traded false]
  set costGoodA 1 set costGoodB 4 set costGoodC 9
  reset-ticks
end 

to go
  ask turtles [
  setxy random-xcor random-ycor  ;;search
  set goodA 0 set goodB 0 set goodC 0
  ]
  release-partners
  all-partnered
  init-production
  make-exchange
  tick
end 

to rounds
  ask turtles [
  setxy random-xcor random-ycor  ;;search
  ]
  release-partners
  all-partnered
  make-exchange
  ;new-production
  tick
end 

to release-partners
    ask turtles [
    if (partnered? = true) [
      set partner nobody
      set partnered? false
    ]
    ]
end 

to all-partnered
  while [ (count turtles with [partner = nobody] > 0) ] [;move-turtles
  partnering]
end 

to partnering
  ask turtles [
    if (partnered? = false) [
       setxy random-xcor random-ycor
       if (partner = nobody) and (any? other (turtles-at -1 0) with [partner = nobody]) [
         set partner one-of other (turtles-at -1 0) with [partner = nobody]
         set partnered? true
         ask partner [
           set partner myself
           set partnered? true

                     ]
                                              ]

                          ]

             ]
end 

to init-production

    ask turtles [ifelse (color = yellow) [
        set goodB 1] [
        ifelse (color = blue) [
          set goodC 1] [
          set goodA 1]
        ]
    ]
end 

to make-exchange

  ask turtles [ set consume false set traded false]

  ask turtles [ ifelse ((goodA + goodB + goodC) = 1) [
  ask turtles with [color = blue] [;;loop
    ;;Trade or swap 1 unit if it is the one type i likes
            ask partner [ if color != blue [
              ifelse (color = yellow) [
                 if (goodB = 1) and ([goodA = 1] of myself)[
                        set goodA 1 set goodB 0 set goodC 0 set-consume
                       ask myself [ set goodC 0 set goodA 0 set goodB 1 set-consume ]
                       ] ]
               [ if (goodA = 1) and ([goodC = 1] of myself) [ ;;begin red
                  set goodC 1 set goodA 0 set goodB 0 set-consume
                  ask myself [set goodC 0 set goodA 1 set goodB 0 set-exchange ]
                  ] ] ;;set-exchange before
                     ]
            ]
          set-surplus
          ask partner [ set-surplus] ]
  ]
  [ ;if (consume = false) and (traded = false)
                       set-surplusNoTrade ]
  ]
           ;ask partner [set-surplusNoTrade] ]
      ;]
  ;] ;;end ask TURTLES
end 

to set-consume
  ;;agent i consumes and and produces
  ifelse color = yellow [
    set consume true
    set goodA 0 set goodB 1 set goodC 0
    show (list [color] of self partner myPartnerType goodA goodB goodC "con" ticks)
    ;
    ]
  [
  ifelse color = blue [
    set consume true
    set goodB 0 set goodC 1 set goodA 0
    show (list [color] of self partner myPartnerType goodA goodB goodC "con" ticks)
    ;
     ]
  [
    set consume true
    set goodC 0 set goodA 1 set goodB 0
    show (list [color] of self partner myPartnerType goodA goodB goodC "con" ticks)
    ;
    ]]
end 

to set-exchange

        set traded true
        show (list [color] of self partner myPartnerType goodA goodB goodC "exc" ticks)
end 

to new-production
  ask turtles with [consume = false and traded = false] [
  ifelse color = yellow [
    set goodB 1

    ]
  [
  ifelse color = blue [
    set goodC 1

     ]
  [
    set goodA 1

    ]] ]
end 

;;The following does not alter the main algorithm to find good that becomes money

to set-surplus
  ;;Here code just to compute utilities after trading
end 

to set-surplusNoTrade
  ;;here code just to compute utilities if no trade at all
end 

;plots

There are 2 versions of this model.

Uploaded by When Description Download
Pedro Romero over 8 years ago nlogo file Download this version
Pedro Romero over 8 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Kiyotaki Wright Model of Money.png preview Preview for 'Kiyotaki Wright Model of Money' over 8 years ago, by Pedro Romero Download

This model does not have any ancestors.

This model does not have any descendants.