edu.cuny.cat.market.accepting
Class SlidingMatchedAverageBeatingAcceptingPolicy

java.lang.Object
  extended by edu.cuny.cat.market.AuctioneerPolicy
      extended by edu.cuny.cat.market.accepting.ShoutAcceptingPolicy
          extended by edu.cuny.cat.market.accepting.OnlyNewShoutDecidingAcceptingPolicy
              extended by edu.cuny.cat.market.accepting.QuoteBeatingAcceptingPolicy
                  extended by edu.cuny.cat.market.accepting.SlidingMatchedAverageBeatingAcceptingPolicy
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
Direct Known Subclasses:
SlidingAverageBeatingAcceptingPolicy

public class SlidingMatchedAverageBeatingAcceptingPolicy
extends QuoteBeatingAcceptingPolicy

A variant of EquilibriumBeatingAcceptingPolicy, which was used by PSUCAT in CAT 2007 competition. It uses a sliding average of transaction prices to estimate the equilibrium price and uses the standard deviation to set delta loosing the restriction.

Version:
$Revision: 1.3 $
Author:
Jinzhong Niu

Field Summary
protected static IllegalShoutException askException
           
protected static IllegalShoutException bidException
          Reusable exceptions for performance
protected  double expectedHighestAsk
           
protected  double expectedLowestBid
           
protected  edu.cuny.ai.learning.SlidingWindowLearner learner
           
static java.lang.String P_DEF_BASE
           
static java.lang.String P_LEARNER
           
static java.lang.String SLIDING_AVERAGE_TRANSACTION_PRICE
           
 
Fields inherited from class edu.cuny.cat.market.accepting.QuoteBeatingAcceptingPolicy
DISCLAIMER
 
Fields inherited from class edu.cuny.cat.market.AuctioneerPolicy
auctioneer
 
Constructor Summary
SlidingMatchedAverageBeatingAcceptingPolicy()
           
 
Method Summary
protected  void askNotAnImprovementException()
           
protected  void bidNotAnImprovementException()
           
 void check(Shout shout)
          implements the NYSE shout improvement rule.
 void eventOccurred(AuctionEvent event)
           
 void reset()
          resets the state to be the same as the policy is created and initialized.
 void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.cuny.cat.market.accepting.OnlyNewShoutDecidingAcceptingPolicy
check
 
Methods inherited from class edu.cuny.cat.market.AuctioneerPolicy
getAuctioneer, initialize, setAuctioneer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_LEARNER

public static final java.lang.String P_LEARNER
See Also:
Constant Field Values

P_DEF_BASE

public static final java.lang.String P_DEF_BASE
See Also:
Constant Field Values

SLIDING_AVERAGE_TRANSACTION_PRICE

public static final java.lang.String SLIDING_AVERAGE_TRANSACTION_PRICE
See Also:
Constant Field Values

bidException

protected static IllegalShoutException bidException
Reusable exceptions for performance


askException

protected static IllegalShoutException askException

expectedHighestAsk

protected double expectedHighestAsk

expectedLowestBid

protected double expectedLowestBid

learner

protected edu.cuny.ai.learning.SlidingWindowLearner learner
Constructor Detail

SlidingMatchedAverageBeatingAcceptingPolicy

public SlidingMatchedAverageBeatingAcceptingPolicy()
Method Detail

setup

public void setup(edu.cuny.config.param.ParameterDatabase parameters,
                  edu.cuny.config.param.Parameter base)
Specified by:
setup in interface edu.cuny.config.param.Parameterizable
Overrides:
setup in class AuctioneerPolicy

reset

public void reset()
Description copied from class: AuctioneerPolicy
resets the state to be the same as the policy is created and initialized.

Specified by:
reset in interface edu.cuny.obj.Resetable
Overrides:
reset in class AuctioneerPolicy

check

public void check(Shout shout)
           throws IllegalShoutException
Description copied from class: QuoteBeatingAcceptingPolicy
implements the NYSE shout improvement rule.

Overrides:
check in class QuoteBeatingAcceptingPolicy
Parameters:
shout - the shout being checked.
Throws:
IllegalShoutException

bidNotAnImprovementException

protected void bidNotAnImprovementException()
                                     throws IllegalShoutException
Throws:
IllegalShoutException

askNotAnImprovementException

protected void askNotAnImprovementException()
                                     throws IllegalShoutException
Throws:
IllegalShoutException

eventOccurred

public void eventOccurred(AuctionEvent event)
Specified by:
eventOccurred in interface AuctionEventListener
Overrides:
eventOccurred in class AuctioneerPolicy

toString

public java.lang.String toString()
Overrides:
toString in class AuctioneerPolicy