net.sourceforge.jasa.agent
Class FixedDirectionTradingAgent
java.lang.Object
AbstractAgent
net.sourceforge.jasa.agent.AbstractTradingAgent
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
-
-
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)
|
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 |
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)
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)