and q
max
. For now, it is assumed that entry/exit times
and quantities are uniformly distributed among bid-
ders, and there is an even number of buy and sell bids
(i.e., # buy = # sell = n/2).
Figure 1 shows the individual results for each al-
gorithm (except Algorithm 1). Each algorithm was
tested using varying numbers of bids up to a maxi-
mum of n = 10, 000, with q
max
= 1000. The online
algorithms are shown for a six-hour time period (i.e.,
t = 21, 600 seconds). This is consistent with the trad-
ing hours of the ASX and most share markets.
In general, all algorithms run in a time proportional
to n. Furthermore, the larger the value of n, the bet-
ter the performance. Additionally, online algorithms
tended to perform better with smaller values of t. The
size of q
max
does not significantly affect the running
time or the performance of the algorithms.
For each algorithm, trendlines are calculated using
the method of least squares. The resulting equations
for each algorithm are listed in Table 1. The smaller
the value of the coefficient of ln(n) for the BMR,
QMR and FMR, the better the performance. Com-
petitive analysis is used to compare the performance
of the online algorithms to the optimal offline algo-
rithm. The BMR is used to determine an algorithm’s
competitive ratio.
Algorithm 2 is the optimal offline strategy for
matching divisible bids. Only a small percentage of
bids were partially matched. This algorithm is the
benchmark to which all online algorithms are com-
pared. This algorithm is 1 − competitive.
Algorithm 3 is online, and orders bids strictly ac-
cording to entry time (the approach used by SEATS).
This algorithm performs significantly worse than
the offline algorithm. This algorithm is 2.44 −
competitive.
Algorithm 4 waits until a bid is about to expire be-
fore matching it. This strategy is a significant im-
provement on Algorithm 3. The reason for this is that
by waiting, the algorithm is essentially acting simi-
lar to the offline algorithm. Although this algorithm
doesn’t have perfect knowledge about future bids, de-
laying matching allows the algorithm to gather more
information, which it can use to optimise its match-
ing decision. However, Algorithm 4’s FMR does not
fare much better than Algorithm 3. This algorithm is
1.18 − competitive.
Algorithm 5 uses an inventory of quantity to sub-
sidise deficit quantity trades. Two tests were con-
ducted with differing values of θ. The first test (re-
ferred to as Algorithm 5a), examined the effect of
minimal subsidisation. The second test (referred to
as Algorithm 5b), used excessive subsidisation. Both
tests were also assessed on the amount of inventory
remaining at the end (i.e., the RIR, see Section 3.4).
Algorithm 5a uses minimal subsidisation where
θ = 1000. This algorithm improved upon Algo-
rithm 3 (i.e., SEATS) with regard to its BMR and
QMR. This algorithm achieved a better FMR than
both previous online algorithms. This algorithm is
1.88 − competitive.
Algorithm 5b uses excessive subsidisation where
θ = 5000 (5 × q
max
). This algorithm’s perfor-
mance approaches Algorithm 2 in terms of BMR and
QMR. It also attains an excellent FMR. This algo-
rithm is 1 − competitive. If subsidisation were with-
out bound, eventually all bids would be matched.
The amount of remaining inventory (i.e., RIR) for
Algorithm 5a and 5b were 50.61% and 50.13% re-
spectively. This shows that over time, the clearing
algorithm will always be holding an inventory that
is half full (i.e., θ/2). While excessive subsidisa-
tion may achieve significant results, the practicality
of subsidising must be weighed against the level of
risk the Auctioneer is willing to take.
Algorithm 6 prioritises bids with smaller amounts
of quantity. This algorithm out performs Algorithm
3 (SEATS) in terms of its BMR, and improves on us-
ing minimal subsidisation. The QMR and FMR are
marginal improvements on Algorithm 3. This algo-
rithm is 1.79 − competitive. This result is consistent
with the goals of the algorithm. That is, we strived for
an increase in the BMR by matching a larger number
of smaller bids. In doing so, the amount of matched
quantity would be roughly the same.
5 CONCLUSIONS
A market clearing algorithm’s performance greatly
affects the revenue earned by the Auctioneer, and the
welfare of the bidders. Previous literature on market
clearing only addresses price issues, and neglects con-
cerns regarding allocative efficiency.
This paper presents several market clearing algo-
rithms that focus solely on allocating quantity among
matching buy and sell bids. The algorithms attempt
to avoid situations resulting in unmarketable quanti-
ties (i.e., quantities too small to sell).
We show that it is difficult to avoid partial match-
ings, as the complexity of doing so is NP-complete.
The problem of matching bids with indivisible quan-
tities reduces to the subset sum problem. The sub-
set sum problem is a renowned NP-complete prob-
lem. As a result, an efficient algorithm cannot be con-
structed to avoid partial matchings.
An optimal offline algorithm is presented for
matching bids with divisible quantities. The algo-
rithm employs a greedy strategy. Each bid is matched
with as many other bids as required to satisfy it. This
approach achieves a high match rate. However, the
algorithm can result in a limited number of bidders
receiving partial matchings.
ICE-B 2006 - INTERNATIONAL CONFERENCE ON E-BUSINESS
132