User Tools

Site Tools


Table of Contents


Group A Ægir Þorsteinsson, Páll Rúnar Þráinsson
Group B Guðrún Birna Guðmundsdóttir, Þorri Gestsson
Group C Sigurjón Viðar Svavarsson, Brynjar Reynisson
Group D Pálmi Skowronski, Claudio Pedica


Hand-in will be threefold: You will do a presentation in class of your solution. Do not go over 10 minutes! You must check your code into SVN (instructions to follow). And you must mark that you have finished the project in the MySchool system.


In this project you must:

  • Use the Constructionist Design Methodology to achieve a good system architecture design
  • Run the system on Gola and be ready to demonstrate it on Gola in class
  • Use whiteboards and message types sensibly to achieve an efficient yet flexible architecture
  • Use Psyclone 1.1 (not 1.0.6)

Consider the trading of a single commodity through a double auction market process. A double auction is a process in which buyers and sellers can freely enter limit orders (bids or asks) and accept bids or asks entered by others. It is the organization used in major exchange markets around the world trading stocks, commodities or currencies.

Create an agent-based model of a double auction market for a single commodity in Psyclone. Use the following basic specification, but feel free to extend it in any way you desire.

  • There are N buyers and M sellers in the market. Each seller supplies one unit of the commodity and each buyer demands one unit of the commodity during each run.
  • For each run each buyer (i) is assigned a random value, 0 ≤ vimaxBuyerValue, which represents how the buyer values the commodity. Similarly, each seller (j) is assigned a random value, 0 ≤ cjmaxSellerCost which represents the cost incurred by the seller for providing the commodity.
  • During the run let each buyer (i) regularly place a random bid 0 ≤ bivi until a trade is made. New bid will cancel older bid. Similarly, let each seller (j) regularly place a random ask cjajmaxBuyerValue until a trade is made. New ask will cancel older asks.
  • A trade will be made when a seller asks for a price which is equal to or lower than the price bid by the buyer. When the ask price is lower than the bid the transaction price is set equal to the earlier of the two.
  • The auctioneer will seek to maximize the number of trades for the bids and asks available at any time.
  • Each run is terminated when all units have been traded, specific amount of time has elapsed since the last trade (MaxTimeSinceLastTrade), or the maximum run time has elapsed (MaxRunTime).

Use the following information to monitor the results of each run:

  • Plot of the transaction prices for each trade as well as average price, standard deviation of the price, and volume of trade.
  • Demand and supply curve for the run based on the values of the buyers and cost of sellers (quantity on x-axis, price on y-axis). The demand and supply curve determines the equilibrium price and volume, which should be compared to the actual transaction prices, average transaction price of the run, and the volume traded within the run.
  • The efficiency of the market based on comparison of simulated surplus and maximum surplus. Surplus is created when the difference between value and costs is positive. Maximum surplus is the accumulated surplus of all possible trades for the given demand and supply curve. Simulated surplus is the accumulated surplus of the trades that occur.

Conduct several runs of the model using N = M = 20 and MaxSellerCost = MaxBuyerValue = 30. Monitor the outcome. What can you conclude? Why might the results not perfectly match the predicted competitive equilibrium? Is there anything about the patterns of trading that improve or impede market efficiency?

Test the scalability of the model by increasing the N and M. What can you conclude about the complexity of modeling market interaction?

/var/www/ · Last modified: 2024/04/29 13:33 by

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki