Valentina Garella Aleksandra Kolndrekaj Giorgio Delgrosso

Simulation models for economics

Project work on

"Reputation in a simple online market."

 

The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Oracle's Java site.


Here you can find an introduction to the Reputation in a simple online market application.


powered by NetLogo

view/download model file: reputation_in_a_simple_online_market.nlogo

WHAT IS IT?

This model simulates an online market for homogeneous goods highlighting the role of reputation.
Our agents represent buyers and sellers. The first ones are situated in the upper line of the world. They have different colors depending on their attitude: yellow for honest, green for selfish and light blue for misleading. The second ones change their position according to the number of sales and average reputation which are respectively represented in the x axis and in the y axis. They have different colors according to the probability of selling high/low quality goods at higher/lower prices: white for good sellers and red for bad sellers.
In the world we can see a grey strip in the middle that corresponds to the initial reputation of sellers (which is equal for everyone) and another grey strip on the right side which is reached when the sellers have sold all the goods available.

HOW IT WORKS

Buyers have limited information on sellers. They can observe only prices, the number of sales and the reputation which is a function of feedbacks given by previous buyers.
In order to choose the best seller, buyers compare only a limited number of sellers.
For choosing the counterpart, buyers can use different criteria:
- if the buyer prefers a lower price, the negotiation will take place with the seller who has the maximum reputation and the lowest price
- if the buyer prefers a higher price the negotiation will take place with the seller who has the maximum reputation and the highest price
- if the buyer does not care about the price the negotiation will take place with the seller who has the maximum reputation

After the negotiation, the buyer gives a feedback according to her attitude:
- the honest one gives 25 of reputation if the purchased good is high quality, otherwise she gives 5
- the misleading one gives 5 of reputation if the purchased good is high quality, otherwise she gives 25
- the selfish one doesn’t give feedback at all.

We introduce a rule which states that if a seller hasn’t sold at least a minimum quantity of goods after a certain number of ticks she leaves the market and restarts the activity with the initial setting. This happens because she finds more profitable to change her identity (changing identity cost equal to zero).

HOW TO USE IT

The setup button creates all the turtles in the world, the plots and it colors patches.
With the go button the world starts to run: buyers and sellers negotiate, sellers move and if it is the case they exit from the market.
In the interface we have the possibility of changing many variables:
howManyBuyers: a slider from 0 to 100 with unit increment which is necessary for choosing the number of buyers
howManySellers: a slider from 0 to 100 with unit increment which is necessary for choosing the number of sellers
amongHowManySellers: a slider from 0 to the value set for howManySellers with unit increment. It represents the number of sellers among which the buyer has to choose.
Buyer’sType: a chooser which allows us to define the attitude of buyers. Immediately under the chooser there are two sliders useful to choose the percentage of different attitude.
Seller’sType: a chooser which allows us to define the attitude of sellers. Immediately under the chooser there is a slider useful to choose the percentage of bad sellers.
exitFromMarket: a switch that allows or not the sellers to exit from the market.
purchasingPropensity: a chooser which defines the preferences of buyers with references to the level of prices.
Four monitors show the effective number of different kind of agents.
There are two plots: "revenues" shows over time the mean amount of revenues for bad and good sellers; the other plot "sales" represents the sum over each individual of the number of sales.

THINGS TO NOTICE

In order to make the model more realistic, we suggest to set "amongHowManySellers" a value below ten. It’s preferable to have among buyers a percentage of honest.
We can see that the number of ticks in the end is not the same in the different scenarios: changing the value of variables such as "howManySellers", "amongHowManySellers" and "exitFromMarket", the lenght of the process will differ.

THINGS TO TRY

Only before running the model it is possible to choose the scenario that we want to explain.

EXTENDING THE MODEL

In order to make the model more complete and realistic, we could:
- introduce a cost function for sellers
- make the price depending on a demand and a offer curve
- extend the model to heterogeneous goods
- permit to sell an infinite amount of goods

CREDITS AND REFERENCES

http://pages.stern.nyu.edu/~lcabral/reputation/Reputation_June05.pdf

http://www.ebay.it/

(a reference to the model’s URL on the web, when we have it)

CODE

turtles-own [randomNumber attitude]
breed [buyers buyer]
breed [sellers seller]
buyers-own [ChosenSellers]
sellers-own [price pricePlot reputation ReputationSum feedbackNumber salesNumber lifeTime]




to setup

__clear-all-and-reset-ticks

  createBuyers

  createSellers

  colorPatches


end


  
  
to createBuyers

create-buyers howManyBuyers
  [set shape "person"
   set color 45
   set attitude "honest" 
   setxy random-float 16 30
   set randomNumber random 100
   
   if Buyer'sType = "misleading & selfish"    
      [ifelse randomNumber < %selfish
         [set color 65
          set attitude "selfish"
          setxy 16 + random-float 16 30 ]
         [if randomNumber < %selfish + %misleading 
           [set color 85
            set attitude "misleading"
            setxy 32 + random-float 16 30]]]
   if Buyer'sType = "with misleading"
      [if randomNumber < %misleading
         [set color 85
          set attitude "misleading"
          setxy 32 + random-float 16 30]]
   if Buyer'sType = "with selfish"  
      [if randomNumber < %selfish
         [set color 65
          set attitude "selfish"
          setxy 16 + random-float 16 30]]]

