trading of complex commodities committee: eugene fink lawrence hall srinivas katkoori josh johnson
TRANSCRIPT
![Page 1: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/1.jpg)
Trading of Complex Commodities
Committee:Eugene FinkLawrence HallSrinivas Katkoori
Josh Johnson
![Page 2: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/2.jpg)
IntroductionMotivation• Build an automated exchange for trading goods and services
![Page 3: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/3.jpg)
IntroductionMotivation• Build an automated exchange for trading goods and services
• Combine the speed and liquidity of the stock exchange
![Page 4: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/4.jpg)
IntroductionMotivation• Build an automated exchange for trading goods and services
• Combine the speed and liquidity of the stock exchange with the flexibility of eBay
+
![Page 5: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/5.jpg)
Outline
• Main concepts
• Previous work
• Data structures
• Performance
![Page 6: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/6.jpg)
Concepts
• Market
• Orders
• Matches
• Fills
![Page 7: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/7.jpg)
Market
All items that can be traded form a market.
Example: All conceivable vehicles compose a car market.
![Page 8: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/8.jpg)
Orders
An order is a subset of the market along with a price function.
,-$1 for every ten miles.
Order example: Any Mustang or Corvette;Mustang for $38,000 or Corvette for $40,000.
![Page 9: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/9.jpg)
Buy and Sell Orders
Price
Buy order
Price
Sell order
![Page 10: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/10.jpg)
Matching
A buy order matches a sell order if:
item buy-region sell-region,buy-price(item) sell-price(item).
![Page 11: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/11.jpg)
Matching Orders
Price
Buy order
Sell order
![Page 12: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/12.jpg)
Fills
Buy order:Any Color Sports Car$36,000
Sell order:Silver Limo $50,000
or Red Mustang $32,000
Fill:Red Mustang
$34,000
![Page 13: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/13.jpg)
Implemented Exchange System
Specific sell orders
Good:Sell a red Mustangmade in 1999.
Bad:Sell any color Mustangmade before 1999.
![Page 14: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/14.jpg)
Outline
• Main concepts
• Previous work
• Data structures
• Performance
![Page 15: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/15.jpg)
Previous Work
• Auctions
• Exchanges
![Page 16: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/16.jpg)
Auctions
• Complex commodities
• Asymmetry between buyers and sellers
• Illiquid
Examples:eBay, FreeMarkets, eMediator
![Page 17: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/17.jpg)
Exchanges
• Simple commodities
• Symmetry between buyers and sellers
• Liquid
Examples:Stocks, Futures
![Page 18: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/18.jpg)
Outline
• Main concepts
• Previous work
• Data structures
• Performance
![Page 19: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/19.jpg)
Main Structures
• Tree of sell orders
• List of buy orders
![Page 20: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/20.jpg)
Tree of Sell Orders
Model
CorvetteMustang
![Page 21: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/21.jpg)
Tree of Sell Orders
Model
Color Color
CorvetteMustang
Red Black GreyRed White
![Page 22: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/22.jpg)
Tree of Sell Orders
Model
Year
Color Color
Year Year Year Year
CorvetteMustang
Red Black GreyRed
1996
White
Red Mustangmade in 1996
![Page 23: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/23.jpg)
Tree of Sell Orders
Model
Year
Color Color
Year Year
CorvetteMustang
Red Black
1996
White
Red Mustangmade in 1996
Color
Camry
Red
Year
Red Camrymade in 1992
1992
Year
Grey
Grey Corvettemade in 1998
1998
Year
Silver
Silver Camrymade in 2000
2000
![Page 24: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/24.jpg)
Node in the Tree
Each node contains a red-black treefor one attribute.
If there are k values for an attribute,search within the node takes O(lg k).
![Page 25: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/25.jpg)
Matching a Buy Order
Let S be the number of sell orders and m be the number of matches.
Best case: Time = O(m + lg S)
Worse case: Time = O(m lg S)
Worst case: Time = O(S)
![Page 26: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/26.jpg)
Trading Cycle
Process all new orders
Re-match all old orders
Stoptrading?
Yes
No
![Page 27: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/27.jpg)
Processing Steps
For every new order:If it is a buy order,
then search for matches;if not filled, add it to the list.
If it is a sell order,then insert it into the tree.
Process
Re-match
Stop?
![Page 28: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/28.jpg)
Processing Time
Let P be the number of old orders, N be the number of new orders, andm be the number of matches per order.
Best case: Time = O(N (m + lg P))
Worse case: Time = O(N m lg P))
Process
Re-match
Stop?
![Page 29: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/29.jpg)
Re-Matching Steps
For each buy order,search for matches among new sell orders.
Process
Re-match
Stop?
![Page 30: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/30.jpg)
Let P be the number of old orders, N be the number of new orders, andm be the number of matches per order.
Best case: Time = O(P (m + lg N))
Worse case: Time = O(P m lg N))
Re-Matching Time
Process
Re-match
Stop?
![Page 31: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/31.jpg)
Outline
• Main concepts
• Previous work
• Data structures
• Performance
![Page 32: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/32.jpg)
Performance
• 400 MHz CPU
• 1,024 Mbyte memory
• 100 MHz bus
Extensive empirical evaluation:
![Page 33: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/33.jpg)
Control Variables
• Number of old orders
• Number of new orders
• Length of item description
![Page 34: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/34.jpg)
Measurements
• Processing time
• Re-matching time
• Response time
• Throughput
![Page 35: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/35.jpg)
Processing Time
number of old orders
Logarithmic Scale
number of old orders
Linear Scale
256, 8,192, and 262,144 new orders
Process
Re-match
Stop?ti
me
(sec
)
1 10 100 1000 10000 100000
100
10
1
0.1
0.01
80
70
60
50
40
30
20
10
0 50K 100K 150K 200K 250K
![Page 36: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/36.jpg)
Re-Matching Time
256, 8,192, and 262,144 new orders
Logarithmic Scale Linear Scale
Process
Re-match
Stop?ti
me
(sec
)
1 10 100 1000 10000 100000
100
10
1
0.1
0.01 50K 100K 150K 200K 250K
80
70
60
50
40
30
20
10
0
number of old orders number of old orders
![Page 37: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/37.jpg)
Total Time
256, 8,192, and 262,144 new orders
Logarithmic Scale Linear Scale
Process
Re-match
Stop?ti
me
(sec
)
1 10 100 1000 10000 100000
100
10
1
0.1
0.01 50K 100K 150K 200K 250K
80
70
60
50
40
30
20
10
0
number of old orders number of old orders
![Page 38: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/38.jpg)
Response Time: Buy Orders
256, 8,192, and 262,144 new orders
Logarithmic Scale Linear Scale
tim
e (s
ec)
1 10 100 1000 10000 100000
100
10
1
0.1
0.01 50K 100K 150K 200K 250K
80
70
60
50
40
30
20
10
0
number of old orders number of old orders
![Page 39: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/39.jpg)
Response Time: Sell Orders
256, 8,192, and 262,144 new orders
Logarithmic Scale Linear Scale
tim
e (s
ec)
1 10 100 1000 10000 100000
100
10
1
0.1
0.01 50K 100K 150K 200K 250K
80
70
60
50
40
30
20
10
0
number of old orders number of old orders
![Page 40: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/40.jpg)
Throughput
Market with ten attributes:5,600 new orders per second.
![Page 41: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/41.jpg)
Throughput
Market with ten attributes:5,600 new orders per second.
number of attributes
orde
rs p
er s
econ
d
1 3 10 30 100
100000
10000
1000
100
10
![Page 42: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/42.jpg)
Main Results
• Formal model of complex markets
• Exchange system for limited order semantics
• Evaluation of its performance
![Page 43: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson](https://reader036.vdocuments.site/reader036/viewer/2022081602/5519cebc5503468b0c8b4712/html5/thumbnails/43.jpg)
Future Work
Short-term
• Reducing response time
• Improving data structures
Long-term
• Extend order semantics
• Search for optimal matches
• Use multiple CPUs