Class MarketImitatingAgent

java.lang.Object
  extended bySwarmObjectImpl
      extended byBasicSumAgent
          extended byMarketImitatingAgent

public class MarketImitatingAgent
extends BasicSumAgent

MarketImitatingAgent inherits from BasicSumAgent and operates in an imitative way, following market tendency.

Author:
Bruno Mencarelli
See Also:
Serialized Form

Field Summary
 double[] order
          This is the vector containing the basic input of an order: the price of the offer, the quantity of shares and the identification number of the agent.
 RandomRuleMaster ruleMaster
          This is the Rule Master of the market imitating agent.
 
Fields inherited from class BasicSumAgent
agentWealthAtMeanDailyPrice, asymmetricBuySellProb, buySellSwitch, executedPrices, iMax, liquidityQuantity, maxOrderQuantity, meanOperatingPrice, number, price, printing, shareQuantity, shareValueAtMeanDailyPrice, theBook
 
Constructor Summary
MarketImitatingAgent(Zone aZone, int maxOrderQuantity)
          Constructor for a new market imitating agent.
 
Method Summary
 void act0()
          This method is called in the first phase of the day.
 void act1()
          This method is called during the simulated day.
 double chooseBuySellSwitch(Book theBook, double asymmetricBuySellProb)
          This method allows the agent to operate following the market tendency.
 void setRuleMaster(RandomRuleMaster r)
          This method sets the Rule Master.
 
Methods inherited from class BasicSumAgent
act2, extract, getWealthAtMeanDailyPrice, setAsymmetricBuySellProb, setBook, setConfirmationOfExecutedPrice, setMaxOrderQuantity, setNumber, setPrinting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

order

public double[] order
This is the vector containing the basic input of an order: the price of the offer, the quantity of shares and the identification number of the agent.


ruleMaster

public RandomRuleMaster ruleMaster
This is the Rule Master of the market imitating agent.

Constructor Detail

MarketImitatingAgent

public MarketImitatingAgent(Zone aZone,
                            int maxOrderQuantity)
Constructor for a new market imitating agent.

Method Detail

chooseBuySellSwitch

public double chooseBuySellSwitch(Book theBook,
                                  double asymmetricBuySellProb)
This method allows the agent to operate following the market tendency.


setRuleMaster

public void setRuleMaster(RandomRuleMaster r)
This method sets the Rule Master.


act0

public void act0()
This method is called in the first phase of the day.

Overrides:
act0 in class BasicSumAgent

act1

public void act1()
This method is called during the simulated day. The agent acts in the market.

Overrides:
act1 in class BasicSumAgent