Title: Trading of Complex Commodities
1Trading of Complex Commodities
2Trading
3For Example
4Another Example
- Car Buyers Car Dealers
Manufacturers
5Central Marketplace
Marketplace
6Central Marketplace
Necessary?
Marketplace
7Central Marketplace
Necessary?
Bulletin board
8Central Marketplace
Necessary?
Bulletin board Middleman
9Central Marketplace
Necessary?
Bulletin board Middleman Auction
10Central Marketplace
Necessary?
Bulletin board Middleman Auction Exchange
11Examples of Exchanges
- Stock/Commodity exchanges
- Specialized exchanges (e.g. specialist systems)
12Example of an Order
Buy a red Mustang
13Example of an Order
Buy a red Mustang, less than 2 years old
14Example of an Order
Buy a red Mustang, less than 2 years old,
willing to pay 25,000
15Example of an Order
Buy a red Mustang, less than 2 years old,
willing to pay 25,000 OR Any color Corvette,
brand-new, willing to pay 30,000
16General Case
An order describes a set of items, such as the
Mustangs and Corvettes.
17General Case
An order describes a set of items, such as the
Mustangs and Corvettes. The buyer wants to get
one of these items.
18Graphical View of an Order
Space of all items
19Graphical View of an Order
Red Mustangs less than 2 years old
Space of all items
20Graphical View of an Order
All color Corvettes made this year
Red Mustangs less than 2 years old
Space of all items
21Price
Price is a function of an item.
30,000
Price
25,000
Corvettes
Mustangs
Space of all items
22Buy and Sell Orders
Price
Buy order
23Buy and Sell Orders
Price
Price
Buy order
Sell order
24Matching
Two orders match if they intersect
25Matching
Two orders match if they intersect
Price
Buy order
26Matching
Two orders match if they intersect
Sell order
Price
Buy order
27For Example
Buy Red Mustang, Made after 1998, For 25,000
or less OR Any color Corvette, Made in
2001, For 30,000 or less
28For Example
Buy Red Mustang, Made after 1998, For 25,000
or less OR Any color Corvette, Made in
2001, For 30,000 or less
Sell 2001 black Mustang, For 24,000 or
more OR 1996 red Mustang, For 18,000 or
more OR 2001 silver Corvette, For 28,000 or
more
29For Example
Buy Red Mustang, Made after 1998, For 25,000
or less OR Any color Corvette, Made in
2001, For 30,000 or less
Sell 2001 black Mustang, For 24,000 or
more OR 1996 red Mustang, For 18,000 or
more OR 2001 silver Corvette, For 28,000 or
more
Intersect
30For Example
Buy Red Mustang, Made after 1998, For 25,000
or less OR Any color Corvette, Made in
2001, For 30,000 or less
Sell 2001 black Mustang, For 24,000 or
more OR 1996 red Mustang, For 18,000 or
more OR 2001 silver Corvette, For 28,000 or
more
Fill 2001 silver Corvette, For 29,000
31Fill
A result of trading, that is, an item that
matches both orders.
32Fill
A result of trading, that is, an item that
matches both orders.
Sell order
Price
Buy order
33Formal Definition
- An order is
- an item set I
34Formal Definition
- An order is
- an item set I, and
- a function Price I R
35Formal Definition
- An order is
- an item set I, and
- a function Price I R
- A fill is
- an item
36Formal Definition
- An order is
- an item set I, and
- a function Price I R
- A fill is
- an item ,
and - a price p, such that
37Matcher Engine
- Limitations
- Specific items in sell orders
- Restrictions on buy item sets
- No price functions
38Specific Sell Orders
Good Sell a red Mustang made in 1999 Bad Sell
any color Mustang made before 1999
39Restrictions on Buy Item Sets
Good
Bad
Year
Year
Color
Color
40No Price Function
Good
Bad
Price
Price
41Matcher Architecture
Matcher
42Matcher Architecture
Orders
User interface
Matcher
Fills
Orders
User interface
Fills
Orders
User interface
Fills
43Matcher Architecture
Orders
User interface
Matcher
Fills
Index of sell orders
Orders
User interface
Fills
List of buy orders
Orders
User interface
Fills
44Trading Cycle
Process all incoming orders
Re-match all pending orders
Stop trading?
No
Yes
45Matching Process
- For each buy order, search the indexing
- structure for matching sell orders
- When finding matches, generate fills
46Fairness
- Prefer matches with better prices
- Give priority to better-price orders
- Give priority to earlier orders
47Extensions
- Order modification
- Disjunctive orders
- Confirmations
48Running Time
- Almost linear in the number of orders
- Almost linear in the length of order
- description
- Memory is the main bottleneck.
49Performance
- 400 MHz PC with 384 Mbytes memory,
- C implementation under Windows NT
- 100,000 pending orders
- 500 new orders per second
50Extended Architecture
User Interface
Orders
Matcher
Broker
Orders
Fills
Fills
Orders
User Interface
Fills
Broker
Orders
Orders
User Interface
Fills
Fills
51Extended Architecture
Distributed Matcher
User Interface
Orders
Matcher
Broker
Orders
Fills
Fills
Orders
User Interface
Fills
Broker
Orders
Orders
User Interface
Fills
Fills
52Broker Functions
- Pre-compile complex orders
- Handle price functions
- Handle complex item sets
- Shield the user from processing delays
- Support automated trading
53Advantages
- Fewer limitations on orders
- Extra features
- Distributed computation
54Coming Soon
- Broker algorithms
- Empirical performance study