UnitAgent
Unit agent: uses ZIAgent algorithm if there is no previous market price, afterward, bids/asks randomly within 1 price unit of previous price
see also Brewer, Paul Chapter 4 in Handbook of Experimental Economics Results, Charles R. Plott and Vernon L. Smith, eds., Elsevier: 2008
Chapter available on Google Books at https://books.google.com search for "Handbook of Experimental Economics Results" and go to pp. 31-45. or on Science Direct (paywall) at http://www.sciencedirect.com/science/article/pii/S1574072207000042
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) creates "Unit" robot agent similar to those described in Brewer(2008) |
Method Summary
Public Methods | ||
public |
Calculate price this agent is willing to accept. |
|
public |
Calculate price this agent is willing to pay. |
|
public |
calculates random change from previous transaction price |
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. |
From class ZIAgent | ||
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. |
Public Constructors
public constructor(options: Object) source
creates "Unit" robot agent similar to those described in Brewer(2008)
Override:
ZIAgent#constructorParams:
Name | Type | Attribute | Description |
options | Object |
|
passed to Trader and Agent constructors() |
Public Methods
public askPrice(marginalCost: number, market: Object): number | undefined source
Calculate price this agent is willing to accept. The returned price is within one price unit of the previous market trade price, or uses the ZIAgent random algorithm if there is no previous market trade price. Undefined (no ask) is returned if the propsed price would be lower than the marginalCost parameter If this.integer is true, the returned price will be an integer.
Override:
ZIAgent#askPricepublic bidPrice(marginalValue: number, market: Object): number | undefined source
Calculate price this agent is willing to pay. The returned price is within one price unit of the previous market trade price, or uses the ZIAgent random algorithm if there is no previous market trade price. Undefined (no bid) is returned if the propsed price would exceed the marginalValue parameter If this.integer is true, the returned price will be an integer.