+ All Categories
Home > Documents > Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

Date post: 31-Mar-2015
Category:
Upload: sofia-kearney
View: 213 times
Download: 0 times
Share this document with a friend
Popular Tags:
43
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.

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.

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.

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.

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.

Outline

• Main concepts

• Previous work

• Data structures

• Performance

Page 6: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

Concepts

• Market

• Orders

• Matches

• Fills

Page 7: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

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.

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.

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.

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.

Matching Orders

Price

Buy order

Sell order

Page 12: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

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.

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.

Outline

• Main concepts

• Previous work

• Data structures

• Performance

Page 15: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

Previous Work

• Auctions

• Exchanges

Page 16: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

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.

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.

Outline

• Main concepts

• Previous work

• Data structures

• Performance

Page 19: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

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.

Tree of Sell Orders

Model

CorvetteMustang

Page 21: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Outline

• Main concepts

• Previous work

• Data structures

• Performance

Page 32: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

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.

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.

Measurements

• Processing time

• Re-matching time

• Response time

• Throughput

Page 35: Trading of Complex Commodities Committee: Eugene Fink Lawrence Hall Srinivas Katkoori Josh Johnson.

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.

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.

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.

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.

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.

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.

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.

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.

Future Work

Short-term

• Reducing response time

• Improving data structures

Long-term

• Extend order semantics

• Search for optimal matches

• Use multiple CPUs


Recommended