net.sourceforge.jasa.agent.strategy
Class PureSimpleStrategy

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.PureSimpleStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, FixedQuantityStrategy, TradingStrategy, MarketEventListener

public class PureSimpleStrategy
extends FixedDirectionStrategy
implements java.io.Serializable

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)

 

Field Summary
protected  double margin
           
 
Fields inherited from class net.sourceforge.jasa.agent.strategy.AbstractTradingStrategy
auction, tradeDirectionPolicy
 
Constructor Summary
PureSimpleStrategy()
           
PureSimpleStrategy(AbstractTradingAgent agent, double margin, int quantity)
           
 
Method Summary
 boolean modifyShout(Order shout)
           
 void onRoundClosed(Market auction)
           
 java.lang.Object protoClone()
           
 void setMargin(double margin)
           
 
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, getAgent, 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, subscribeToEvents
 

Field Detail

margin

protected double margin
Constructor Detail

PureSimpleStrategy

public PureSimpleStrategy(AbstractTradingAgent agent,
                          double margin,
                          int quantity)

PureSimpleStrategy

public PureSimpleStrategy()
Method Detail

protoClone

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

modifyShout

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

onRoundClosed

public void onRoundClosed(Market auction)

setMargin

public void setMargin(double margin)