帳號:guest(18.222.168.163)          離開系統
字體大小: 字級放大   字級縮小   預設字形  

詳目顯示

以作者查詢圖書館館藏以作者查詢臺灣博碩士論文系統以作者查詢全國書目
作者(中文):高翊傑
作者(外文):Kao, Yi-Chieh
論文名稱(中文):應用於台灣期貨市場基於場效可程式化邏輯閘陣列加速之高頻交易系統
論文名稱(外文):An FPGA-based High-frequency Trading System on Taiwan Futures Market
指導教授(中文):馬席彬
指導教授(外文):Ma, Hsi-Pin
口試委員(中文):楊家驤
黃元豪
口試委員(外文):Yang, Chia-Hsiang
Huang, Yuan-Hao
學位類別:碩士
校院名稱:國立清華大學
系所名稱:電機工程學系
學號:107061544
出版年(民國):110
畢業學年度:109
語文別:英文
論文頁數:80
中文關鍵詞:高頻交易硬體加速場效可程式化邏輯閘陣列期貨
外文關鍵詞:FPGAHFTFuturesAccelerationHardware
相關次數:
  • 推薦推薦:0
  • 點閱點閱:659
  • 評分評分:*****
  • 下載下載:0
  • 收藏收藏:0
高頻交易以快速反應市場變化來從中獲取利潤。因此透過減少系統延遲以及提高吞吐量,可以提升高頻交易者的日淨利。本篇論文針對台灣期貨交易過程設計基於場效可程式化邏輯閘陣列加速之高頻交易系統。此系統實現10G乙太網路實體收發器、客製化網路分層的解包與封包、部分台灣期貨市場訊息的編碼與解碼、期貨市場商品五檔價量的管理以及簡易的高頻交易策略。乙太網路實體收發器採用156.25兆赫時脈傳輸64位元的資料寬度。接收端能夠辨認並解析位址解析協定、使用者資料報協定與傳輸控制協定的乙太封包,並且提供傳輸控制協定的連線功能。本篇論文針對此系統的硬體測試,使用台灣真實期貨交易環境來驗證系統在市場行情解析上的正確性以及與期交所連線並策略觸發下單的功能。經實驗結果得到設計與實現的高頻交易系統無論在日盤或夜盤皆能準確解析市場行情資訊並得到特定商品的五檔價量,並且當觸發策略時能夠向期交所委託下單。除此之外,透過乙太封包內時間戳比較進出封包的時間差得到從封包解析到觸發下單一整條完整交易路徑的延遲僅約500奈秒,相比於軟體程式交易系統以微秒等級計算的延遲,效能提升近100倍以上。
High-frequency trading (HFT) systems require extremely low latency in response to market updates to make profits. Therefore, reduce the overall system latency and increase the throughput can increase the daily net profit of high-frequency traders. In this thesis, an FPGA-based high-frequency trading system is designed and implemented. The proposed system implements 10G ethernet physical interface, customized network stack parsing and packaging, partial financial protocol decoding and encoding, futures market order book handling and customized trading strategy. A 156.25 MHz clock is used to clock the 64-bit datapath of ethernet physical transceiver and receiver. For network stack decoding, the system can identify and analyze the ethernet packets of the address resolution protocol (ARP), user datagram protocol (UDP), transmission control protocol (TCP), and provides the functionality of TCP connection. The proposed system has connected to the real futures trading environment to verify the correctness of the functionality of market data parsing and order management processing. Based on the verification and evaluation on field programmable gate array (FPGA), the proposed system can accurately analyze the market information and obtain the fifth-order of specific product regardless of the trading time, and issue an order when the trading strategy is triggered. An aggregated latency of 500 ns is measured. This result in a hundred-time more efficacy than a typical software-based HFT system.
Abstract i
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . 1
1.2 Motivation . . . . . . . . . . . . . . . 2
1.3 Main Contributions. . . . . . . . . . . . . 2
1.4 Organization. . . . . . . . . . . . . . . 3

