Auction Extension

The auction extension allows the entering of trading orders that are executed in discrete time. The order matching mechanism fills as many crossing orders as possible at a single price when the market clears Users have the option to view the last traded price and volume through a reporter. No traders' orders are matched 1 to 1

How to use

To use the auction Extension in your model, add a line to the top of your procedures tab:

extensions [ auction ]

For the most basic usage, issue bids and asks from traders with the commands:

  auction:buy trader market price size
  auction:sell trader market price size
For more information on using Netlogo extensions, see the Extensions Guide.

auction extension Primitives

Execute

auction:setup-market auction:buy auction:sell auction:clear

Report

auction:last-trade

Execute

auction:setup-market

auction:setup-market turtle asset-name currency-name

Adds a single market to the simulation for a certain type of asset

auction:buy

auction:buy turtle market(turtle) price size

Place a buy order in the market. Takes a turtle trading agent, a market type a price and size for the order Will remove cash at price * quantity for buy after placing and before clearing

auction:sell

auction:sell turtle market(turtle) price size

Place a sell order in the market. Takes a turtle trading agent, a market type a price and size for the order Will remove assets at the quantity of sell after placing and before clearing

auction:clear

auction:clear market(turtle)

clears the auction of all orders and fills the standing orders crossing the price threshold

Report

auction:last-trade-price

auction:last-trade-price market(turtle)

returns the last trade price in a market

Report

auction:last-trade-volume

auction:last-trade-volume market(turtle)

returns the last trade volume in a market

Credits:

Under construction