end
  
  
  
  
to createSellers

create-sellers howManySellers
  [set shape "person"
   set ReputationSum 15
   set feedbackNumber 1
   set reputation reputationSum / feedbackNumber                     ; sellers enter in the market with an initial reputation equals to 15
   set color 9.9
   set attitude "good"
   set price 1 - random-float 0.66
   set pricePlot price                                               ; price is relatively higher for good sellers
   setxy  salesNumber reputation 

   if seller'sType = "% of bad sellers"
      [ set randomNumber random 100
        if randomNumber < %badSellers
           [set color 15
            set attitude "bad"
            set price 0.67 - random-float 0.65 
            set pricePlot price]]]

ask sellers
 [if purchasingPropensity = "no price"
     [set price 1]
  if purchasingPropensity = "highest price"
     [set price price ^(-1)]
  if purchasingPropensity = "lowest price"
     [set price price ]]
 
end
  
  
to colorPatches
  
ask patches
 [if pxcor > 48
     [set pcolor 5]
  if pycor = 15
     [set pcolor 5]]
     
end





to go
 
if count sellers with [salesNumber < 49 ] = 0
    [stop]
 
 negotiate
 
 move
  
 exitMarket
 
 do_plots
 
 tick
 
  
end



to negotiate
  

ask buyers with [attitude = "honest"]
   [let sellersLeft sellers with [salesNumber < 49 ]                  ; create a list of sellers which have not finished their books yet
    ifelse amongHowManySellers < count sellersLeft
         [set ChosenSellers n-of amongHowManySellers sellersLeft]
         [set ChosenSellers sellersLeft]
   
    let TheSeller max-one-of ChosenSellers [reputation / price]       ; in this way the buyer chooses the seller according to her reputation and price 
    if TheSeller != nobody
        [ask TheSeller
            [set salesNumber salesNumber + 0.1
             set feedbackNumber feedbackNumber + 1
             set randomNumber random-float 1
             ifelse attitude = "good"
               [ifelse randomNumber < 0.8
                  [set ReputationSum ReputationSum + 25]
                  [set ReputationSum ReputationSum + 5]]
               [ifelse randomNumber < 0.2
                  [set ReputationSum ReputationSum + 25]
                  [set ReputationSum ReputationSum + 5]]
             set reputation reputationSum / feedbackNumber]]]
 
ask buyers with [attitude = "misleading"]
   [let sellersLeft sellers with [salesNumber < 49 ]
    ifelse amongHowManySellers < count sellersLeft
         [set ChosenSellers n-of amongHowManySellers sellersLeft]
         [set ChosenSellers sellersLeft]
          
    let TheSeller max-one-of ChosenSellers [reputation / price]
    if TheSeller != nobody
        [ask TheSeller
            [set salesNumber salesNumber + 0.1
             set feedbackNumber feedbackNumber + 1
             set randomNumber random-float 1
             ifelse attitude = "good"
                [ifelse randomNumber < 0.8
                   [set ReputationSum ReputationSum + 5]
                   [set ReputationSum ReputationSum + 25]]
                [ifelse randomNumber < 0.2
                   [set ReputationSum ReputationSum + 5]
                   [set ReputationSum ReputationSum + 25]]
             set reputation reputationSum / feedbackNumber]]]
 
 
ask buyers with [attitude = "selfish"]
   [let sellersLeft sellers with [salesNumber < 49 ]
    ifelse amongHowManySellers < count sellersLeft
          [set ChosenSellers n-of amongHowManySellers sellersLeft]
          [set ChosenSellers sellersLeft]
         
    let TheSeller max-one-of ChosenSellers [reputation / price]
    if TheSeller != nobody
        [ask TheSeller
            [set salesNumber salesNumber + 0.1]]]
   
ask sellers
 [set lifeTime lifeTime + 1]
 
       
end






to move
  
 ask sellers
    [setxy  salesNumber reputation]
    

end





to exitMarket
   
if exitFromMarket  
 [ask sellers with [salesNumber < 49 ]
    [if salesNumber < (lifeTime / 4) and lifeTime > 3           ;after 4 possibility of negotiation, if a seller has sold at least one time out of four stays in the market
        [set lifeTime 0
         set ReputationSum 15
         set feedbackNumber 1
         set reputation reputationSum / feedbackNumber
         set salesNumber 0]]]

end




to do_plots
  
 set-current-plot "sales"
 set-current-plot-pen "good sellers"
 plot sum [salesNumber] of sellers with [ attitude = "good"]
 set-current-plot-pen "bad sellers"
 plot sum [salesNumber] of sellers with [ attitude = "bad"]
 
 
 set-current-plot "revenues"
 set-current-plot-pen "good sellers"
 plot mean [pricePlot * salesNumber] of sellers with [ attitude = "good"]
 set-current-plot-pen "bad sellers"
 plot mean [pricePlot * salesNumber] of sellers with [ attitude = "bad"]
   
end



; Copyright 2012 Giorgio Delgrosso, Valentina Garella, Aleksandra Kolndrekaj. All rights reserved.
; Supervisor: Pietro Terna, Faculty of Economics, University of Turin