2 Background Knowledge and Literature Survey 5
2.1 Internet Protocol Stack . . . . . . . . . . . 6
2.1.1 Application Layer . . . . . . . . . . . 6
2.1.2 Transport Layer . . . . . . . . . . . . 7
2.1.3 Internet Layer . . . . . . . . . . . . . 8
2.1.4 Data-Link Layer . . . . . . . . . . . . 9
2.1.5 Physical Network Layer . . . . . . . . . . 9
2.2 A Software-based HFT System on Linux Server . . . . 9
2.2.1 Unpredictable PCIe Transfers and Cache Misses . . 10
2.2.2 Performance Bottleneck in Linux TCP Protocol Stack . 11
2.3 Related Works . . . . . . . . . . . . . 12

3 Proposed FPGA-based High-frequency Trading System . . . 19
3.1 System Overview . . . . . . . . . . . . . 19
3.2 Network Layer . . . . . . . . . . . . . 22
3.2.1 10G Ethernet PCS/PMA v6.0 IP core . . . . . . 24
3.2.2 10 Gigabit Medium Independent Interface (XGMII)
Decoder/Encoder. . . . . . . . . . . . . 27
3.2.3 Network Stack Decoder. . . . . . . . . . . 30
3.2.4 Network Connection Manager . . . . . . . . . 35
3.2.5 32-bits Cyclic Redundancy Check (CRC32) Calculator . 41
3.3 Financial Protocol Decoder . . . . . . . . . . 46
3.4 Order Book . . . . . . . . . . . . . . . 50
3.5 Custom Trading Logic . . . . . . . . . . . . 54
3.6 Financial Protocol Encoder . . . . . . . . . . 56
3.7 Xilinx DMA/Bridge Subsystem for PCI Express v4.1 . . 60

4 Implementation Results 65
4.1 Experimental Results . . . . . . . . . . . . 65
4.2 Utilization of Hardware . . . . . . . . . . . 68
4.3 Evaluation . . . . . . . . . . . . . . . 69

5 Conclusions and Future Works 75
5.1 Conclusions . . . . . . . . . . . . . . . 75
5.2 Future Work . . . . . . . . . . . . . . . 75

Bibliography 77
[1] “Taiwan Futures Exchange (TAIFEX), https://www.taifex.com.tw/enl/eIndex.

[2] C. Leber, B. Geib, and H. Litz, “High frequency trading acceleration using FPGAs,”in2011 21st International Conference on Field Programmable Logic and Applications,2011, pp. 317–322.

[3] Qiu Tang, Majing Su, Lei Jiang, Jiajia Yang, and Xu Bai, “A scalable architecture forlow-latency market-data processing on FPGA,” in2016 IEEE Symposium on Computersand Communication (ISCC), 2016, pp. 597–603.

[4] J. W. Lockwood, A. Gupte, N. Mehta, M. Blott, T. English, and K. Vissers, “A low-latency library in FPGA hardware for high-frequency trading (hft),” in2012 IEEE 20thAnnual Symposium on High-Performance Interconnects, 2012, pp. 9–16.

[5] A. Boutros, B. Grady, M. Abbas, and P. Chow, “Build fast, trade fast: FPGA-basedhigh-frequency trading using high-level synthesis,” in2017 International Conference onReConFigurable Computing and FPGAs (ReConFig), 2017, pp. 1–6.

[6] J. A. Brogaard, “High frequency trading and its impact on market quality,”5th AnnualConference on Empirical Legal Studies, 04 2011.

[7] A. Menkveld, “High frequency trading and the new-market makers,”Journal of Finan-cial Markets, vol. 16, 05 2013.

[8] R. Francioni and P. Gomber,High Frequency Trading: Market Structure Matters.Springer, Cham, 01 2017, pp. 363–390.

[9] A. Milanovic, S. Srbljic, and V. Sruk, “Performance of UDP and TCP communicationon personal computers,” in2000 10th Mediterranean Electrotechnical Conference. In-formation Technology and Electrotechnology for the Mediterranean Countries. Proceed-ings. MeleCon 2000 (Cat. No.00CH37099), vol. 1, 2000, pp. 286–289 vol.1.

[10] N. Lobo, V. Malik, C. Donnally, S. Jahne, and H. Jhaveri, “Evaluating the latency impactof IPv6 on a high frequency trading system,” University of Colorado, 05 2012.

[11] M. Dvoˇr ́ak and J. Koˇrenek, “Low latency book handling in FPGA for high frequencytrading,” in17th International Symposium on Design and Diagnostics of Electronic Cir-cuits Systems, 2014, pp. 175–178.

