edu.cuny.cat.trader.strategy
Class PureSimpleStrategy

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.PureSimpleStrategy
All Implemented Interfaces:
AuctionEventListener, FixedQuantityStrategy, Strategy, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Prototypeable, edu.cuny.obj.Resetable, java.io.Serializable, java.lang.Cloneable

public class PureSimpleStrategy
extends FixedQuantityStrategyImpl
implements java.io.Serializable, edu.cuny.obj.Prototypeable

A trading strategy in which we bid a constant mark-up on the agent's private value.

Parameters
base.delta
double
(the markup over our private valuation to bid for)

Default Base

pure_simple_strategy

Version:
$Revision: 1.8 $
Author:
Steve Phelps
See Also:
Serialized Form

Field Summary
protected  double margin
           
static java.lang.String P_DEF_BASE
           
 
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
PureSimpleStrategy()
           
PureSimpleStrategy(AbstractTradingAgent agent, double margin, int quantity)
           
 
Method Summary
 boolean modifyShout(Shout.MutableShout shout)
          Modify the price and quantity of the given shout according to this strategy.
 java.lang.Object protoClone()
           
 void setMargin(double margin)
           
 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.FixedQuantityStrategyImpl
determineQuantity, getQuantity, setQuantity
 
Methods inherited from class edu.cuny.cat.trader.strategy.AbstractStrategy
eventOccurred, getAgent, initialize, modifyShout, requiresAuctionHistory, 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.obj.Resetable
reset
 
Methods inherited from interface edu.cuny.cat.trader.strategy.Strategy
modifyShout, requiresAuctionHistory, setAgent
 
Methods inherited from interface edu.cuny.cat.event.AuctionEventListener
eventOccurred
 

Field Detail

margin

protected double margin

P_DEF_BASE

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

PureSimpleStrategy

public PureSimpleStrategy()

PureSimpleStrategy

public PureSimpleStrategy(AbstractTradingAgent agent,
                          double margin,
                          int quantity)
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 FixedQuantityStrategyImpl

protoClone

public java.lang.Object protoClone()
Specified by:
protoClone in interface edu.cuny.obj.Prototypeable
Overrides:
protoClone in class AbstractStrategy

modifyShout

public boolean modifyShout(Shout.MutableShout shout)
Description copied from class: AbstractStrategy
Modify the price and quantity of the given shout according to this strategy.

Overrides:
modifyShout in class FixedQuantityStrategyImpl
Returns:
false if no shout is to be placed at this time

setMargin

public void setMargin(double margin)

toString

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