net.sourceforge.jasa.agent.strategy
Class MarkupStrategyDecorator
java.lang.Object
AbstractStrategy
net.sourceforge.jasa.agent.strategy.AbstractTradingStrategy
net.sourceforge.jasa.agent.strategy.FixedQuantityStrategyImpl
net.sourceforge.jasa.agent.strategy.FixedDirectionStrategy
net.sourceforge.jasa.agent.strategy.MarkupStrategyDecorator
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, FixedQuantityStrategy, TradingStrategy, MarketEventListener
public class MarkupStrategyDecorator
- extends FixedDirectionStrategy
- implements java.io.Serializable
This strategy decorates a component strategy by bidding a fixed proportional
markup over the price specified by the underlying component strategy.
-
-
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
subStrategy
protected TradingStrategy subStrategy
- The component strategy to decorate.
markup
protected double markup
- The proportional markup on the sub strategy.
P_SUBSTRATEGY
public static final java.lang.String P_SUBSTRATEGY
- See Also:
- Constant Field Values
P_MARKUP
public static final java.lang.String P_MARKUP
- See Also:
- Constant Field Values
MarkupStrategyDecorator
public MarkupStrategyDecorator()
modifyShout
public boolean modifyShout(Order shout)
- Overrides:
modifyShout
in class FixedDirectionStrategy
onRoundClosed
public void onRoundClosed(Market auction)
subscribeToEvents
public void subscribeToEvents(EventScheduler scheduler)
- Specified by:
subscribeToEvents
in interface TradingStrategy
eventOccurred
public void eventOccurred(MarketEvent event)
setAgent
public void setAgent(AbstractTradingAgent agent)
- Specified by:
setAgent
in interface TradingStrategy
- Overrides:
setAgent
in class AbstractTradingStrategy
protoClone
public java.lang.Object protoClone()
- Overrides:
protoClone
in class AbstractTradingStrategy