This program sets up a market in which participants are given an cash endowments that can be used to purchase "shares" pertaining to unknown future events like particular election outcomes. Shares can be bought and sold, and they are redeemed after the future event (e.g., election) for amounts that depend on event outcome. The default setup used political event terminology, but an alternative uses neutral event terminology.
There are two types of markets that can be used. In a vote-share market, the redemption value for a share is equal to the vote share associated with that outcome; a 50% vote share results in a payment of 50 cents, etc. In a winner-take-all market, the shares for the winning candidate pay $1.00 each, and all other shares pay $0.00.
Trades are arranged by a "limit-order process" in which buyers' purchase orders and sellers' sell orders are "crossed" to determine a uniform market-clearing price when the instructor presses a Stop Trading button to "call" the market or when the alloted time limit is reached.
These political stock markets have been run at the University of Iowa for many years, see Forsythe et al. (1992) "Forecasting the 1988 Presidential Election: A Field Experiment," in M. Isaac (ed.) Research in Experimental Economics, Vol. 4, JAI Press. Prediction markets are the focus of Chapter 34 of Holt (2006) Markets, Games, and Strategic Behavior (Addison-Wesley).