ZIAgent
Direct Subclass:
a reimplementation of Gode and Sunder's "Zero Intelligence" robots, as described in the economics research literature.
see
Gode, Dhananjay K., and S. Sunder. [1993]. ‘Allocative efficiency of markets with zero-intelligence traders: Market as a partial substitute for individual rationality.’ Journal of Political Economy, vol. 101, pp.119-137.
Gode, Dhananjay K., and S. Sunder. [1993b]. ‘Lower bounds for efficiency of surplus extraction in double auctions.’ In Friedman, D. and J. Rust (eds). The Double Auction Market: Institutions, Theories, and Evidence, pp. 199-219.
Gode, Dhananjay K., and S. Sunder. [1997a]. ‘What makes markets allocationally efficient?’ Quarterly Journal of Economics, vol. 112 (May), pp.603-630.
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) creates "Zero Intelligence" robot agent similar to those described in Gode and Sunder (1993) |
Method Summary
Public Methods | ||
public |
calculate price this agent is willing to accept as a uniform random number ~ U[marginalCost, maxPrice] inclusive. |
|
public |
calculate price this agent is willing to pay as a uniform random number ~ U[minPrice, marginalValue] inclusive. |
Inherited Summary
From class Agent | ||
public |
period: * |
|
public |
time, in JS ms since epoch, of agent wake |
|
public |
ends current period, causing agent to undertake end-of-period tasks such as production and redemption of units |
|
public |
initialize an agent to new settings |
|
public |
initPeriod(period: number | Object) re-initialize agent to the beginning of a new simulation period |
|
public |
percent of period used |
|
public |
guess at number of random Poisson wakes remaining in period |
|
public |
produce() produces units in negative inventory with configured costs, usually called automatically at end-of-period. |
|
public |
redeem() redeems units in positive inventory with configured values, usually called automatically at end-of-period. |
|
public |
increases or decreases agent's inventories of one or more goods and/or money |
|
public |
unitCostFunction(good: String, hypotheticalInventory: Object): number agent's marginal cost of producing next unit |
|
public |
unitValueFunction(good: String, hypotheticalInventory: Object): number agent's marginal value for redeeming next unit |
|
public |
wakes agent so it can act, emitting wake, and sets next wakeTime from this.nextWake() unless period.endTime exceeded |
From class Trader | ||
public abstract |
send a limit order to sell one unit to the indicated market at myPrice. |
|
public abstract |
calculate price this agent is willing to accept. |
|
public abstract |
send a limit order to buy one unit to the indicated market at myPrice. |
|
public abstract |
calculate price this agent is willing to pay. |
|
public |
For each market in agent's configured markets, calculates agent's price strategy for buy or sell prices and then sends limit orders for 1 unit at those prices. |
Public Constructors
public constructor(options: Object) source
creates "Zero Intelligence" robot agent similar to those described in Gode and Sunder (1993)
Override:
Trader#constructorPublic Methods
public askPrice(marginalCost: number): number | undefined source
calculate price this agent is willing to accept as a uniform random number ~ U[marginalCost, maxPrice] inclusive. If this.integer is true, the returned price will be an integer.
Override:
Trader#askPriceParams:
Name | Type | Attribute | Description |
marginalCost | number | the marginal coat of producing the next unit. sets the minimum price for random price generation |
public bidPrice(marginalValue: number): number | undefined source
calculate price this agent is willing to pay as a uniform random number ~ U[minPrice, marginalValue] inclusive. If this.integer is true, the returned price will be an integer.
Override:
Trader#bidPriceParams:
Name | Type | Attribute | Description |
marginalValue | number | the marginal value of redeeming the next unit. sets the maximum price for random price generation |