uk.ac.liv.auction.agent
Class MomentumStrategy
java.lang.Object
uk.ac.liv.auction.agent.AbstractStrategy
uk.ac.liv.auction.agent.FixedQuantityStrategyImpl
uk.ac.liv.auction.agent.AdaptiveStrategyImpl
uk.ac.liv.auction.agent.MomentumStrategy
- All Implemented Interfaces:
- AdaptiveStrategy, AuctionEventListener, java.lang.Cloneable, FixedQuantityStrategy, Parameterizable, Prototypeable, Resetable, java.io.Serializable, Strategy
- Direct Known Subclasses:
- PriestVanTolStrategy, SimpleMomentumStrategy, ZIPStrategy
- public abstract class MomentumStrategy
- extends AdaptiveStrategyImpl
- implements java.io.Serializable
- Version:
- $Revision: 1.13 $
- Author:
- Steve Phelps
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
learner
protected MimicryLearner learner
currentPrice
protected double currentPrice
lastShout
protected Shout lastShout
scaling
protected double scaling
- A parameter used to scale the randomly drawn price adjustment
perturbation values.
lastShoutAccepted
protected boolean lastShoutAccepted
trPrice
protected double trPrice
trBidPrice
protected double trBidPrice
trAskPrice
protected double trAskPrice
initialMarginDistribution
protected cern.jet.random.AbstractContinousDistribution initialMarginDistribution
perterbationDistribution
protected cern.jet.random.AbstractContinousDistribution perterbationDistribution
P_SCALING
public static final java.lang.String P_SCALING
- See Also:
- Constant Field Values
P_LEARNER
public static final java.lang.String P_LEARNER
- See Also:
- Constant Field Values
MomentumStrategy
public MomentumStrategy(AbstractTradingAgent agent)
MomentumStrategy
public MomentumStrategy()
setup
public void setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
- Description copied from interface:
Parameterizable
- Initialise this object from a parameter database.
- Specified by:
setup in interface Parameterizable- Overrides:
setup in class FixedQuantityStrategyImpl
initialise
public void initialise()
- Overrides:
initialise 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
eventOccurred
public void eventOccurred(AuctionEvent event)
- Specified by:
eventOccurred in interface AuctionEventListener- Overrides:
eventOccurred in class AbstractStrategy
agentPolled
protected void agentPolled(AgentPolledEvent event)
shoutPlaced
protected void shoutPlaced(ShoutPlacedEvent event)
transactionExecuted
protected void transactionExecuted(TransactionExecutedEvent event)
endOfRound
public void endOfRound(Auction auction)
- Overrides:
endOfRound in class AdaptiveStrategyImpl
setLearner
public void setLearner(Learner learner)
- Specified by:
setLearner in interface AdaptiveStrategy
getLearner
public Learner getLearner()
- Specified by:
getLearner in interface AdaptiveStrategy
setMargin
public void setMargin(double margin)
getCurrentPrice
public double getCurrentPrice()
getLastShout
public Shout getLastShout()
isLastShoutAccepted
public boolean isLastShoutAccepted()
getScaling
public double getScaling()
getTrAskPrice
public double getTrAskPrice()
getTrBidPrice
public double getTrBidPrice()
getTrPrice
public double getTrPrice()
calculatePrice
protected double calculatePrice(double margin)
targetMargin
protected double targetMargin(double targetPrice)
adjustMargin
protected void adjustMargin(double targetMargin)
perterb
protected double perterb(double price)
adjustMargin
protected abstract void adjustMargin()