The modern economy includes a variety of markets, and the Internet has opened opportunities for efficient on-line trading. Researchers have developed various auctions, which have become a popular means for on-line sales. They have also designed algorithms for exchange markets, which allow fast-paced trading of standardized goods; however, they have done little work on exchanges for complex nonstandard goods, such as used cars.
We have built an exchange system for complex goods, which allows traders to describe goods by multiple attributes. For example, a car buyer can specify a model, options, color, and other desirable features. Furthermore, traders can enter constraints on the acceptable purchases and sales. For instance, a buyer can specify a set of desirable cars and their features.
The system supports markets with up to
300,000 orders, and generates hundreds of trades per second.
We consider an exchange for trading new and used cars. To simplify this example, we assume that a trader can describe a car by three attributes: model, color, and year.
A prospective buyer can place a buy order, which includes a description of a desirable car and acceptable price; similarly, a car dealer can place a sell order.
An exchange system must generate transactions that satisfy both buyers and sellers.
Buy order
Red Mustang, made after 2000,
$32,000
Sell order
Any-color Mustang, made in 2003,
$30,000
Fill
Red Mustang, made in 2003,
$31,000
We define goods in a specific market by a list of attributes; as a simplified example, we describe cars by model, color, and year.
When a trader places an order, she has to specify some set I
1 of acceptable values for the first attribute, some set the Cartesian product I
1
I
2
I
2
...
for the second attribute, and so on. The resulting set of items is
For example, suppose that a buyer is looking for a red or white Mustang made after 2000; then,
I = {Mustang}
{Red, White}
[2001..2003].
Item set I
Color
Year
Green
Red
White
00
01
02
03
Model
Camaro Mustang Corvette
A trader should specify a limit on the acceptable price, which is a real-valued function defined on the set I ; for each item i , it gives a certain price limit Price ( i ).
For instance, a buyer may be willing to pay
$32,000 for a Mustang made in 2003, but subtract $2,000 for each year if the car is older.
$32K
Price limit:
$32K – (2003 – Year) · $2K
Price
$32K
$30K
$28K 00
01
02
03
Year
$30K
$28K
Item set:
{Mustang}
…
[2001..2003]
Model
Camaro Mustang Corvette
An order specification includes an item set I and price function Price . When a buy order matches a sell order, the corresponding parties can complete a trade. We define the resulting fill by a specific item i and its price p .
If ( I b
, Price b
) is a buy order, and ( I s
, Price s
) is a matching sell order, then the corresponding fill
( i , p ) must satisfy two conditions: i
I b
I s and Price s
( i )
p
Price b
( i ).
Sell order
I s
= {Mustang}
…
{2003}
Price s
= $30,000
Fill
i = (Mustang, …, 2003)
p = $31,000
Price
$32K
$30K
$28K 00
01
02
03
Year
Buy order
I s
= {Mustang}
…
[2001..2003]
Price s
= $32K – (2003 – Year) · $2K
Model
Camaro Mustang Corvette
The system consists of a central matcher and user interfaces that run on separate machines.
The traders enter their orders through interface machines, which send the orders to the matcher.
The matcher includes a central structure for indexing of orders with fully specified items. If an order includes a set of items, rather than a fully specified item, it is added to an unordered list of partially specified orders.
This scheme allows fast retrieval of fully specified orders that match a given order. On the other hand, the system does not identify matches between two partially specified orders.
User interface
User interface
User interface
The matcher alternates between processing new orders and identifying matches for old orders.
When it receives a new order, it immediately identifies matching fully specified orders. After processing all new orders, the matcher tries to fill old partially specified orders; for each old order, it finds matching fully specified orders.
Process every new order in the queue of incoming orders
For every partially specified order, identify fully specified matches
Identify the fully specified orders that match the new order yes yes
Is the new order completely filled?
no
Is it a fully specified order?
no
Add it to the indexing structure
Add it to the unordered list
The indexing structure is a tree, the height of which equals the number of attributes. A node at level i divides orders by the values of the i th attribute, and each node at level ( i + 1) corresponds to all orders with specific values of the first i attributes.
To find matches for a given order, the system identifies all children of the root that match the first attribute of the order’s item set, and then recursively processes the respective subtrees.
Model
Camaro Mustang
Red
Year
2002
Red Camaro made in 2002
Color
White
Color
White
Year
2002 2001
Year
2003
White Camaro made in 2002
White Mustang made in 2001
White Mustang made in 2003
We have experimented with an extended usedcar market and corporate-bond market. We have run the matcher on a 2-GHz Pentium computer with 1-GByte memory.
We have varied the number of old orders in the market from one to 300,000. We have also controlled the number of new orders in the beginning of the trading cycle; we have experimented with 300 and 10,000 new orders.
We have measured the trading-cycle time, throughput, and response time.
• The trading-cycle time is the time of one pass through the matcher’s trading cycle.
• The throughput is the maximal acceptable rate of placing new orders; if the matcher gets more orders per second, it has to reject some of them.
• The response time is the average time between placing an order and getting a fill.
We have experimented with a used-car market described by eight attributes: model, year, mileage, number of doors, transmission, option package, interior color, and exterior color. The system processes 500 to 5,000 new orders per second.
10 5
10 6
300 new orders
10 4
10 4 10,000 new orders
10 2
300 new orders
10 0
10 0 10 1 10 2 10 3 10 4 10 5 number of old orders
10 3 10,000 new orders
10 2
10 0 10 1 10 2 10 3 10 4 10 5 number of old orders
10 6
10 4 10,000 old orders
10 2
300 old orders
10 0
10 0 10 1 10 2 10 3 10 4 10 5 number of old orders
We have also applied the system to a corporatebond market described by two attributes: company and maturity date.
The system processes 2,000 to 20,000 new orders per second.
10 5
300 new orders
10 6
10 4
10,000 new orders
10 2
10 4
10 3
10,000 new orders
10 0
10 0
300 new orders
10 1 10 2 10 3 10 4 10 5 number of old orders
10 2
10 0 10 1 10 2 10 3 10 4 10 5 number of old orders
10 6
10 4
10,000 new orders
10 2
10 0
300 new orders
10 0 10 1 10 2 10 3 10 4 10 5 number of old orders