資訊系統/架構/產品‎ > ‎KGQ‎ > ‎GMDS相關文章‎ > ‎GMDS‎ > ‎

CME MDP3.0的規劃與建置

張貼者:2015年3月2日 下午7:08Wei-Xiuang Wang   [ 已更新 2017年7月22日 上午3:40 ]

CME於2015/6/10開始, 全面改用FIX/SBE的方式並停用FIX/FAST

FIX的重大改變

The following data will be removed from the FIX/FAST Market Data Incremental Refresh (35=X) message format:

  Tag 75-TradeDate - only the time is included on each message to save space. The Trade Date will be included on every Security Status (35=f) message update.
  (http://www.cmegroup.com/confluence/display/EPICSANDBOX/MDP3+-+Market+Data+Security+Status)

  Tag 273-MDEntryTime - Currently, tag 273-MDEntryTime is sent in each Market Data Incremental Refresh (35=X) message data block. Beginning with this release, the Start of Event timestamp (tag 60-TransactTime) will be sent once for each message. This will provide a more accurate timestamp for the message blocks.

  The following market data will no longer be sent:
    - Better Bid/Offer (CLAST)
    - Simulated Buy/Sell
    - Calculated Prices for Trades (Leg or Implied Orders Only)
    - Net Change
    - Tick Direction
    - Trade Condition

  Tag 731-SettlPriceType will be used for settlement prices; tag 286-OpenCloseSettlFlag will no longer be sent for settlement prices.

  The table below shows the relationship between the MDP and iLink tags.
    (Previous MDP Format[FAST])   (MDP3.0 New [FIX/SBE])
         tag 1151-SecurityGroup : tag 6937-Asset
         tag 55-Symbol          : tag 1151-SecurityGroup
         tag 107-SecurityDesc   : tag 55-Symbol


  The following new tags will be added to the Market Data Security Definition (35=d) message:
        tag 779-LastUpdateTime indicates the timestamp for when the instrument was last added, modified or deleted.
        tag 1300-MarketSegmentID identifies the market segment for all CME Globex Instruments.
        tag 6937-Asset indicates the underlying asset code, which was previously disseminated in tag 1151-SecurityGroup.
        tag 167-SecurityType indicates the type of security.
        tag 6350-TickRule indicates the VTT Code provided for instruments with variable ticks in addition to the Tick Size in Tag 969-MinPriceIncrement.
        tag 37702-MainFraction indicates the price denominator of the main fraction.
        tag 37703-SubFraction indicates the price denominator of the sub fraction.
        tag 9800-PriceDisplayFormat indicates the number of decimals in the displayed price (e.g., for price '100.25' will = '2')
        tag 731-SettlPriceType will be sent for settlement prices. It will contain a bitmap field of Boolean type indicators representing the settlement price type as described for the Incremental Refresh message.

  The following tags will be removed from the Market Data Security Definition (35=d) message:
        tag 5796-TradingReferenceDate
        tag 827-ExpirationCycle
        tag 107-SecurityDesc
        tag 9853-PricingModel
        tag 454-NoSecurityAltID with repeating groups: tag 455-SecurityAltID and tag 456-SecurityAltIDSource
        tag 1144-ImpliedMarketIndicator (implied eligibility for instruments will be found in the tag 871-InstAttribType=24 repeating group).
        tags from the Leg repeating group (tag 555-NoLegs):
    - tag 5795-LegSecurityGroup
    - tag 600-LegSymbol
    - tag 608-LegCFICode
    - tag 764-LegSecuritySubType
    - tag 556-LegCurrency
    - tag 610-LegMaturityMonthYear
    - tag 612-LegStrikePrice
    - tag 616-LegSecurityExchange
    - tag 620-LegSecurityDesc
    - tag 942-LegStrikeCurrency
    - tag 286-OpenCloseSettlFlag


特別是商品描述的欄位部分非常容易混淆

Previous MDP Format (FAST)
MDP 3.0 (New Market Data Format - SBE)
iLink Order Entry

tag1151-SecurityGroup  

tag 6937-Asset

tag1151-SecurityGroup

tag 55-Symbol  

tag1151-SecurityGroup  

tag 55-Symbol  

tag 107-SecurityDesc

tag 55-Symbol

tag 107-SecurityDesc



以CME的用戶端iLink來看, 應該是要讓MDP3.0經過轉換後相容於之前的對應

個人觀點:
 項目/格式 FIX/FAST(舊的MDP) FIX/SBE(新的MDP3.0)
 概念 以商品訊息為主軸 以資料處理為主軸
 格式 格式繁多雜亂,重複設計,焦點不明確 格式統一,功能明確,變動可能性降低
 封包 FAST壓縮,位元組傳輸量較少 Binary無壓縮,封包數增加20%~50%,傳輸量大增
 閱讀 封包內容經FAST壓縮,人工閱讀困難 結構化Binary資料,內容單純易於確認與溝通
 行情解讀 一個商品一個訊息更新 一個訊息多個商品更新
 成交揭示 一個商品一個訊息完成,較為單純 一個商品兩個訊息完成,恐增加行情處理負載
 價位小數 只有小數三位數 完整小數位數
 Tick合併 逐筆不合併,真實呈現 同一個TimeStamp同價合併,Tick大幅度減量
 實測數據 整體原始數據量所需位元組較少 可高達FAST的2.33倍,也就是增加1300%,需更大的頻寬確保品質

價位小數點的差異:

Tick合併比較:

以期貨商品同時段同範圍資料量比較:
FIX/FAST: Channel ( 7,9,11,13,15,30,31,32,33,60,111,117,113,115 )
FIX/SBE: Channel ( 310,312,314,316,318,382,386,384,360,320,340,346,342,344 )
新格式明顯為舊格式的2倍多


GMDS的規劃與建置, 介紹由當前FAST移轉到SBE的方式

假設FIX/FAST的GMDS/URDS設定為
Future  /channel 7,9,11,13,15,30,31,32,33,60,111,117,113,115,801
Option CBT
 /channel 112,114,116
Option CME
 /channel 8,12,61
Option NYM
 /channel 35,38
(PS: 801 or 117是設定相同的Group進系統, 只會有其中之1)

FIX/FAST的GMDS/PatsEmu-CME設定為
Future SecurityExchange=XCME,XCBT,XNYM,XCEC
Symbol=6A,6B,6C,6E,GF,GE,LE,HE,6M,6N,6J,NQ,ES,ND,NK,6S,SP,ZQ,XC,XK,ZC,ZR,ZD,YM,ZO,ZS,ZB,ZF,ZW,GC,QO,HG,SI,QM,NG,PD,PL,CL,XR,BD,IE,OP,ZN,ZT
Option CBT
SecurityExchange=XCBT
SecurityGroup=6E,ES,OG,LO,SO,6A,6B,6C,6J,OZC,OZW,OYM,OZB,OZS,OZN,OZF
Option CME
SecurityExchange=XCME
SecurityGroup=6E,ES,OG,LO,SO,6A,6B,6C,6J,OZC,OZW,OYM,OZB,OZS,OZN,GE,LE,GF
Option NYM
SecurityExchange=XNYM,XCEC
SecurityGroup=6E,ES,OG,LO,SO,6A,6B,6C,6J,OZC,OZW,OYM,OZB,OZS,OZN,ON
(PS: 選擇權設定有點亂, 用顏色把對應交易所的商品標示出來, 不符合交易所的設定商品可以移除)


由CME的對照表
http://www.cmegroup.com/confluence/display/EPICSANDBOX/MDP3#MDP3-FIX/FASTtoMDP3ChannelMapping
新的FIX/SBE的GMDS/URDS設定變為
Future  /channel 310,312,314,316,318,382,386,384,360,320,340,346,342,344
Option CBT
 /channel 341,343,345
Option CME
 /channel 311,315,321
Option NYM
 /channel 383,361

FIX/SBE的GMDS/PatsEmu-CME設定為 (也就是沒有改變)
Future SecurityExchange=XCME,XCBT,XNYM,XCEC
Symbol=6A,6B,6C,6E,GF,GE,LE,HE,6M,6N,6J,NQ,ES,ND,NK,6S,SP,ZQ,XC,XK,ZC,ZR,ZD,YM,ZO,ZS,ZB,ZF,ZW,GC,QO,HG,SI,QM,NG,PD,PL,CL,XR,BD,IE,OP,ZN,ZT
Option CBT
SecurityExchange=XCBT
SecurityGroup=OZC,OZW,OYM,OZB,OZS,OZN,OZF
Option CME
SecurityExchange=XCME
SecurityGroup=6E,ES,6A,6B,6C,6J,GE,LE,GF
Option NYM
SecurityExchange=XNYM,XCEC
SecurityGroup=OG,LO,SO,ON

如果選用Multi-DB版本來規劃, 可以簡化為 (基於Future/Option的應用或架構方式可能不同, 還是規劃成兩個分流)
URDS的設定(也就是把Option的部分簡化為一個)
Future  /channel 310,312,314,316,318,382,386,384,360,320,340,346,342,344
Option
 /channel 341,343,345,311,315,321,383,361

PatsEmu-CME的設定(也就是把Option的部分簡化為一個)
Future SecurityExchange=XCME,XCBT,XNYM,XCEC
Symbol=6A,6B,6C,6E,GF,GE,LE,HE,6M,6N,6J,NQ,ES,ND,NK,6S,SP,ZQ,XC,XK,ZC,ZR,ZD,YM,ZO,ZS,ZB,ZF,ZW,GC,QO,HG,SI,QM,NG,PD,PL,CL,XR,BD,IE,OP,ZN,ZT
Option
SecurityExchange=XCBT,XCME,XNYM,XCEC
SecurityGroup=OZC,OZW,OYM,OZB,OZS,OZN,OZF,6E,ES,6A,6B,6C,6J,GE,LE,GF,LO,ON,OG,SO

Multi-DB版本的PatsEmu-CME提供 /GroupMap 參數(點連結直接參考)
所以, 針對Future與Option的GroupMap設定檔可以分別這樣設計

PatsEmu-CME GroupMap for Future

"XCME",0x8100
"XNYM",0x8200
"XCBT",0x8300
"XCEC",0x8400

PatsEmu-CME GroupMap for Option

"O_XCME",0x8101
"O_XNYM",0x8201
"O_XCBT",0x8301
"O_XCEC",0x8401

'因為LO選擇權Strike特別多,將其獨立抽出可以有較好的處理效率
"LO|XNYM",0x8202    '交易所XNYM的LO全部選擇權
(PS: 由於LO有獨立抽出, 所以O_XNYM中不含LO商品, 於此例中只剩ON而已)

不同於之前的設置方式, 差異如表
  分流數
 TSHS-TfsRaw  PatsEmu-CME  數據庫(DbfId)  UniDnf-SB 同步需求
 TSHS-UniDbf/OBG
 舊的方式 4
 4 4
 4 ( 1 Future 3 Option )
 4 選擇性少,
容易有多餘的資源耗費
 新的方式 2
 2  2 9 ( 4 Future 5 Option)
 2 選擇性多,
有效使用資源提升效率
也就是新的方式架構更為簡單, 但能提供更多數據庫組合方式作為運用

同步的部分也能考慮改用UniDbf Merge Server (UniDbf-MS), 那麼只需執行一個UniDbf-MS 便能替代多個UniDbf-SB
不過舊的設置方式中, 每個分流的PatsEmu-CME要先透過/DbfId參數變更預設數據庫代碼0x0022成四個分別不同的代碼才能作為區別

新版的PatsEmu-CME支援FIX/SBE並相容舊的CME平台FIX/FAST,
新增Channel View可以查看所有Channel接收情形

新增FIX/SBE格式查看功能(rem是格式名稱,如果是偵測到新格式則是格式分析說明)

調整CME Filter的方式, 易於對照交易所提供之商品是否正確

新的URDS增加8,9,10三種新的接收方式 (可參考 URDS延伸參數說明 )
其中模式9可以用來替代目前收FIX/FAST使用的模式6
新的SBE則用模式10設定來接收

由於URDS接收模式9,10為自行定義清單, 因此控制分流接收可以透過檔案內容設定不同清單,
也可用相同的完整清單設定透過 /Channel 參數作不同的分流設定

例如以目前的Future/Option兩個分流, 可以用一個完整的清單

URDS-ByList-SBE.cfg

#註解行引符可為 # ; ' 與 Tab(x09)

#依序設定欄位
#Title,#Group IP,#Listen port

#模式一(任意來源):
    #Title - 簡稱(30Bytes以內)
    #Group IP - Multicast Group IP for join
    #Listen port - port number for listen

#模式二(CME AB備源):
    #Title - 以'*'帶Channel-ID作為Title, 例如 *300
    #Group-A IP - Multicast Group IP for join
    #Listen port - listen port for  Group-A
    #Group-B IP - Multicast Group IP for join
    #Listen port - listen port for  Group-B

#可透過 <enable> 與 <disable> 指定該行以下之設定是否生效

<enable>
#CME MDP3.0 FIX/SBE的Multicast Group IP/port ( A/B-Feed )
#正式環境 ftp://ftp.cmegroup.com/SBEFix/Production/Configuration/config.xml
*310,224.0.31.1,14310    ,224.0.32.1,15310  
*311,224.0.31.2,14311    ,224.0.32.2,15311  
*312,224.0.31.3,14312    ,224.0.32.3,15312  
'*313,224.0.31.4,14313    ,224.0.32.4,15313  
*314,224.0.31.5,14314    ,224.0.32.5,15314  
*315,224.0.31.6,14315    ,224.0.32.6,15315  
*316,224.0.31.7,14316    ,224.0.32.7,15316  
'*317,224.0.31.8,14317    ,224.0.32.8,15317  
*318,224.0.31.9,14318    ,224.0.32.9,15318  
'*319,224.0.31.10,14319   ,224.0.32.10,15319 
*320,224.0.31.11,14320   ,224.0.32.11,15320 
*321,224.0.31.12,14321   ,224.0.32.12,15321 
*340,224.0.31.64,14340   ,224.0.32.64,15340 
*341,224.0.31.65,14341   ,224.0.32.65,15341 
*342,224.0.31.66,14342   ,224.0.32.66,15342 
*343,224.0.31.67,14343   ,224.0.32.67,15343 
*344,224.0.31.68,14344   ,224.0.32.68,15344 
*345,224.0.31.69,14345   ,224.0.32.69,15345 
*346,224.0.31.70,14346   ,224.0.32.70,15346 
*360,224.0.31.192,14360  ,224.0.32.192,15360
*361,224.0.31.193,14361  ,224.0.32.193,15361
'*380,224.0.31.128,14380  ,224.0.32.128,15380
'*381,224.0.31.129,14381  ,224.0.32.129,15381
*382,224.0.31.130,14382  ,224.0.32.130,15382
*383,224.0.31.131,14383  ,224.0.32.131,15383
*384,224.0.31.132,14384  ,224.0.32.132,15384
'*385,224.0.31.133,14385  ,224.0.32.133,15385
*386,224.0.31.134,14386  ,224.0.32.134,15386
'*387,224.0.31.135,14387  ,224.0.32.135,15387
'*410,224.0.33.1,14410    ,224.0.34.1,15410  
'*430,224.0.33.64,14430   ,224.0.34.64,15430 
'*431,224.0.33.65,14431   ,224.0.34.65,15431 
'*440,224.0.33.80,14440   ,224.0.34.80,15440 
'*441,224.0.33.81,14441   ,224.0.34.81,15441 
'*450,224.0.33.96,14450   ,224.0.34.96,15450 
'*460,224.0.33.112,14460  ,224.0.34.112,15460
'*461,224.0.33.113,14461  ,224.0.34.113,15461
那麼可以設定
Pars_10fut 內容為
/CfgFile URDS-ByList-SBE.cfg /Channel 310,312,314,316,318,382,386,384,360,320,340,346,342,344
Pars_10opt 內容為
/CfgFile URDS-ByList-SBE.cfg /Channel 341,343,345,311,315,321,383,361

也可以用兩個分別的清單檔案來完成

URDS-ByList-SBEfut.cfg

<enable>
*310,224.0.31.1,14310    ,224.0.32.1,15310  
*312,224.0.31.3,14312    ,224.0.32.3,15312  
*314,224.0.31.5,14314    ,224.0.32.5,15314  
*316,224.0.31.7,14316    ,224.0.32.7,15316  
*318,224.0.31.9,14318    ,224.0.32.9,15318  
*382,224.0.31.130,14382  ,224.0.32.130,15382
*386,224.0.31.134,14386  ,224.0.32.134,15386
*384,224.0.31.132,14384  ,224.0.32.132,15384
*360,224.0.31.192,14360  ,224.0.32.192,15360
*320,224.0.31.11,14320   ,224.0.32.11,15320 
*340,224.0.31.64,14340   ,224.0.32.64,15340 
*346,224.0.31.70,14346   ,224.0.32.70,15346 
*342,224.0.31.66,14342   ,224.0.32.66,15342 
*344,224.0.31.68,14344   ,224.0.32.68,15344 

URDS-ByList-SBEopt.cfg

<enable>
*341,224.0.31.65,14341   ,224.0.32.65,15341 
*343,224.0.31.67,14343   ,224.0.32.67,15343 
*345,224.0.31.69,14345   ,224.0.32.69,15345 
*311,224.0.31.2,14311    ,224.0.32.2,15311  
*315,224.0.31.6,14315    ,224.0.32.6,15315  
*321,224.0.31.12,14321   ,224.0.32.12,15321 
*383,224.0.31.131,14383  ,224.0.32.131,15383
*361,224.0.31.193,14361  ,224.0.32.193,15361
那麼則設定清單檔案即可
Pars_10fut 內容為
/CfgFile URDS-ByList-SBEfut.cfg
Pars_10opt 內容為
/CfgFile URDS-ByList-SBEopt.cfg



Comments