Trading of Complex Commodities

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

description

Trading of Complex Commodities. Josh Johnson. Committee: Eugene Fink Lawrence Hall Srinivas Katkoori. Introduction. Motivation Build an automated exchange for trading goods and services. Introduction. Motivation Build an automated exchange for trading - PowerPoint PPT Presentation

Transcript of Trading of Complex Commodities

Trading of Complex Commodities

Committee:Eugene FinkLawrence HallSrinivas Katkoori

Josh Johnson

IntroductionMotivation• Build an automated exchange for trading goods and services

IntroductionMotivation• Build an automated exchange for trading goods and services

• Combine the speed and liquidity of the stock exchange

IntroductionMotivation• Build an automated exchange for trading goods and services

• Combine the speed and liquidity of the stock exchange with the flexibility of eBay

+

Outline

• Main concepts

• Previous work

• Data structures

• Performance

Concepts

• Market

• Orders

• Matches

• Fills

Market

All items that can be traded form a market.

Example: All conceivable vehicles compose a car market.

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.

Buy and Sell Orders

Price

Buy order

Price

Sell order

Matching

A buy order matches a sell order if:

item buy-region sell-region,buy-price(item) sell-price(item).

Matching Orders

Price

Buy order

Sell order

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

Implemented Exchange System

Specific sell orders

Good:Sell a red Mustangmade in 1999.

Bad:Sell any color Mustangmade before 1999.

Outline

• Main concepts

• Previous work

• Data structures

• Performance

Previous Work

• Auctions

• Exchanges

Auctions

• Complex commodities

• Asymmetry between buyers and sellers

• Illiquid

Examples:eBay, FreeMarkets, eMediator

Exchanges

• Simple commodities

• Symmetry between buyers and sellers

• Liquid

Examples:Stocks, Futures

Outline

• Main concepts

• Previous work

• Data structures

• Performance

Main Structures

• Tree of sell orders

• List of buy orders

Tree of Sell Orders

Model

CorvetteMustang

Tree of Sell Orders

Model

Color Color

CorvetteMustang

Red Black GreyRed White

Tree of Sell Orders

Model

Year

Color Color

Year Year Year Year

CorvetteMustang

Red Black GreyRed

1996

White

Red Mustangmade in 1996

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

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).

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)

Trading Cycle

Process all new orders

Re-match all old orders

Stoptrading?

Yes

No

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?

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?

Re-Matching Steps

For each buy order,search for matches among new sell orders.

Process

Re-match

Stop?

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?

Outline

• Main concepts

• Previous work

• Data structures

• Performance

Performance

• 400 MHz CPU

• 1,024 Mbyte memory

• 100 MHz bus

Extensive empirical evaluation:

Control Variables

• Number of old orders

• Number of new orders

• Length of item description

Measurements

• Processing time

• Re-matching time

• Response time

• Throughput

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

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

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

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

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

Throughput

Market with ten attributes:5,600 new orders per second.

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

Main Results

• Formal model of complex markets

• Exchange system for limited order semantics

• Evaluation of its performance

Future Work

Short-term

• Reducing response time

• Improving data structures

Long-term

• Extend order semantics

• Search for optimal matches

• Use multiple CPUs