edu.cuny.cat.trader.strategy
Class PriestVanTolStrategy

java.lang.Object
  extended by java.util.Observable
      extended by edu.cuny.cat.trader.strategy.AbstractStrategy
          extended by edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
              extended by edu.cuny.cat.trader.strategy.AdaptiveStrategyImpl
                  extended by edu.cuny.cat.trader.strategy.MomentumStrategy
                      extended by edu.cuny.cat.trader.strategy.PriestVanTolStrategy
All Implemented Interfaces:
AuctionEventListener, AdaptiveStrategy, FixedQuantityStrategy, Strategy, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Prototypeable, edu.cuny.obj.Resetable, java.io.Serializable, java.lang.Cloneable

public class PriestVanTolStrategy
extends MomentumStrategy
implements java.io.Serializable

An implementation of the Priest and van Tol strategy. Please note however that the performance of this implementation is significantly worse than what they claimed.

Parameters

base .history
(the parameter base for HistoricalReport used by this strategy)

Default Base

pvt_strategy

Version:
$Revision: 1.7 $
Author:
Steve Phelps
See Also:
HistoricalReport, Serialized Form

Field Summary
protected  HistoricalReport historicalReport
           
static java.lang.String P_DEF_BASE
           
static java.lang.String P_HISTORY
           
 
Fields inherited from class edu.cuny.cat.trader.strategy.MomentumStrategy
absolutePerterbationDistribution, currentPrice, initialMarginDistribution, lastShout, lastShoutAccepted, lastShoutPrice, learner, P_LEARNER, P_SCALING, relativePerterbationDistribution, scaling
 
Fields inherited from class edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
quantity
 
Fields inherited from class edu.cuny.cat.trader.strategy.AbstractStrategy
agent, currentShout, MIN_PRICE_DIFFERENCE
 
Constructor Summary
PriestVanTolStrategy()
           
PriestVanTolStrategy(AbstractTradingAgent agent)
           
 
Method Summary
protected  void adjustMargin()
          the implementation is slightly different from the one in jasa: here, when a trader is inactive, it never reduces its profit margin, not even letting its learner to learn; while in jasa, the trader's learner continues to learn, though the current price remains the same.
 void eventOccurred(AuctionEvent event)
           
 void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.cuny.cat.trader.strategy.MomentumStrategy
adjustMargin, calculatePrice, getCurrentPrice, getLastShout, getLearner, getScaling, initMargin, isLastShoutAccepted, modifyShout, perterb, processDayClosed, processLastShout, requiresAuctionHistory, setLearner, setMargin, setScaling, shoutPosted, targetMargin, transactionPosted
 
Methods inherited from class edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
determineQuantity, getQuantity, setQuantity
 
Methods inherited from class edu.cuny.cat.trader.strategy.AbstractStrategy
getAgent, initialize, modifyShout, protoClone, reset, setAgent
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cuny.cat.trader.strategy.Strategy
determineQuantity, modifyShout, setAgent
 
Methods inherited from interface edu.cuny.obj.Prototypeable
protoClone
 
Methods inherited from interface edu.cuny.obj.Resetable
reset
 

Field Detail

P_DEF_BASE

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

P_HISTORY

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

historicalReport

protected HistoricalReport historicalReport
Constructor Detail

PriestVanTolStrategy

public PriestVanTolStrategy()

PriestVanTolStrategy

public PriestVanTolStrategy(AbstractTradingAgent agent)
Method Detail

setup

public void setup(edu.cuny.config.param.ParameterDatabase parameters,
                  edu.cuny.config.param.Parameter base)
Specified by:
setup in interface edu.cuny.config.param.Parameterizable
Overrides:
setup in class MomentumStrategy

eventOccurred

public void eventOccurred(AuctionEvent event)
Specified by:
eventOccurred in interface AuctionEventListener
Overrides:
eventOccurred in class MomentumStrategy

adjustMargin

protected void adjustMargin()
the implementation is slightly different from the one in jasa: here, when a trader is inactive, it never reduces its profit margin, not even letting its learner to learn; while in jasa, the trader's learner continues to learn, though the current price remains the same. The additional learning of reduced margins in jasa would be reflected on the next trading day, however, when the trader becomes active again. This implementation is believed what Priest and van Tol meant to do, since the very aim is not to cause those inactive traders to reduce profit margins when the traders become active again.

Specified by:
adjustMargin in class MomentumStrategy

toString

public java.lang.String toString()
Overrides:
toString in class MomentumStrategy