net.sourceforge.jasa.agent.strategy
Class KaplanStrategy
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.KaplanStrategy
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, FixedQuantityStrategy, TradingStrategy, MarketEventListener
public class KaplanStrategy
- extends FixedDirectionStrategy
- implements java.io.Serializable
An implementation of Todd Kaplan's sniping strategy. Agents using this
strategy wait until the last minute before attempting to "steal the bid". See
"Behaviour of trading automata in a computerized double market market" J.
Rust, J. Miller and R. Palmer in "The Double Auction Market: Institutions,
Theories and Evidence" 1992, Addison-Wesley
Note that you must configure a report of type DailyStatsMarketDataLogger in
order to use this strategy.
Parameters
base.s
double >= 0 |
(the spread factor) |
base.t
double >= 0 |
(the time factor) |
- See Also:
DailyStatsReport
-
-
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
t
protected int t
- The time factor. Kaplan will bid if the remaining time in the current
period is less than t.
s
protected double s
- The spread factor.
quote
protected MarketQuote quote
dailyStatsReport
protected DailyStatsReport dailyStatsReport
P_DEF_BASE
public static final java.lang.String P_DEF_BASE
- See Also:
- Constant Field Values
P_T
public static final java.lang.String P_T
- See Also:
- Constant Field Values
P_S
public static final java.lang.String P_S
- See Also:
- Constant Field Values
KaplanStrategy
public KaplanStrategy()
protoClone
public java.lang.Object protoClone()
- Overrides:
protoClone
in class AbstractTradingStrategy
subscribeToEvents
public void subscribeToEvents(EventScheduler scheduler)
- Specified by:
subscribeToEvents
in interface TradingStrategy
eventOccurred
public void eventOccurred(SimEvent event)
onMarketOpen
public void onMarketOpen(MarketOpenEvent event)
modifyShout
public boolean modifyShout(Order shout)
- Overrides:
modifyShout
in class FixedDirectionStrategy
onRoundClosed
public void onRoundClosed(Market auction)
juicyOffer
public boolean juicyOffer()
smallSpread
public boolean smallSpread()
timeRunningOut
public boolean timeRunningOut()
getS
public double getS()
setS
public void setS(double s)
getT
public double getT()
setT
public void setT(int t)
toString
public java.lang.String toString()
error
protected void error(DataUnavailableException e)
getDailyStatsReport
public DailyStatsReport getDailyStatsReport()
setDailyStatsReport
public void setDailyStatsReport(DailyStatsReport dailyStatsReport)