Multi-player Games: Auctions and Markets Second price sealed-bid auctions Part V Dutch Auctions Posted-offer markets Double Auctions Multi-player Games: Auctions and Markets Multi-player Games: Auctions and Markets Multi-player Games: Auctions and Markets Second price sealed-bid auctions Second price sealed-bid auctions checkers while statement variables into labels Dutch Auctions The later statement Programs into buttons Posted-offer markets the contracts table the contracts creation box the contracts list box Double Auctions Dutch Auctions Posted-offer markets Double Auctions Second price sealed-bid auctions - I Purpose: elicit the true value of a good (e.g. a mug) for each of the subjects. I each subject receives an initial endowment (20 euros) I I each subject makes an offer for the mug (possibly even above 20 euros). The offers are secret and simultaneous. the subject who makes the highest bid wins the mug and has to pay a price equal to the second highest bid. in case of a tie, the winner is drawn at random among the bidders who submitted the highest bid. See second price auction.ztt I Multi-player Games: Auctions and Markets Second price sealed-bid auctions checkers while statement variables into labels Dutch Auctions Posted-offer markets Double Auctions Second price sealed-bid auctions - II Multi-player Games: Auctions and Markets Second price sealed-bid auctions checkers while statement variables into labels Dutch Auctions Posted-offer markets Double Auctions checkers Multi-player Games: Auctions and Markets checkers are used to verify the validity of an input. To create a checker, select the button you need to “check”, then, from the menu: Treatment→New checker Second price sealed-bid auctions checkers while statement variables into labels Dutch Auctions Posted-offer markets Double Auctions while statement - I To sort the winner at random in case of a tie, we use the while statement: Multi-player Games: Auctions and Markets Second price sealed-bid auctions checkers while statement variables into labels while(subjects.count(winner==1)>1){ subjects.do{ rand=if(winner==1, random(), 0); } subjects.do{ winner=if(rand==subjects.maximum(rand),1, 0); } } Dutch Auctions Posted-offer markets Double Auctions while statement - II Multi-player Games: Auctions and Markets Second price sealed-bid auctions checkers The general use is: while(condition){ program; } While the condition is TRUE, the program is executed. Reminder: loops can be left with the key combination Ctrl+Alt+F5. while statement variables into labels Dutch Auctions Posted-offer markets Double Auctions Variables into labels In the Active screen of the Results stage, we tell each participants whether he is the winner. In the input label we write: <>You are <winner|!text:1="";0="not ";> the winner. This becomes: I “You are the winner”, if the variable winner is equal to 1 I “You are not the winner”, if the variable winner is equal to 0 Do not forget the <> sign at the beginning. Multi-player Games: Auctions and Markets Second price sealed-bid auctions checkers while statement variables into labels Dutch Auctions Posted-offer markets Double Auctions Dutch Auctions - I A Dutch auction is an auction in which the auctioneer begins with a very high asking price, which is progressively lowered until some participant accepts the auctioneer’s price, or until a predetermined time is over. I all subject are buyers I global variables: I I I I initial asking price duration of the auction (in seconds) → duration step of decrease of the price → step frequency of decrease of the price (in seconds) → time interval See dutch auction.ztt Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions The later statement Programs into buttons Posted-offer markets Double Auctions Dutch Auctions - II Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions The later statement Programs into buttons Posted-offer markets Double Auctions The later statement In the Auction stage, we run the following program: later(time_interval) repeat{ price=price-step; duration=duration-time_interval; } The general form is: later(a) repeat{ program; } Expression a is calculated. The resulting number of seconds later, the program is executed. Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions The later statement Programs into buttons Posted-offer markets Double Auctions The later statement In the Auction stage, we run the following program: later(time_interval) repeat{ price=price-step; duration=duration-time_interval; } The general form is: later(a) repeat{ program; } Expression a is calculated. The resulting number of seconds later, the program is executed. Note: to exit the loop, set a to a negative value. Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions The later statement Programs into buttons Posted-offer markets Double Auctions Programs into buttons When a subject tries to buy the good: I check that the good has not been sold so far I run a program to assign the good to the subject Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions The later statement Programs into buttons Posted-offer markets Double Auctions Posted offer markets - I Multi-player Games: Auctions and Markets Second price sealed-bid auctions I subjects in the role of buyers and sellers I each seller makes an offer, without knowing the offers made by other buyers. I buyers act sequentially, in random order I they can see all the sellers’ offers that are still open, and choose which one to accept, if any. I accepted offers are not visible anymore to subsequent buyers. See posted offers markets.ztt Dutch Auctions Posted-offer markets the contracts table the contracts creation box the contracts list box Double Auctions Posted offer markets - II Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets the contracts table the contracts creation box the contracts list box Double Auctions The contracts table Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets the contracts table the contracts creation box the contracts list box Double Auctions The contracts creation box Records in the Contracts table are created via inputs in the Contract Creation Box. Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets the contracts table the contracts creation box the contracts list box Double Auctions Buyers enter the Acceptance stage one by one Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets I I the variable Priority, if set, defines the order according to which subjects enter the stage. if Priority is not set, subjects enter the stage in random order. the contracts table the contracts creation box the contracts list box Double Auctions The contracts list box Available offers are displayed in a Contract list box. Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets the contracts table the contracts creation box the contracts list box Double Auctions The contracts list box Available offers are displayed in a Contract list box. Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets the contracts table the contracts creation box the contracts list box Double Auctions Double auctions - I see the z-Tree Tutorial, pages: 57-66 I subjects in the role of buyers and sellers. I both sellers and buyers can make offers, at the same time. I each seller and each buyer can make more than one offer. I sellers and buyers can see all the open offers (made by buyers and by sellers) I each seller can accept only one of the buyers’ offers. each buyer can accept only one of the sellers’ offers. See double auction.ztt I Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets Double Auctions Double auctions - II Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets Double Auctions Double auctions - screenshot Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets Double Auctions Double auctions - accepting an offer 1. set the ID of the accepter 2. close all other offers by the same proposer and by the same accepter 3. if all subjects have signed a contract, leave the stage Note: the variable LeaveStage is preset in z-Tree. Multi-player Games: Auctions and Markets Second price sealed-bid auctions Dutch Auctions Posted-offer markets Double Auctions