[12] A. Ahmed, A. Aljumah, and M. Ahmad, “Design and implementation of a direct mem-ory access controller for embedded applications,”International Journal of Technology,vol. 10, p. 309, 04 2019.

[13] S. Min, M. Alian, W. Hwu, and N. S. Kim, “Semi-coherent DMA: An alternative I/Ocoherency management for embedded systems,”IEEE Computer Architecture Letters,vol. 17, no. 2, pp. 221–224, 2018.

[14] D. Zaitsev and K. M.A., “Implementing stack E6 via OS Linux sockets,”Journal ofAdvanced Computer Science and Technology, vol. 1, pp. 116–133, 06 2012.

[15] W. wu and M. Crawford, “Potential performance bottleneck in Linux TCP,”Int. J. Com-munication Systems, vol. 20, pp. 1263–1283, 11 2007.

[16] H. Subramoni, F. Petrini, V. Agarwal, and D. Pasetto, “Streaming, low-latency commu-nication in on-line trading systems,” in2010 IEEE International Symposium on ParallelDistributed Processing, Workshops and Phd Forum (IPDPSW), 2010, pp. 1–8.

[17] G. W. Morris, D. B. Thomas, and W. Luk, “FPGA accelerated low-latency market datafeed processing,” in2009 17th IEEE Symposium on High Performance Interconnects,2009, pp. 83–89.

[18] H.-y. Kim and S. Rixner, “TCP offload through connection handoff,” vol. 40, 10 2006,pp. 279–290.

[19] G. W. Morris, D. B. Thomas, and W. Luk, “FPGA accelerated low-latency market datafeed processing,” pp. 83–89, 2009.

[20] Qiu Tang, Majing Su, Lei Jiang, Jiajia Yang, and Xu Bai, “A scalable architecture forlow-latency market-data processing on FPGA,” in2016 IEEE Symposium on Computersand Communication (ISCC), 2016, pp. 597–603.

[21] R. V. Nageshwara and V. Kumar, “Concurrent access of priority queues,”IEEE Trans-actions on Computers, vol. 37, no. 12, pp. 1657–1665, 1988.

[22] D. Sidler, G. Alonso, M. Blott, K. Karras, K. Vissers, and R. Carley, “Scalable 10GbpsTCP/IP stack architecture for reconfigurable hardware,” in2015 IEEE 23rd Annual In-ternational Symposium on Field-Programmable Custom Computing Machines, 2015, pp.36–43.

[23] M. Chinchole and K. Kinage, “Functional verification of ten gigabytes media inde-pendent interface (XGMII) using universal verification methodology,” in2018 FourthInternational Conference on Computing Communication Control and Automation (IC-CUBEA), 2018, pp. 1–4.

[24] M. Sprachmann, “Automatic generation of parallel CRC circuits,”IEEE Design Test ofComputers, vol. 18, no. 3, pp. 108–114, 2001.

[25] G. Franklin, J. Powell, and A. Emami-Naeini,Feedback Control Of Dynamic Systems.Addison Wesley, 01 1994.

[26] G. Campobello, G. Patane, and M. Russo, “Parallel CRC realization,”IEEE Transactionson Computers, vol. 52, no. 10, pp. 1312–1319, 2003.

[27]Tick-by-tick Market Information Transmission Operation Manual, Taiwan Futures Ex-change, 2019.

[28]Taiwan Futures Exchange TCP/IP TMP telex norms, Taiwan Futures Exchange, 2019.

[29] Gang Shi, Mingchang Hu, Hongda Yin, Weiwu Hu, and Zhimin Tang, “A shared virtualmemory network with fast remote direct memory access and message passing,” in2004IEEE International Conference on Cluster Computing (IEEE Cat. No.04EX935), 2004,pp. 495.

[30] M. Bartik, “Clock domain crossing — an advanced course for future digital design engi-neers,” in2018 7th Mediterranean Conference on Embedded Computing (MECO), 2018,pp. 1–5.

[31] R. Nageshwara and V. Kumar, “Concurrent access of priority queues,”Computers, IEEETransactions on, vol. 37, pp. 1657 – 1665, 01 1989.

[32] M. Stasiak and K. Piasecki,A new approach to investment risk assessment in HFT sys-tems, 09 2020, pp. 85–90.
 
 
 
 
第一頁 上一頁 下一頁 最後一頁 top
* *