net.sourceforge.jasa.agent
Class FixedDirectionTradingAgent

java.lang.Object
  extended by AbstractAgent
      extended by net.sourceforge.jasa.agent.AbstractTradingAgent
          extended by net.sourceforge.jasa.agent.FixedDirectionTradingAgent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, TradingAgent, MarketEventListener
Direct Known Subclasses:
TokenTradingAgent

public class FixedDirectionTradingAgent
extends AbstractTradingAgent

 

Field Summary
 
Fields inherited from class net.sourceforge.jasa.agent.AbstractTradingAgent
account, currentOrder, group, initialFunds, initialStock, lastOrderFilled, lastPayoff, markets, stock, totalPayoff, utilityFunction, valuer
 
Constructor Summary
FixedDirectionTradingAgent(double privateValue, EventScheduler scheduler)
           
FixedDirectionTradingAgent(EventScheduler scheduler)
           
FixedDirectionTradingAgent(int stock, double funds, double privateValue, EventScheduler scheduler)
           
FixedDirectionTradingAgent(int stock, double funds, double privateValue, TradingStrategy strategy, EventScheduler scheduler)
           
FixedDirectionTradingAgent(int stock, double funds, EventScheduler scheduler)
           
 
Method Summary
 boolean active()
          Determine whether or not this trader is active.
 FixedDirectionStrategy getStrategy()
           
 boolean isBuyer()
           
 boolean isSeller()
           
 void setIsBuyer(boolean isBuyer)
           
 void setIsSeller(boolean isSeller)
           
 void setStrategy(FixedDirectionStrategy strategy)
           
 
Methods inherited from class net.sourceforge.jasa.agent.AbstractTradingAgent
calculatePayoff, calculateProfit, clone, determineQuantity, equilibriumProfits, equilibriumProfitsEachDay, eventOccurred, getAccount, getCommodityHolding, getCurrentOrder, getFunds, getGroup, getLastPayoff, getMarket, getMarkets, getPayoff, getStock, getTotalPayoff, getTradingStrategy, getUtilityFunction, getValuation, getValuationPolicy, getVolume, giveFunds, initialise, isBuyer, isInteracted, isSeller, lastOrderFilled, onAgentArrival, onAgentArrival, onEndOfDay, onMarketClosed, onMarketOpen, orderFilled, pay, protoClone, register, reset, setGroup, setMarket, setMarkets, setPrivateValue, setUtilityFunction, setValuationPolicy, subscribeToEvents
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedDirectionTradingAgent

public FixedDirectionTradingAgent(EventScheduler scheduler)

FixedDirectionTradingAgent

public FixedDirectionTradingAgent(int stock,
                                  double funds,
                                  double privateValue,
                                  EventScheduler scheduler)

FixedDirectionTradingAgent

public FixedDirectionTradingAgent(int stock,
                                  double funds,
                                  double privateValue,
                                  TradingStrategy strategy,
                                  EventScheduler scheduler)

FixedDirectionTradingAgent

public FixedDirectionTradingAgent(int stock,
                                  double funds,
                                  EventScheduler scheduler)

FixedDirectionTradingAgent

public FixedDirectionTradingAgent(double privateValue,
                                  EventScheduler scheduler)
Method Detail

active

public boolean active()
Description copied from class: AbstractTradingAgent
Determine whether or not this trader is active. Inactive traders do not place shouts in the market, but do carry on learning through their strategy.

Specified by:
active in class AbstractTradingAgent
Returns:
true if the trader is active.

getStrategy

public FixedDirectionStrategy getStrategy()

setStrategy

public void setStrategy(FixedDirectionStrategy strategy)

setIsBuyer

public void setIsBuyer(boolean isBuyer)

isBuyer

public boolean isBuyer()

isSeller

public boolean isSeller()

setIsSeller

public void setIsSeller(boolean isSeller)