net.sourceforge.jasa.agent.strategy
Class GDLStrategy

java.lang.Object
  extended by AbstractStrategy
      extended by net.sourceforge.jasa.agent.strategy.AbstractTradingStrategy
          extended by net.sourceforge.jasa.agent.strategy.FixedQuantityStrategyImpl
              extended by net.sourceforge.jasa.agent.strategy.FixedDirectionStrategy
                  extended by net.sourceforge.jasa.agent.strategy.GDLStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, FixedQuantityStrategy, TradingStrategy, MarketEventListener

public class GDLStrategy
extends FixedDirectionStrategy
implements java.io.Serializable

A modified implementation of the Gjerstad Dickhaut strategy. Agents using this strategy calculate the probability of any bid being accepted and bid to maximize expected profit. See

"Price Formation in Double Auctions" S. Gjerstad, J. Dickhaut and R. Palmer

The strategy is modified in that instead of a cubic interpolation, a linear one is used.

Note that you must configure a report of type HistoricalDataReport in order to use this strategy.

Parameters

base .maxprice
double >= 0
(max price in market)

See Also:
HistoricalDataReport
 

Field Summary
protected  HistoricalDataReport historicalDataReport
           
protected  double max
           
static double MAX_PRICE
           
protected  double maxPoint
           
static java.lang.String P_DEF_BASE
           
static java.lang.String P_MAXPRICE
           
 
Fields inherited from class net.sourceforge.jasa.agent.strategy.AbstractTradingStrategy
auction, tradeDirectionPolicy
 
Constructor Summary
GDLStrategy()
           
 
Method Summary
 void auctionOpen(MarketOpenEvent event)
           
 void eventOccurred(MarketEvent event)
           
 TokenTradingAgent getAgent()
           
 HistoricalDataReport getHistoricalDataReport()
           
 boolean modifyShout(Order shout)
           
 void onRoundClosed(Market auction)
           
 java.lang.Object protoClone()
           
 void setHistoricalDataReport(HistoricalDataReport historicalDataReport)
           
 void subscribeToEvents(EventScheduler scheduler)
           
 
Methods inherited from class net.sourceforge.jasa.agent.strategy.FixedDirectionStrategy
isBuy, isSell, setBuy
 
Methods inherited from class net.sourceforge.jasa.agent.strategy.FixedQuantityStrategyImpl
determineQuantity, getQuantity, setQuantity
 
Methods inherited from class net.sourceforge.jasa.agent.strategy.AbstractTradingStrategy
clone, getTradeDirectionPolicy, initialise, isBuy, modifyOrder, reset, setAgent, setTradeDirectionPolicy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.jasa.agent.TradingStrategy
initialise, isBuy, modifyOrder, setAgent
 

Field Detail

maxPoint

protected double maxPoint

max

protected double max

historicalDataReport

protected HistoricalDataReport historicalDataReport

P_DEF_BASE

public static final java.lang.String P_DEF_BASE
See Also:
Constant Field Values

P_MAXPRICE

public static final java.lang.String P_MAXPRICE
See Also:
Constant Field Values

MAX_PRICE

public static double MAX_PRICE
Constructor Detail

GDLStrategy

public GDLStrategy()
Method Detail

protoClone

public java.lang.Object protoClone()
Overrides:
protoClone in class AbstractTradingStrategy

eventOccurred

public void eventOccurred(MarketEvent event)

subscribeToEvents

public void subscribeToEvents(EventScheduler scheduler)
Specified by:
subscribeToEvents in interface TradingStrategy

auctionOpen

public void auctionOpen(MarketOpenEvent event)

modifyShout

public boolean modifyShout(Order shout)
Overrides:
modifyShout in class FixedDirectionStrategy

getAgent

public TokenTradingAgent getAgent()
Overrides:
getAgent in class AbstractTradingStrategy

onRoundClosed

public void onRoundClosed(Market auction)

getHistoricalDataReport

public HistoricalDataReport getHistoricalDataReport()

setHistoricalDataReport

public void setHistoricalDataReport(HistoricalDataReport historicalDataReport)