edu.cuny.cat.market.matching
Class SplineThetaShoutEngine
java.lang.Object
edu.cuny.cat.market.AuctioneerPolicy
edu.cuny.cat.market.matching.ShoutEngine
edu.cuny.cat.market.matching.LazyMaxVolumeShoutEngine
edu.cuny.cat.market.matching.ThetaShoutEngine
edu.cuny.cat.market.matching.SplineThetaShoutEngine
- All Implemented Interfaces:
- AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
- Direct Known Subclasses:
- SplineThetaShoutEngineWithNumberedParam, SplineThetaShoutEngineWithStringParam
public class SplineThetaShoutEngine
- extends ThetaShoutEngine
An adaptive version of ThetaShoutEngine
in which theta
changes according to an interpolated cubic spline. This aims to allow the
shout engine to adjust the level of matching dynamically within a trading
day.
This class is not based on configuration from parameter files but from
setters. To that end, some subclasses of this class should be used.
- Version:
- $Revision: 1.4 $
- Author:
- Jinzhong Niu
Field Summary |
protected org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction |
spline
cubic spline function generated based on thetas . |
protected double[] |
thetas
thetas to generated spline interpolation. |
Methods inherited from class edu.cuny.cat.market.matching.ThetaShoutEngine |
calculateEquilibriumQuantity, calculateMatchingQuantity, calculateUnorderlyQuantity, getDemandAboveLowestAsk, getOrderly, getTheta, matchShouts, setOrderly, setTheta, setup, validateTheta |
Methods inherited from class edu.cuny.cat.market.matching.LazyMaxVolumeShoutEngine |
ascendingAskIterator, askIterator, bidIterator, descendingBidIterator, distributeShouts, distributeShoutsFromHead, distributeShoutsFromTail, getHighestMatchedAsk, getHighestUnmatchedBid, getLowestMatchedBid, getLowestUnmatchedAsk, getMatchedAsks, getMatchedBids, getMatchedVolume, getNumOfMatchedAsks, getNumOfMatchedBids, getNumOfUnmatchedAsks, getNumOfUnmatchedBids, getUnmatchedAsks, getUnmatchedBids, getUnmatchedDemand, getUnmatchedSupply, matchedAskIterator, matchedBidIterator, newShout, prettyPrint, printState, randomizeMatches, removeShout, reset, updateMatchedShouts |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
thetas
protected double[] thetas
- thetas to generated spline interpolation.
spline
protected org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction spline
- cubic spline function generated based on
thetas
.
SplineThetaShoutEngine
public SplineThetaShoutEngine()
setThetas
public void setThetas(double[] thetas)
- Parameters:
thetas
-
setupSpline
protected void setupSpline(int dayLen)
- initialize the spline interpolation function with the given number of
rounds within a day.
- Parameters:
dayLen
- number of rounds per day
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 ThetaShoutEngine