Constructor
new ZIAgent(optionsopt)
creates "Zero Intelligence" robot agent similar to those described in Gode and Sunder (1993)
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
passed to Trader and Agent constructors()
Properties
|
Classes
Methods
askPrice(marginalCost) → {number|undefined}
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.
Parameters:
Name | Type | Description |
---|---|---|
marginalCost |
number | the marginal coat of producing the next unit. sets the minimum price for random price generation |
Returns:
randomized sell price or undefined if marginalCost non-numeric or greater than this.maxPrice
- Type
- number | undefined
bidPrice(marginalValue) → {number|undefined}
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.
Parameters:
Name | Type | Description |
---|---|---|
marginalValue |
number | the marginal value of redeeming the next unit. sets the maximum price for random price generation |
Returns:
randomized buy price or undefined if marginalValue non-numeric or less than this.minPrice
- Type
- number | undefined