edu.cuny.cat.market.pricing
Class UniformPricingPolicy
java.lang.Object
  
edu.cuny.cat.market.AuctioneerPolicy
      
edu.cuny.cat.market.pricing.PricingPolicy
          
edu.cuny.cat.market.pricing.KPricingPolicy
              
edu.cuny.cat.market.pricing.UniformPricingPolicy
- All Implemented Interfaces: 
 - AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable, java.io.Serializable
 
public class UniformPricingPolicy
- extends KPricingPolicy
- implements java.io.Serializable
  
A pricing policy in which we set the transaction price in the interval
 between the ask quote and the bid quote as determined by the parameter k. The
 pricing policy is uniform in the sense that individual bid and ask prices are
 ignored, thus all agents performing transactions in the clearing operation
 will pay the same price.
 
 
 An exception is that if the transaction price determined in this way falls
 out of the price interval of the matching ask and bid, the nearest boundary
 of the interval will be used as the transaction price. This may happen when,
 for example, LazyMaxVolumeShoutEngine is
 used to match shouts.
 
- Version:
 
  - $Revision: 1.10 $
 
- Author:
 
  - Steve Phelps
 
- See Also:
 - Serialized Form
 
 
 
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
UniformPricingPolicy
public UniformPricingPolicy()
UniformPricingPolicy
public UniformPricingPolicy(double k)
price
protected double price(double quote,
                       Shout shout)
- adjusts the price of market quote based on the given shout when the market
 quote does not have a valid value. This is possible when certain quoting
 policies, say 
SingleSidedQuotingPolicy, are used and the market
 quote is an infinite value.
 
- Parameters:
 quote - shout - 
- Returns:
 - the value of quote if it is not NaN or an infinite value, or the
         price of the shout otherwise.
 
 
 
determineClearingPrice
public double determineClearingPrice(Shout bid,
                                     Shout ask,
                                     MarketQuote clearingQuote)
- Specified by:
 determineClearingPrice in class PricingPolicy