Dati di alta frequenza
description
Transcript of Dati di alta frequenza
Dati di alta frequenza
Dati acquistati e disponibili:
• “Rebuild Order Book” del London Stock Exchange per l’anno 2002 (22 G)• “Best Bid/Best Ask” e “Trades” della Borsa di Milano per l’anno 2002 (4.7 G)
Dati in possesso di alcuni gruppi (da condividere) :
• “Trades and Quotes” del New York Stock Exchange per gli anni 1995/2001 (originariamenta acquistati da INFM ), 2000/2002 (originariamenta acquistati da Dip. Statistica “G. Parenti”, Firenze )
Dati disponibili in futuro:• “Trades and Quotes” del New York Stock Exchange per l’anno 2003• “Open Book” del New York Stock Exchange per gennaio/febbraio/marzo 2002• “Intraday Historical Data” di Euronext (Parigi, Amsterdam, Brussels) per l’anno 2002 (consegna Luglio 2004)• “Order Book” della Borsa di Francoforte per l’anno 2002
Order Book LSEColumnName FORMAT
Order Code CHAR(10)
MarketSegmentCode CHAR(4)
MarketSectorCode CHAR(4)
TICode CHAR(12)
CountryOfRegister CHAR(2)
CurrencyCode CHAR(3)
ParticipantCode CHAR(11)
BuySellInd CHAR(1)
MarketMechanismGroup CHAR(1)
MarketMechanismType CHAR(2)
Price DECIMAL(18,8)
AggregateSize DECIMAL(12)
SingleFillInd CHAR(1)
BroadcastUpdateAction CHAR(1)
DateOfPreparationDATE(YYYY-MM-DD)
TimeOfPreparation TIME(HH:MI:SS)
MessageSequenceNumber INTEGER(10)
ColumnName FORMAT
Order Code CHAR(10)
OrderActionType CHAR(1)
MatchingOrder Code CHAR(10)
TradeDateDATE(YYYY-MM-DD)
TradeTime TIME(HH:MI:SS)
TradeSize DECIMAL(8)
TradeCode CHAR(10)
TICode CHAR(12)
CurrencyCode CHAR(3)
CountryOfRegister CHAR(2)
MarketSegmentCode CHAR(4)
AggregateSize DECIMAL(12)
BuySellInd CHAR(1)
MarketMechanismType CHAR(2)
MessageSequenceNumber INTEGER(10)
ReceivedDateDATE(YYYY-MM-DD)
ReceivedTime TIME(HH:MI:SS)
ColumnName FORMAT
MessageSequenceNumber INTEGER(10)
TICode CHAR(12)
MarketSegmentCode CHAR(4)
CountryOfRegister CHAR(2)
CurrencyCode CHAR(3)
TradeCode CHAR(10)
TradePrice DECIMAL(18,8)
TradeSize DECIMAL(12)
TradeDateDATE(YYYY-MM-DD)
TradeTime TIME(HH:MI:SS)
BroadcastUpdateAction CHAR(1)
TradeTypeInd CHAR(2)
TradeTimeInd CHAR(1)
BargainConditions CHAR(1)
ConvertedPriceInd CHAR(1)
PublicationDateDATE(YYYY-MM-DD)
PublicationTime TIME(HH:MI:SS)
The ROB has 3 type of files:t_OrderDetail.csv, t_OrderHistory.csv, t_TradeReports.csv.Each file is produced in a comma separated format. The above tables describe the number of fields and the format of each field.
Esempio di Order Details
Order Code
MarketSegmentCode
MarketSectorCo
de TICode
CountryOfRegis
ter
CurrencyCode
Participa
ntCode
BuySellInd
MarketMechanismGrou
p
MarketMechanismTyp
e Price
AggregateSi
ze
SingleFillIn
d
BroadcastUpdateAction
DateOfPreparation
TimeOfPreparation
MessageSequenceNu
mber
800YT3LQ02 SET2 FE25 GB0008123571 GB GBX 0 B O LO 65.5 9900 N A 2002-06-26 09:29:53 72847
D02267G202 SET1 FS10 GB0000044551 GB GBX 0 B O LO 727.5 2900 N A 2002-06-26 08:26:11 18533
701XH1PP02 SET1 FT10 GB0008034141 GB GBX 0 B O LO 464 15000 N A 2002-06-26 08:55:29 43369
E01YIQFL02 SET1 FS10 GB0001540045 GB GBX 0 S O LO 473 1728 N A 2002-06-26 11:58:26 184659
B01UYLGW02 SET1 FS10 GB0031435265 GB GBX 0 B O LO 1035 250 N A 2002-06-27 11:58:19 140456
E01YJLGC02 SET1 FT10 GB0008034141 GB GBX 0 B O LO 471 1000 N A 2002-06-26 14:41:59 270143
E01YDU6V02 SET1 FS10 GB0000444736 GB GBX 0 B O LO 243 25000 N A 2002-06-25 13:26:36 182425
800YPYTV02 SET1 FT10 GB0008021650 GB GBX 0 B O LO 158.25 900 N A 2002-06-25 14:51:41 232725
F01Y5EQ402 SET1 FS10 GB0007547838 GB GBX 0 S O LO 1816 195 N A 2002-06-27 15:40:26 315226
E01YFK8D02 SET1 FS10 GB0007308355 GB GBX 0 S O LO 603.5 10000 N A 2002-06-26 08:43:44 32619
This file contains details of new orders entering the trading system. It contains details of orders that both enter the Order Book and that do not enter the Order Book (i.e. orders that completely execute on entry).
Esempio di Order History
This file contains a history of changes to each order and the method by which it is removed. For each order there are one or more rows shown with an order action type for each record. The order action type indicates if the order was partially or fully executed against, deleted, expired etc ...
Order Code
Order Action
TypeMatching
Order Code
Trade
Size Trade code TI Code
Count
ry of
Register
Currency Cod
e
Market
segment
code
Aggregate Size
Buy
Sell Ind
Market
Mechanis
m Type
Message
Sequence
Number
Received Date
Received Time
B01UXNOC02 P C021C6JP02 56 C021C6JS02 GB0009223206 GB GBX SET1 608 B LO 864101 2002-06-26 16:23:12
A01VK6HQ02 P A01VK72D02 5865 A01VK6HR02 GB0030913577 GB GBX SET1 2332 S LO 20285 2002-06-28 08:15:59
F01XR0NS02 P 4011DYDY02 550 4011DYDZ02 GB0007547838 GB GBX SET1 596 S LO 237767 2002-06-25 10:51:52
5027IWMO02 P C021ILK502 220 C021ILK602 GB0007839698 GB GBX SET1 20680 B LO 715581 2002-06-27 15:46:47
5027IWMO02 P A01VJBMF02 1619 A01VJBMG02 GB0007839698 GB GBX SET1 19061 B LO 715875 2002-06-27 15:46:59
B01ULMWD02 P D021TKSI02 220 D021TKSJ02 GB0002944055 GB GBX SET1 2280 S LO 36240 2002-06-24 08:36:57
F01Y4LH102 P 701XLZRD02 1562 701XLZRG02 GB0009740423 GB GBX SET1 8438 B LO 427523 2002-06-27 13:34:23
F01YANUI02 P F01YANYM02 570 F01YANYP02 GB0001452795 GB GBX SET1 80 S LO 724863 2002-06-28 16:14:02
F01XUAO902 P 5027BAIF02 3826 5027BAIG02 GB0007547838 GB GBX SET1 1724 B LO 442864 2002-06-25 14:00:57
601ZAXWR02 P 4011EF9402 3130 601ZAXWS02 GB0009252882 GB GBX SET1 5000 S LO 498578 2002-06-25 14:42:38
Esempio di Trade Reports
The trade report file contains details of every automatic and manual trade that has taken place, except for trades that have not been published.
MessageSequenceN
umber TICode
MarketSegmentCode
CountryOfRegister
Currency
Code TradeCode TradePrice TradeSize TradeDateTradeTim
e
BroadcastUpdateAct
ion
TradeTypeInd
Trade
TimeInd
BargainConditions
Conv
ertedPric
eInd
PublicationDate
PublicationTime
101810GB0008754136
SET2 GB
GBX
B01UOSXX02 361.5 4000 2002-06-24
14:52:10 E AT N N N 2002-06-24
14:52:10
65285GB0008706128
SET1 GB
GBX
10218V2P02
634.09998 330 2002-06-26
10:59:57 A O N N N 2002-06-26
11:00:16
39696GB0001734747
SET1 GB
GBX
20244Q3802
316.31601 100000 2002-06-27
10:23:54 A O N N N 2002-06-27
10:24:34
125823GB0008847096
SET1 GB
GBX
800YY1GG02 237 7333 2002-06-27
15:10:59 E AT N N N 2002-06-27
15:10:59
149869GB0001114411
SET1 GB
GBX
901XO52V02 627.5 1272 2002-06-24
16:35:11 E UT N N N 2002-06-24
16:35:11
5113GB0008034141
SET1 GB
GBX
B01ULMJP02 478.5 6941 2002-06-24
08:24:35 E AT N N N 2002-06-24
08:24:35
132311GB0002875804
SET1 GB
GBX
701XHZRT02 709.5 13193 2002-06-26
14:58:55 E AT N N N 2002-06-26
14:58:55
131894GB0007192106
SET1 GB
GBX
E01YJN2C02 86.25 34000 2002-06-26
14:58:03 E AT N N N 2002-06-26
14:58:03
179824GB0007547838
SET1 GB
GBX
E01YKJXK02 1807 1200 2002-06-26
16:26:54 E AT N N N 2002-06-26
16:26:54
144595GB0007839698
SET1 GB
GBX
F01YANHU02 603.5 899 2002-06-28
16:08:38 E AT N N N 2002-06-28
16:08:38
OD OH TD
TempFile
FlatFile
Pre-processing dati del London Stock Exchange
TempFile
TempFile
TempFile
FlatFile
FlatFile
FlatFile
3 files contenenti tutti gli stocks
1 file per stock contenente tutti gli “eventi”
1 file per stock contenente tutti gli “eventi”
in formato “Santa Fe-like”
Preprocessing: calcolo di best bid e best offer, ricerca dei matching orders...
size~ -15%
size~ +30%
1. OrderType 1 = Limit Order 2 = At best with no price execute-and-eliminate with a price 3 = Fill-or-kill, price optional 4 = Fixed exposure (acts like an expiration) 5 = Market order for the auction (like 2)2. History type 1 = New order 2 = Partial trade 3 = Full match 4 = Deletion 5 = Expiration 3. Order Code4. Buy /sell code 1 = Buy 2 = Sell5. Trade size The number of shares that trades hands. Not applicable in the case of incoming orders.6. Limit price7. Timestamp An integer indicating number of seconds since 1970 (GMT). When the event occurred.8. - 13. Broken out time of #7 (integers for year, month, day, hour, minute, second)
14. Participant code An integer that changes monthly that indicates the agent involved in the event.15. Tick size as a number (e.g. .5 for halves, .25 for quarters)16. Trade price, if there was a trade17. Remaining size18.History type code Indicates how a given order will be resolved.19. Timestamp at which ending event occurs (an integer encoded as #7).20. Whether or not a counterparty order was a limit order. [Boolean]21. The limit price of a counter party limit order, if any. For incoming order (field #2 = 1), this indicates the deepest price that the order matched against.22. The order index of the counterparty order, encoded like field #3.23. The counter party code -- the agent traded against. Encoded like field #14.24. Best bid price on previous second25. Best offer price on previous second
Orde
r ty
peHi
stor
y ty
pe
Orde
r Co
de Buy
Sell
Ind
Trad
e siz
e
Trad
e Pr
ice
Epoc
h Ti
me
Year
Mont
hDa
y
Hour
Minu
te
Seco
ndAg
ent
Id Tick
siz
e
Trad
e pr
iceRe
main ing
Size
Endi
ng
Hist
ory
Type
Endi
ng
Tim
e
Matc
hing
LO
Matc
hi ng
Price
Matc
hi ng
Orde
r Nu
mbe r
Agen
t ID
ofM
O
Best
Bi
d
Best
Of
fer
1 1 C01YD1CA02 2 0 341.0 1023265421 2002 6 5 10 23 41 0 1 0.0 2300 3 1023265421 0 341.0 0 0 343.5 350.01 2 C01YD1CA02 2 1000 341.0 1023265421 2002 6 5 10 23 41 0 1 343.5 1300 0 1023265421 1 343.5 701VLMAW02 0 343.5 350.01 3 701VLMAW02 1 1000 343.5 1023265421 2002 6 5 10 23 41 0 1 343.5 0 0 1023265421 1 341.0 C01YD1CA02 0 343.5 350.01 2 C01YD1CA02 2 1299 341.0 1023265421 2002 6 5 10 23 41 0 1 343.5 1 0 1023265421 1 343.5 E01WARGE02 0 343.5 350.01 3 E01WARGE02 1 1299 343.5 1023265421 2002 6 5 10 23 41 0 1 343.5 0 0 1023265421 1 341.0 C01YD1CA02 0 343.5 350.01 3 C01YD1CA02 2 1 341.0 1023265421 2002 6 5 10 23 41 0 1 343.5 0 0 1023265421 1 343.5 C01YD1C902 0 343.5 350.01 2 C01YD1C902 1 1 343.5 1023265421 2002 6 5 10 23 41 0 1 343.5 1000 0 1023265679 1 341.0 C01YD1CA02 0 343.5 350.0
Esempio di Flat File
1. OrderType 1 = Limit Order 2 = At best with no price execute-and-eliminate with a price 3 = Fill-or-kill, price optional 4 = Fixed exposure (acts like an expiration) 5 = Market order for the auction (like 2)2. History type 1 = New order 2 = Partial trade 3 = Full match 4 = Deletion 5 = Expiration 3. Order Code4. Buy /sell code 1 = Buy 2 = Sell5. Trade size The number of shares that trades hands. Not applicable in the case of incoming orders.6. Limit price7. Timestamp An integer indicating number of seconds since 1970 (GMT). When the event occurred.8. - 13. Broken out time of #7 (integers for year, month, day, hour, minute, second)14. Participant code An integer that changes monthly that indicates the agent involved in the event.15. Tick size as a number (e.g. .5 for halves, .25 for quarters)16. Trade price, if there was a trade17. Remaining size18.History type code Indicates how a given order will be resolved.19. Timestamp at which ending event occurs (an integer encoded as #7).20. Whether or not a counterparty order was a limit order. [Boolean]21. For trades (field #2 = 2 or 3), the limit price of a counter party limit order, if any. For incoming order (field #2 = 1), this indicates the deepest price that the order matched against.22. The order index of the counterparty order, encoded like field #3.23. The counter party code -- the agent traded against. Encoded like field #14.24. Best bid price on previous second25. Best offer price on previous second
Esempio di Flat File
Ord
er
type
Hist
ory
type
Ord
er
Code
Buy
Sell
Ind
Trad
e si
ze
Trad
e Pr
ice
Epoc
h Ti
me
Year
Mon
thDa
y
Hour
Min
ute
Seco
ndAg
ent
Id Tick
si
ze
Trad
e pr
ice
Rem
ain
ing
Size
Endi
ng
Hist
ory
Type
Endi
ng
Tim
e
Mat
chi
ngLO
Mat
chi
ng
Pric
eM
atch
ing
O
rder
Nu
mbe r
Agen
t ID
ofM
O
Best
Bi
d
Best
O
ffer
1 1 C01YD1CA02 2 0 341.0 1023265421 2002 6 5 10 23 41 0 1 0.0 2300 3 1023265421 0 341.0 0 0 343.5 350.01 2 C01YD1CA02 2 1000 341.0 1023265421 2002 6 5 10 23 41 0 1 343.5 1300 0 1023265421 1 343.5 701VLMAW02 0 343.5 350.01 3 701VLMAW02 1 1000 343.5 1023265421 2002 6 5 10 23 41 0 1 343.5 0 0 1023265421 1 341.0 C01YD1CA02 0 343.5 350.01 2 C01YD1CA02 2 1299 341.0 1023265421 2002 6 5 10 23 41 0 1 343.5 1 0 1023265421 1 343.5 E01WARGE02 0 343.5 350.01 3 E01WARGE02 1 1299 343.5 1023265421 2002 6 5 10 23 41 0 1 343.5 0 0 1023265421 1 341.0 C01YD1CA02 0 343.5 350.01 3 C01YD1CA02 2 1 341.0 1023265421 2002 6 5 10 23 41 0 1 343.5 0 0 1023265421 1 343.5 C01YD1C902 0 343.5 350.01 2 C01YD1C902 1 1 343.5 1023265421 2002 6 5 10 23 41 0 1 343.5 1000 0 1023265679 1 341.0 C01YD1CA02 0 343.5 350.0
Esempio di Flat File
Order type
History
type
Order Code
Buy
Sell Ind
Trade siz
e
Trade
Price
Epoch Time
Year
Month
Day
Hour
Mi
nute
Second
Agent Id
Tick
size
Trade
price
Remaining Siz
e
Endin
g Histor
y Type
Ending Time
Matching LO
Matching
Price
Matching Order
Number
Agent ID of M O
Best
Bid
Best
Offer
1 4 A01TJNXJ02 1 0 341.5 1023265419
2002 6 5
10
23
39 0 1 0.0 0 0 1023265419 0 0.0 0 0 343.5
350.0
1 1 C01YD1CA02 2 0 341.0 1023265421
2002 6 5
10
23
41 0 1 0.0 2300 3 1023265421 0 341.0 0 0 343.5
350.0
1 3701VLMAW02 1
1000 343.5 1023265421
2002 6 5
10
23
41 0 1 343.5 0 0 1023265421 1 341.0 C01YD1CA02 0 343.5
350.0
1 2 C01YD1C902 1 1 343.5 1023265421
2002 6 5
10
23
41 0 1 343.5 1000 0 1023265679 1 341.0 C01YD1CA02 0 343.5
350.0
1 2 C01YD1CA02 2100
0 341.0 1023265421
2002 6 5
10
23
41 0 1 343.5 1300 0 1023265421 1 343.5 701VLMAW02 0 343.5
350.0
1 2 C01YD1CA02 2129
9 341.0 1023265421
2002 6 5
10
23
41 0 1 343.5 1 0 1023265421 1 343.5 E01WARGE02 0 343.5
350.0
1 3 C01YD1CA02 2 1 341.0 1023265421
2002 6 5
10
23
41 0 1 343.5 0 0 1023265421 1 343.5 C01YD1C902 0 343.5
350.0
1 3E01WARGE02 1
1299 343.5 1023265421
2002 6 5
10
23
41 0 1 343.5 0 0 1023265421 1 341.0 C01YD1CA02 0 343.5
350.0
1 1E01WAS9S02 1 0 343.0 1023265460
2002 6 5
10
24
20 0 1 0.0 200 4 1023265578 0 343.0 0 0 343.5
350.0
1 4E01WAS9S02 1 0 343.0 1023265578
2002 6 5
10
26
18 0 1 0.0 0 0 1023265578 0 0.0 0 0 343.5
350.0