Beginners Interactive NetLogo Dictionary (BIND)
Farsi / Persian
NetLogo Models Library:
This model aims to reproduce phenomena that emerge in modern-day cryptocurrency markets, but is general enough to model any resource traded using the concept of a limited order book. A Limited Order Book is a simple idea: it is a record of outstanding limit orders maintained by a stock exchange. A limit order is a type of order to buy or sell a security at a specific price or better. The simple act of buying and selling in this manner creates complex behaviors at the level of the exchange.
In this model, each trader holds some
cash, some tokens (
stockpile), and trades in the same limited order book. Tokens can be thought of as any tradable good, such as gold, silver, oil, stocks, or cryptocurrency such as Bitcoin or Ethereum. Each trader also holds a firm and constant
belief in the value of tokens, which is randomly set somewhere in the interval [initial-belief / 2, initial-belief] during the initialization of the model.
Time is split into multiple slices and represented as ticks. In each tick, each trader uses a pre-determined strategy to put limited orders on the market. Then, the matchmaking process starts between buyers and sellers. First, we create two empty lists to store pending orders. Then, since we assume that each trader has an equal opportunity of trading, we match each order randomly, during which:
For BUY orders, we go through the same process but with an opposite bias. In other words, we try to match BUY orders to cheaper prices.
Consequently, the market price of the token, as well as the other information available in the market, is calculated and provided to traders in the next tick.
In this fairly simplified model, we only implement two simple trading strategies.
The first one is called "honest", in which the trader will always try to buy and sell tokens at a price according to his/her belief of the value of that token.
The second strategy we call "cunning" and is slightly more complicated. Here, the trader will always buy with a price of either the best-selling-price or their belief (whichever is smaller) and sell with a price of either the best-buying-price or their belief (whichever is larger).
Note that after the matchmaking process, both strategies will cancel unfulfilled orders and issue new ones rather than keeping the orders on the exchange.
The following parameters affect how the market works in this model.
The below parameters all set the maximum amount of CASH, TOKENS, and BELIEF for each agent. Each is initialized according to a random draw from a uniform distribution on the interval [amount/2, amount]: * The INITIAL-CASH slider sets the maximum cash each trader will receive when the model is initialized. * The INITIAL-TOKENS slider sets the maximum tokens each trader will receive when the model is initialized. * The INITIAL-BELIEF slider determines the maximum initial BELIEF of each trader.
The plots and monitors give you a set of tools to measure the market as it transacts.
Try to create a more complicated trading strategy (there are a ton of possibilities)!
While in many NetLogo models we want to ask turtles to do things in a random order to not introduce bias toward particular turtles, here we use
foreach sort-on [who] traders so that the traders are deterministically called by their
who property and always rendered in the same order.This feature enables you to dynamically introduce traders into the model and keep its visualization stable and intact.
See the Bidding Market, simple economy, and Sugarscape models to explore more market or economy-related models.
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
Please cite the NetLogo software as:
This model was developed as part of the Spring 2021 Multi-agent Modeling course offered by Dr. Uri Wilensky at Northwestern University. For more info, visit http://ccl.northwestern.edu/courses/mam/. Special thanks to Teaching Assistants Jacob Kelter, Leif Rasmussen, and Connor Bain.
Copyright 2021 Uri Wilensky.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at email@example.com.