setPrng(RandomEngine prng)
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
learner
protected MimicryLearner learner
currentPrice
protected double currentPrice
lastShout
protected Order 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 AbstractContinousDistribution initialMarginDistribution
relativePerterbationDistribution
protected AbstractContinousDistribution relativePerterbationDistribution
absolutePerterbationDistribution
protected AbstractContinousDistribution absolutePerterbationDistribution
prng
protected RandomEngine prng
MomentumStrategy
public MomentumStrategy(AbstractTradingAgent agent,
RandomEngine prng)
MomentumStrategy
public MomentumStrategy()
initialise
public void initialise()
- Specified by:
initialise in interface TradingStrategy - Overrides:
initialise in class AbstractTradingStrategy
modifyShout
public boolean modifyShout(Order shout)
- Overrides:
modifyShout in class FixedDirectionStrategy
subscribeToEvents
public void subscribeToEvents(EventScheduler scheduler)
- Specified by:
subscribeToEvents in interface TradingStrategy
eventOccurred
public void eventOccurred(SimEvent event)
onMarketOpen
public void onMarketOpen(MarketOpenEvent event)
onAgentPolled
protected void onAgentPolled(AgentPolledEvent event)
onOrderPlaced
protected void onOrderPlaced(OrderPlacedEvent event)
onTransactionExecuted
protected void onTransactionExecuted(TransactionExecutedEvent event)
onRoundClosed
public void onRoundClosed(Market auction)
setLearner
public void setLearner(Learner learner)
getLearner
public Learner getLearner()
setMargin
public void setMargin(double margin)
getCurrentPrice
public double getCurrentPrice()
getLastShout
public Order getLastShout()
isLastShoutAccepted
public boolean isLastShoutAccepted()
setScaling
public void setScaling(double scaling)
getScaling
public double getScaling()
getTrAskPrice
public double getTrAskPrice()
getTrBidPrice
public double getTrBidPrice()
getTrPrice
public double getTrPrice()
getPrng
public RandomEngine getPrng()
setPrng
setLearner
public void setLearner(MimicryLearner learner)
getInitialMarginDistribution
public AbstractContinousDistribution getInitialMarginDistribution()
setInitialMarginDistribution
public void setInitialMarginDistribution(AbstractContinousDistribution initialMarginDistribution)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Throws:
java.lang.Exception
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()
|