节点文献

低延时期货交易系统的设计与实现

The Design and Implementation of Low Lantency Future Trading System

【作者】 李志伟

【导师】 陈昊鹏; 江鹏;

【作者基本信息】 上海交通大学 , 软件工程(专业学位), 2017, 硕士

【摘要】 程序化交易已经成为证券期货产品的主要交易方式,高频交易是程序化交易的一种类别,从高频交易的特征来看,低延时是其中非常重要的指标。国内在低延时交易系统方面的研究和实践相对国外而言是相对缓慢的,这和国内机构投资者比重不高,以及监管机构的监管条例有一定的关系。但是随着我国期货交易市场对外开放的程度越来越高,越来越多习惯于使用高频交易的境外投资者参与进来,这些都会让国内的参与者对具有更低延时的交易系统的需求越来越迫切。本文设计并实现了一套低延时期货交易系统。本文的研究工作主要有以下几个方面:首先,介绍了课题的研究背景和意义,对国内外相关系统的现状进行分析,然后针对低延时交易系统所要应用的技术进行了介绍。其次,对交易系统进行整体需求分析,主要从功能性和非功能性两大方面进行阐述,介绍了交易系统的工作流程和功能模块。再次,在需求分析的基础上,提出系统的整体架构,并根据架构设计介绍了多事件的并发处理模型、消息总线技术、基于容错的主从排队机制、内存数据库相关关键组件。在整个交易系统的设计和实现中,按照需求分析,对各个功能模块应用关键组件进行了设计和实现。在多事件的并发处理模型的设计中,采用基于I/O多路复用的机制来处理并发的I/O事件,应用Reactor模型构建事件处理框架。对于同一进程间不同线程的数据同步,转换数据的访问方式,尽可能采用无锁的生产者-消费者模式来进行数据共享,减少因为竞争带来的不确定时间开销。在业务处理的应用场景中,通过内存数据库的操作,使得业务处理自然地位于事务管理中,简化业务逻辑。最后,本文的研究成果在项目中得到了初步验证,整个系统的运行通过了功能测试和非功能测试。从测试的结果可以看出系统在正确性、稳定性方面表现良好,同时在关键业务的低延时指标上也有较大提升,系统处理容量也得以提高。总体来说,论文设计的低延时期货交易系统达到预期的目标。

【Abstract】 Program trading has become the main trading mode of securities and futures products.High-frequency trading is a kind of program trading of which low-latency is one of the most important indicators from the characteristics.Domestic research and practice in the low-latency trading system is relatively slow relative to foreign countries,which is the proportion of domestic institutional investors is not high,and regulatory agencies have a certain relationship between the regulations.However,as China’s futures market is becoming more open to the outside world,more and more accustomed to the use of high-frequency trading of foreign investors involved,which will allow domestic participants with lower latency trading system Demand more and more urgent.This paper designs and implements a set of low-latency futures trading system.The main contents of this paper are as follows:Firstly,the research background and significance of the subject are introduced.The present situation of related systems at home and abroad is analyzed,and then the technology to be applied in low-latency trading system is introduced.Secondly,the overall demand analysis of the trading system,mainly from the functional and non-functional aspects of the two described,introduced the trading system workflow and functional modules.Thirdly,on the basis of detailed requirement analysis,the overall architecture of the system is proposed.According to the architecture design,the multi-event concurrent processing model,message bus technology,fault-tolerant master-slave queuing mechanism and memory database are introduced.In the design and implementation of the whole trading system,according to the demand analysis,the key components are designed and realized.In the design of multi-event concurrency model,the I / O-based mechanism is used to deal with concurrent I / O events,and Reactor model is used to construct the event processing framework.For data synchronization between different threads of the same process,the conversion data is accessed in a lock-free producer-consumer model for data sharing,reducing the time-consuming overhead caused by competition.In the application scenario of business processing,business operations are naturally located in the transaction management through the operation of the memory database,simplifying the business logic.Finally,the research results in this project have been initially verified,the whole system running through the functional testing and non-functional testing.From the test results can be seen in the correctness and stability of the system performed well,at the same time in the key business of the low latency index has also greatly improved,the system processing capacity has also been improved.In general,low-latency futures trading system designed by this paper achieves the desired goal.

  • 【分类号】TP311.52;F830.9
  • 【被引频次】2
  • 【下载频次】163
  • 攻读期成果
节点文献中: 

本文链接的文献网络图示:

本文的引文网络