CN105989538B - Automatic trading system and automatic trading method for financial products - Google Patents

Automatic trading system and automatic trading method for financial products Download PDF

Info

Publication number
CN105989538B
CN105989538B CN201510448704.XA CN201510448704A CN105989538B CN 105989538 B CN105989538 B CN 105989538B CN 201510448704 A CN201510448704 A CN 201510448704A CN 105989538 B CN105989538 B CN 105989538B
Authority
CN
China
Prior art keywords
market
module
instruction set
ordering
trading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510448704.XA
Other languages
Chinese (zh)
Other versions
CN105989538A (en
Inventor
柳峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shengli Anyuan Technology Hangzhou Co ltd
Original Assignee
Shengli Anyuan Technology Hangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shengli Anyuan Technology Hangzhou Co ltd filed Critical Shengli Anyuan Technology Hangzhou Co ltd
Priority to CN201510448704.XA priority Critical patent/CN105989538B/en
Publication of CN105989538A publication Critical patent/CN105989538A/en
Application granted granted Critical
Publication of CN105989538B publication Critical patent/CN105989538B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present invention provides an automatic transaction system for financial products, comprising: the input and output module is used for receiving market quotation data, analyzing the market quotation data into market quotation information, sending the market quotation information to the automatic trading module, and finishing trading according to the trading information generated by the automatic trading module; the automatic trading module is used for receiving the market quotation information and generating trading information according to the market quotation information; wherein at least one of the input/output module and the automatic transaction module is realized based on FPGA. The invention also provides an automatic transaction method of the financial product.

Description

Automatic trading system and automatic trading method for financial products
Technical Field
The invention relates to an automatic transaction system applied to the field of finance, in particular to an automatic transaction system applied to financial products based on a hardware FPGA.
Background
With the increasing popularity of programmed securities trading, more and more securities trades are automatically completed through computer programs, and therefore the trading completion efficiency is greatly improved. Meanwhile, the performance requirements of the trading system, especially the requirement on the delay performance, are higher and higher, trading opportunities are always passed instantly, and the opportunity of gaining profit from trading is lost or even loss is caused when the delay exceeds a certain limit. Conventional trading systems are software-based, i.e., the process of actually deciding whether to trade or not and how to trade is run in a software system, and the software system is executed by a host CPU. Due to the limitation of a CPU framework and a software system, a certain delay exists in the process of programmed transaction regardless of network flow; and because the number of messages that can be processed by the CPU in unit time is limited, when the data traffic needing to be processed is increased sharply, the delay is suddenly increased, and the requirement of programmed transaction on the processing speed cannot be met.
All trading systems need to be firstly accessed into market quotations, then the quotations are processed, and then the trading is determined according to the current quotation information and trading algorithms, and then the trading is issued to the market. In the existing automatic trading system, as the market is received and the order is sent through the network connection, the data must pass through the network to the CPU and then pass back to the network through the CPU, the delay of data transmission from the network card to the CPU must be introduced in the process, and the CPU needs to participate in the receiving and sending processing of the network data, which brings great delay. Another disadvantage of the CPU processing network data is that CPU resources are heavily occupied, especially when network data bandwidth is high.
Disclosure of Invention
In order to solve the above problems, the present invention provides a financial product automatic transaction system, comprising: the input and output module is used for receiving market quotation data, analyzing the market quotation data into market quotation information, sending the market quotation information to the automatic trading module, and finishing trading according to the trading information generated by the automatic trading module; the automatic trading module is used for receiving the market quotation information and generating trading information according to the market quotation information; wherein at least one of the input/output module and the automatic transaction module is realized based on FPGA.
Preferably, the input/output module includes a first network protocol processing unit and a second network protocol processing unit; the first network protocol processing unit receives a network data packet containing market quotation data, analyzes the network data packet into a market quotation data packet according to a network protocol and sends the market quotation data packet to the automatic trading module; and the second network protocol processing unit receives the transaction information generated by the automatic transaction module, packages the transaction information into a network data packet and sends the network data packet to a transaction market.
Preferably, the method further comprises the following steps: the market quotation conversion unit is positioned between the first network protocol processing unit and the automatic trading module and used for analyzing market quotation data from a market quotation data packet analyzed by the first network protocol processing unit according to a market data protocol and sending the market quotation data to the automatic trading module; and the ordering module is positioned between the automatic transaction module and the second network protocol processing unit and used for controlling ordering according to the transaction information of the automatic transaction module and sending the ordering information to the second network protocol processing unit.
Preferably, the automatic transaction module comprises a logic operation unit, a condition judgment unit and an instruction set unit; the logic operation unit can perform logic operation according to market quotation information to calculate a derivative value; the condition judgment unit obtains a judgment result according to a pre-stored judgment condition judgment derivative value; the instruction set unit prestores the corresponding relation between the judgment result and the instruction set, and executes the corresponding instruction set according to the judgment result of the condition judgment unit.
Preferably, the system further comprises a policy configuration module for receiving instructions from a user and configuring the operation of the automatic transaction module accordingly.
Preferably, the automatic transaction module further comprises a register unit; the strategy configuration module configures the working parameters of the automatic transaction module through the register unit.
Preferably, the logical operation unit has a plurality of logical operation formulas, and can calculate a plurality of derivative values according to market information; the conditional decision unit decides a combination of a plurality of decision results corresponding to the plurality of derivative values; the instruction set unit prestores the corresponding relation between the judgment result combination and the instruction set, and executes the corresponding instruction set according to the judgment result combination of the condition judgment unit.
Preferably, the automatic trading module further comprises a market information format conversion unit, and the market information format conversion unit is used for converting the market information received by the automatic trading module into market information with a fixed format.
The present invention also provides an automatic transaction method for financial products, comprising: the method comprises the steps of information receiving, namely receiving a network data packet containing market quotation data by a first network protocol processing unit, analyzing the network data packet into the market quotation data packet according to a network protocol and sending the market quotation data packet to an automatic trading module; a transaction processing step, in which an automatic transaction module processes the market quotation data packet to generate transaction information; and an information sending step, wherein the second network protocol processing unit receives the transaction information generated in the information processing step, encapsulates the transaction information into a network data packet and sends the network data packet to a transaction market.
Preferably, the method further comprises the following steps: and a market quotation conversion step, in which the market quotation conversion unit analyzes market quotation data from the market quotation data packet analyzed by the first network protocol processing unit according to a market data protocol and sends the market quotation data to the automatic trading module.
Preferably, the method further comprises the following steps: and an order placing step, in which an order placing module controls order placing according to the transaction information of the automatic transaction module and sends the order placing information to the second network protocol processing unit.
Preferably, the transaction processing step includes a logic operation step, a conditional decision step and an instruction set step; in the logic operation step, the logic cloud end unit performs logic operation according to market quotation information to calculate a derivative value; in the condition judgment step, a condition judgment unit judges the derivative value according to a prestored judgment condition to obtain a judgment result; in the instruction set step, the instruction set unit prestores the corresponding relation between the judgment result and the instruction set, and the instruction set unit executes the corresponding instruction set according to the judgment result of the condition judgment unit.
Preferably, the method further comprises a policy configuration step, wherein the policy configuration module receives the instruction of the user and configures the work of the automatic transaction module according to the instruction.
Preferably, the transaction processing step further comprises a storing step; the register unit can store data information of the strategy configuration module for configuring the working parameters of the automatic transaction module.
Preferably, in the logical operation step, the logical operation unit has a plurality of logical operation formulas, and can calculate a plurality of derivative values according to market information; in the conditional decision step, the conditional decision unit decides a combination of a plurality of decision results corresponding to the plurality of derivative values; in the step of the instruction set, the instruction set unit prestores a corresponding relation between a judgment result combination and the instruction set, and executes a corresponding instruction set according to the judgment result combination of the condition judgment unit.
Preferably, the market quotation system further comprises a quotation format conversion step, wherein the quotation format conversion unit converts the market quotation information received by the automatic trading module into market quotation information with a fixed format.
The invention adopts a brand-new architecture, namely, transaction logic is operated in hardware (FPGA), and the processing of network protocol and market protocol is completed through the hardware, thereby avoiding the delay caused by the data from the network to the CPU and then from the CPU to the network, and simultaneously avoiding the network data processing by using the CPU, thereby solving the problems of unstable CPU occupation and delay performance and the like. By integrating the operation formulas required by the transaction algorithm into hardware, the characteristics of high-speed parallel of the hardware can be utilized, a plurality of operation formulas are processed in parallel, the extremely high operation speed is realized, the operation result corresponds to the instruction to be executed in a mapping mode, and the characteristic of the hardware is also utilized to realize the trigger of extremely low delay.
Drawings
FIG. 1 is a schematic diagram illustrating an automatic transaction system for financial products according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an automatic transaction module of an automatic transaction system for financial products according to an embodiment of the present invention;
FIG. 3 is a flow chart of a system process for automated trading of financial products according to an embodiment of the present invention.
Detailed Description
The invention will be elucidated on the basis of an embodiment shown in the drawing. The embodiments disclosed herein are to be considered in all respects as illustrative and not restrictive. The scope of the present invention is not limited to the following description of the embodiments, but is defined only by the scope of the claims, and includes all modifications having the same meaning as and within the scope of the claims.
Fig. 1 is a schematic view showing the construction of an automatic transaction system for financial products according to the present invention. The automatic financial product trading system can receive network data packets of market information terminals 1-M, analyze the received market quotation data, place orders according to the analyzed trading information after analyzing the trading information, and send the order placing information to the market trading terminals 1-N. The automatic trading system comprises a network protocol processing module 1, a market situation conversion module 2, an automatic trading module 3 and an ordering module 4. The network protocol processing module 1 can analyze the received network data packet or package the related data according to the network transmission protocol. The market quotation conversion module 2 can analyze the data packet analyzed by the network protocol processing module 1 according to a specific market data protocol. The automatic trading module 3 can process market quotation data to obtain trading instructions or instruction sets, and places orders through the ordering module 4.
The network protocol processing module 1 has a first network protocol processing module 11 and a second network protocol processing module 12, and mainly processes the protocols of an MAC layer (data link layer) and a TCP/IP layer (network layer), so as to realize the analysis of a network data packet or the packaging of related data. The first network protocol processing module 11 includes a plurality of first network protocol processing units 111, which are respectively connected to the market information terminals 1-M and the market quotation conversion module 2, and mainly analyzes the network data packet containing the market quotation data input by the market terminal according to the transmission protocol of the network layer, analyzes the market quotation data packet containing the market quotation data, and sends the analyzed data packet to the market quotation conversion module 2. The second network protocol processing module 12 includes a plurality of second network protocol processing units 121, which are respectively connected to the market trading terminals 1 to N and the ordering module 4, and the module mainly packages ordering messages of the ordering module 4 according to corresponding network protocols and sends the packaged network data packets to the market trading terminals 1 to N through the network.
The market quotation conversion module 2 is internally stored with a specific market data protocol, can analyze the received market quotation data packet sent by the first network protocol processing module 11 according to the stored market data protocol, analyzes specific market quotation data, and sends the analyzed market quotation data to the automatic transaction module 3; the module has a plurality of market condition conversion units 21 corresponding to the plurality of first network protocol processing units.
The automatic trading module 3 can process the received market quotation data according to a certain trading algorithm to obtain a trading instruction or an instruction set with a certain rule. Fig. 2 is a schematic structural diagram of an automatic transaction module of an automatic transaction system for financial products according to an embodiment of the present invention. As shown in fig. 2, the automatic transaction module 3 includes a data format conversion unit 31, a logic operation unit 32, a condition decision unit 33, an instruction set unit 34, and a register unit 35. The data format conversion unit 31 is self-defined with a specific data structure, can convert and store market quotation data with different formats according to the specific data structure stored in the data format conversion unit 31, and can update currently stored data according to real-time quotation; meanwhile, the data format conversion unit 31 can filter market quotation data according to the configuration protocol in the policy configuration module 5, and filter out a market quotation data list conforming to the configuration protocol. The logical operation unit 32 is a unit composed of a formula set (formulas 1 to P), the operation logic of the formula is written into the FPGA hardware in advance, and the unit can perform corresponding logical operation on the input market quotation data according to the formula set and send the operation result to the condition judgment unit 33; the parameters in the formula set and the data required for operation can be obtained through user policy configuration, and can also be read from the data format conversion unit 31. The condition decision unit 33 may store a decision value and a decision condition, and the unit can compare the decision value with the result of the operation of the logic operation unit 32 according to a certain decision condition to obtain a decision result, map the decision result into a binary code (i.e. the result of each bit value of the binary code corresponding to the decision condition), and send the binary code to the instruction set unit 34; in the process, the decision condition is >, = or <, the decision result is 0 or 1 (indicating whether the condition is satisfied or not), and the decision value used in the process may be configured in real time or configured in advance. The instruction set unit 34 stores an instruction set table, the instruction set table stores a plurality of ordering instruction sets (instruction sets 1 to X), each ordering instruction set corresponds to a binary code, the instruction set unit 34 matches the received binary code sent by the condition decision unit 33 with the stored ordering instruction set, and when the received binary code is completely matched with a certain ordering instruction set, the ordering instruction (instruction 1 to Q) corresponding to the ordering instruction set is triggered, and the triggered ordering instruction set information is sent to the ordering module 4; each order placing instruction set corresponds to one or more order placing instructions, and after a certain order placing instruction set is triggered, the order placing instructions corresponding to the order placing instruction set are executed (the function of the instructions is written into the FPGA system in advance), for example, the executed order placing instructions can be instructions for buying or selling a certain financial product, buying and selling directions, prices, quantity and the like. The register unit 35 is respectively connected to the data format conversion unit 31, the logic operation unit 32, the condition decision unit 33, the instruction set unit 34, and the peripheral component (policy configuration module 5) of the automatic transaction system, and the register unit 35 can store data such as parameters configured by the policy configuration module 5 and configure the stored data such as parameters into the unit connected thereto.
The ordering module 4 comprises a plurality of ordering units 41 corresponding to the second network protocol processing unit, a user can order according to an order ordering instruction set triggered by the instruction set unit 34, and each ordering unit generates an accurate ordering message according to an ordering instruction input by the user and a corresponding market data protocol and sends the correct ordering message to the market trading terminals 1-N through a network. The specific information involved in placing orders during the financial product transaction includes: target, price and quantity.
The network protocol processing module 1, the market quotation conversion module 2, the automatic trading module 3 and the ordering module 4 of the automatic trading system are based on FPGA hardware, and the functions of the network protocol processing module 1, the market quotation conversion module 2, the automatic trading module 3 and the ordering module 4 are all realized by FPGA hardware logic circuits, such as network protocol analysis, market data protocol processing, trading logic and the like, so that the system can obtain extremely low delay. An operator writes codes and the like (such as network protocol analysis, market data protocol processing and transaction logic) corresponding to the functions of the modules into corresponding parts of the FPGA hardware logic circuit through an FPGA control component (not shown) so as to realize the functions. Furthermore, the operator may rewrite the function of the FPGA hardware circuit by the policy configuration module 5, and rewrite a code corresponding to a function to be realized by the FPGA control unit (not shown).
The financial product automatic transaction system related to the invention also comprises a strategy configuration module 5, wherein the strategy configuration module 5 is provided with an input/output unit 51 and an information calculation unit 52, a certain configuration protocol is stored in the module, an operator can check or monitor the processing result of the data in the system through the input/output unit 51, the operator can manually input information such as formula parameters, instruction parameters and the like required by each unit or module of the hardware system through the unit to carry out strategy configuration such as parameters and the like on the hardware part, and the strategy configuration is configured according to the configuration protocol stored in the module. The information calculation unit 52 can calculate information such as parameters required for the hardware system. Meanwhile, the hardware system can feed back the state configured according to the strategy configuration module 5, so that an operator can check the system state. Fig. 3 is a process flow diagram of an automated transaction system for financial products according to the present invention.
First, the market trading terminals 1 to N send market quotation data to the network protocol processing module 1 through the network, the network protocol processing module 1 receives a network data packet containing the market quotation data, then analyzes the network data packet according to a certain network protocol, analyzes the network data packet into a market quotation data packet and other information, and sends the analyzed market quotation data packet to the market quotation conversion module 2 (step S1). The market quotation conversion module 2 parses the received market quotation packet into specific market quotation data according to a specific market data protocol, and transmits the market quotation data to the automatic transaction module 3 (step S2).
The data format conversion unit 31 under the automatic transaction module 3 converts the received market quotation data according to a predetermined data structure stored in the data format conversion unit 31, converts the market quotation data with different formats into the market quotation data with the same format, and simultaneously, the data format conversion unit 31 filters a list of the market quotation data meeting the requirements according to a policy configured by an operator through a configuration protocol of the policy configuration module 5, so as to improve the efficiency of the automatic transaction module 3 accessing the market quotation data (step S3). Specifically, the data format conversion unit 31 converts the market quotation data into data in a fixed format according to a stored data structure, for example, the market quotation data can be converted into quotation information in two structures of Type1 and Type2, where Type1 includes level1 (the best buy/sell price in the current market, the corresponding consignment amount, and the like), level2 (including multi-level quotation, such as the level2 of the Shanghai stock exchange supports 10-level quotation, including buy/sell queues, the buy/sell price of each level, the consignment amount, the weighted price, and the like), and time information (the time data refers to the latest deal information, such as the latest deal price, deal amount, and the like of a certain stock); type2 includes information such as financial product code (symbol), exchange, financial product Type, channel id, markmaker id, etc., as well as some internal data structures that can be used to store a timestamp and some data information specific to the exchange; meanwhile, the data format conversion unit 31 stores the market quotation data after the format conversion in a storage unit (not shown) inside the unit, and feeds the market quotation data back to the input/output unit 51 of the policy configuration module 5, so that an operator can know the market quotation in time.
After the market quotation data format is converted, the logic operation unit 32 performs formula operation, calculates a derived value, and then sends the derived value of the logic operation to the condition decision unit 33, where the logic operation of the formula is written in the FPGA hardware in advance (step S4). Specifically, the logic operation unit 32 contains a plurality of operation formulas (formulas 1 to P), the operation formulas are formulas related to market quotation commands, and each operation formula result corresponds to a derivative value. The calculation of the derived values and the input of data such as parameters of formulas thereof are also different according to the market conditions: according to different types of market quotation data, the calculation of the derivative value can be divided into a Basket type calculation mode and a non-Basket type calculation mode; because the operator can monitor the market quotation data in real time through the policy configuration module 5, the operator can perform policy configuration on the parameters and data of the operation formula according to the monitored market quotation data (for example, the configuration data may be of Type3, and the Type3 includes information such as financial product codes, transaction and price); the parameters and data of the operation formula can also be directly read in the data format conversion unit 31 by the logic operation unit 32 (for example, data of Type1 or Type2 can be read). When the logical operation of the formula is finished to obtain the corresponding derivative value, the logical operation unit 32 sends the derivative value of the operation to the condition decision unit 33.
The condition decision unit 33 receives the derived values from the logic operation unit 32, compares the derived values with decision values stored inside the condition decision unit 33 (each derived value corresponds to one of the decision conditions in the condition decision unit 33), obtains decision results, and maps the decision results into binary codes to be sent to the instruction set unit 34 (step S5). The derived values are compared with the decision values according to the set decision conditions (decision conditions >, < or =), the decision result is whether the decision conditions are satisfied, if the decision result satisfying the decision conditions can be set to 1, the decision result not satisfying the decision conditions is set to 0, finally each derived value corresponds to the decision result of one binary code, the derived values correspond to the decision results of a plurality of binary codes, the decision results (0 or 1) are combined into the binary code, and the binary code is sent to the instruction set unit 34.
The instruction set unit 34 compares the received binary code with the binary code corresponding to each order instruction set stored in the instruction set unit 34, and if the received binary code is identical to the binary code in a certain order instruction set, the system triggers the order instruction set and executes the order instruction corresponding to the order instruction set; if the received binary code is different from the binary code in a certain ordering instruction set, no instruction is executed (step S6). The instruction set unit 34 stores an instruction set table, where a plurality of single instruction sets (each instruction set corresponds to a set of binary codes) are stored, and each single instruction set stores a plurality of instructions (for example, each single instruction set includes 16 single instructions, which may include 8 instructions of a Basket type and 8 instructions of a non-Basket type (single label)); the function of the instruction is written in the FPGA hardware in advance, and the order placing instruction can be buying or selling a certain financial product, buying and selling directions, buying and selling prices, buying and selling quantity and the like. When the binary code received by the instruction set unit 34 is the same as the binary code corresponding to a certain order-placing instruction set in the instruction set table, the order-placing instruction set in the instruction set table is triggered, and the order-placing instruction corresponding to the execution instruction set table is sent to the order-placing module 4; the instruction set may be determined according to market data, or may be configured by an operator through the policy configuration module 5.
After the ordering instruction is issued, the ordering module 4 receives the ordering instruction, and generates a correct ordering message according to the specific market data protocol, and sends the ordering message to the second network protocol processing module 12 (step S7). The second network protocol processing module 12 packages the correct ordering message into a network data packet according to the corresponding network protocol, and sends the packaged network data packet to the market information terminals 1 to M through the network (step S8).
The FPGA-based automated trading system for financial products further comprises a counter (not shown), a counter is arranged on an instruction set unit 34 of the system, the counter is used for controlling the number of orders, and the value of the counter is configured by an operator through the strategy configuration module 5. When the condition in a required condition combination is satisfied, an instruction set is found through the mapping relation, the instruction set has an ordering counter, if the value of the counter is larger than 1, the ordering instruction is executed, and the value of the counter is decreased. When the counter for the instruction set is zero, none of the ordering instructions for the instruction set are executed.
Each of the illustrated ordering instruction sets includes 16 ordering instructions, which may include, but are not limited to, 8 instructions of a Basket type and 8 instructions of a non-Basket type (superscript). The number of the order instructions in the order instruction set may be more or less than 16, wherein the number of the instructions of the Basket type and the number of the instructions of the non-Basket type are not limited to 8 respectively.
The condition decision unit compares the derived value obtained by the logic operation unit with the decision value under the decision condition, and maps the decision result to a binary code, but is not limited thereto. Other decision making approaches may be used.
The network protocol processing module 1, the market situation conversion module 2, the automatic trading module 3 and the ordering module 4 of the automatic trading system are all based on an FPGA hardware system, but are not limited to the FPGA hardware system. The automatic transaction module 3 may be provided only as FPGA hardware-based, and all or part of the network protocol processing module 1, the market condition conversion module 2, and the ordering module 4 may be designed not based on FPGA hardware but based on software. Likewise, the automatic transaction module 3 may also be based on a software design, and some or all of the other modules are based on FPGA hardware.
The following illustrates the process of processing of the automated transaction system to which the present invention relates.
Example 1: illustrative of processing of Basket-type financial products
If the market quotation data received by the data format conversion unit 31 is a package of Basket-type quotation data, it is necessary to calculate a derivative value of the Basket type. For example, when the whole set of the serial number is completely copied in the 300 th finger of Shanghai depth, the derivative value of the Basket type is calculated. The specific process is as follows.
The calculation formula of the Basket type derivative value can be as follows:
Figure DEST_PATH_IMAGE001
the formula is programmed into the hardware in advance.
When calculating the derivative value of the Basket type of the present profit in the period, setting two threshold values to calculate the Basket derivative value respectively, wherein one of each Basket has 302 monomials to be accumulated, and the weighted value of the item after the serial number 303 needs to be set to zero; two derived values at two thresholdsdev 1Anddev 2the calculation formulas of (a) and (b) can be respectively set as:
Figure 14889DEST_PATH_IMAGE002
1 configuring protocol and Filter List
1.1 filtering out the level1, level2 and time market data (Type 1) of 300 stocks in Shanghai-Tubifi;
1.2 Filter level1 and timeservice market data (Type 1) for stock index futures initiative contracts IF1406 (IF 1406 is a 14 year 6 month expiration, which contracts have expired, where this is used as an example only);
1.3 an operator, through a global variable (Type 3) that the policy configuration module 5 would provide, is placed in the register unit 35 and participates in the Basket derivative calculation.
2 calculating two Basket type derived valuesdev 1Anddev 2(the current price difference of the date under two different thresholds, respectively)
2.1 determination ofx
2.1.1 x 1Tox 300The price of the stock is the market price of 300 stocks, and the values of the stock price are divided into three categories: the first type of stock takes the timesale price, the second type of stock takes the level1 bid price, and the third type of stock takes the level1 ask price;
2.1.2 x301the price of ask1 for IF 1406;
2.1.3 x302base values stored in the register unit 35 configured by the policy configuration module 5 for the operator;
2.2 offsetis arranged in
2.2.1 offset of stock: (offset 1Tooffset 300) The stock offset of the upper certificate is 3 minimum price change units of the stock, and the stock of the deep certificateoffsetIs 2 minimum price change units of the stock;
2.2.2 offset 301an offset value for the price of IF1406, which is-1 stock refers to the minimum price movement unit for futures;
2.2.3 offset 302is the offset corresponding to the base value stored in the register unit 35, which is configured as zero;
2.3 wis arranged in
2.3.1 weight of stock: (w 1Tow 300) All are negative values, which are weights corresponding to each stock calculated by the strategy;
2.3.2 w 301is the weight of IF1406, set to 1;
2.3.3 w 302is the weight of the base value stored in the register unit 35, which is assigned to 1;
dev1 configuration of the constant C: 20,dev 2constant of
Figure DEST_PATH_IMAGE003
Comprises the following steps: 30 (constant C is for convenience will)devThe value is compared to 0);
2.4 calculation of the derivative valuedev 1Anddev 2
3, configuring a judgment condition: condition 1:dev 1>0. condition 2:dev 2>0。
4 configuration mapping and ordering instructions
4.1 mapping configuration from logic conditions to lower single instruction sets, wherein two different lower single instruction sets InstructionSetA and InstructionSetB are provided, and a mapping relation is established: mapping to InstructionSetA when the condition 1 is met and the condition 2 is not met, mapping to InstructionSetB when both the conditions are met, and not executing ordering under other conditions;
4.2 configuration of the order instruction:
4.2.1 InstructionSetA has a Basket ordering instruction, a maximum ordering number of the Basket is configured as 1, and the hardware records the ordering number of the strategy on one Basket in the instruction set. Configuring a single instruction under the Basket:
4.2.1.1 Standard: completely determined by strategy configuration, sell futures IF1406, buy 300 stocks in Shanghai-Shenshui;
4.2.1.2 price orders: futures are rated at the current bid1 price minus 1 stock refers to the minimum price change unit (0.2) for futures, the current ask1 price for each stock;
4.2.1.3 amounts: when the future is a fixed value of 1, the number of each stock is calculated by the information calculation unit 53 and provided to the hardware with a message of Type 3;
4.2.2 InstructionSetB differs from InstructionSetA in configuration by two points:
4.2.2.1 the price placed on the order of stock is more aggressive, with the price of stock current ask1 plus the minimum price change unit of 1 stock;
the maximum order count of 4.2.2.2 Basket is configured as 2, and it should be noted that: the targets of the baskets in the two instruction sets are the same, but the maximum ordering times are different, and the marks of the ordering times cannot be recorded only according to the targets;
the user can define the use of a derived value by himselfdevOr a plurality of derived valuesdevFor a formula of basket type, 8 derived values may be supporteddevThe user defines what condition the 1-8 values need to satisfy respectively according to needs, and then the following instruction can be triggered.
Example 2: illustrative of processing of non-Basket-type financial products
If the market quotation data received by the data format conversion unit 31 is only quotation data of a stock, it is necessary to calculate derivative values of non-Basket types, and 16 non-Basket derivative values (respectively, of the same financial product code (symbol) can be calculateddev 1dev 16). In the case of the non-baskets type, the formula used is not much the same as the baskets type, and 16 are supporteddevValue calculation, where parameters and data in the formula can also be obtained from type1, type2 messages, or configured by the user through type3 messages.
The specific process is as follows.
The calculation formula of the non-Basket type derivative value may be formula 1 to formula 3:
Figure 932029DEST_PATH_IMAGE004
equation 1
Figure DEST_PATH_IMAGE005
Equation 2
Character string comparison:dev i = string1, string2) formula 3.
1 configuring protocol and filter lists:
1.1 obtaining level1, level2 and time market data (Type 1) for all stocks of Nasidack and New Zealand;
1.2 get all the nanoscals' stock conversions to internal messages (Type 2).
2 configuration derivative value calculation: the derived values are all internal messages of market quote data converted Type2 for the same financial product code (symbol):
dev 1=(i32_value1) - 92800
dev 2=(i32_value1) - 92935
dev 3=(i32_value2) - 69
dev 4=(i32_value3) - 88
dev 5=(i32_value4) – 30000
dev 6=(i64_value1) – 5000000
dev 7=(i32_value5) – 66
dev 8=(i32_value6) – 50
dev 9=(i32_value7) – 100
dev 10=(i32_value8) – 1000
dev 11=250*abs(i32_value9 - i32_value10)
dev 12=150*abs(i32_value9 - i32_value10)
dev 13=5*(i32_value11)- (i32_value12)
dev 14=abs(i32_value15-i32_value10)–5*abs(i32_value16-i32_value10)
dev 15=strncmp(string_value1,”ADR”,3)
dev 16=strncmp(string_value2,”ACW”,3)。
3, configuring a judgment condition:
dev 1 >= 0
dev 2 < 0
dev 3 == 0
dev 4 == 0
dev 5 >= 0
dev 6 <= 0
dev 7 >= 0
dev 8 != 0
dev 9 >= 0
dev 10 >= 0
dev 11 <= 0
dev 12 < = 0
dev 13 <= 0
dev 14 >= 0
dev 15 == 0
dev 16 == 0。
4 configure mapping and order-placing instructions:
4.1 when 16 derived value conditions all meet the judgment condition, executing the instruction set, wherein the instruction set only has one financial product code (symbol) instruction, and the maximum ordering time on the financial product code (symbol) is 1;
4.2 the configuration of the instruction:
4.2.1 target: when the financial product code (symbol) field of the converted Type2 internal message derives the transaction direction (buy or sell) according to a field of int 32;
4.2.2 price: calculated separately according to different exchanges, the calculation data is derived from the Type2 internal message and the parameters configured by the policy configuration module 5: int32_ value7+ int32_ value8 weight1+int32_value*weight2Then converted to the price of the actual floating point number; (formula for hardware calculation price:
Figure 787465DEST_PATH_IMAGE006
4.2.3 amounts: calculated by the information calculation unit 53 and provided to the hardware through the policy configuration module 5.
Example 3: illustrative of the Process of selecting a financial product for option average (put-call priority)
A call option and put option pairing (same due date, same execution price and same target), a derivative value calculated by the option quotation corresponding to the target quotation, and the corresponding relation can be obtained without the need of hardware query, but the strategy configuration module 5 configures the options with specific corresponding relation.
The formula for calculating the derivative value of the option flat type may be:
dev 1 =
Figure DEST_PATH_IMAGE007
1 configuring protocol and filter lists:
1.1 obtaining the interestnLevel1 and timeservice market data for option contracts (Type 1);
1.2 obtaining the level1 and the time market data (Type 1) of the target stock corresponding to the option contract.
2 configuration derivative value calculation: (derivative calculation involves market price of paired two options contracts)
x 1Time price for the subject stock;
x 2the time price for the put option;
x 3the same execution price for call and put;
x 4the time price for call option;
w 3the value configuration calculated by the information calculation unit 53, and the other weight values are configured to 1;
c is a valence threshold configured as 5.
3, configuring a judgment condition: condition 1dev 1>0。
4 configure mapping and order-placing instructions:
4.1 the order placing instruction set is only one, the execution is carried out when the condition 1 is met, 1 Basket instruction is arranged in the instruction set, and the maximum order placing times on one Basket is 1;
4.2 Basket configured to match the option and corresponding stock mark of the current processing pair;
the amount is configured by the policy configuration module 5 and the price is determined by hardware taking the price of each target market plus an offset.
In the description of the related example of the invention, 2 derived values need to be calculated for the Basket type market quotation data in example 1, and the derived values correspond to 2 specific ordering instructions; in the example 2, 16 derivative values need to be calculated for market quotation data of a non-Basket type, and correspond to 16 specific ordering instructions; the market data of options in example 3 only calculates 1 derivative value corresponding to 1 specific order placing instruction, but is not limited thereto. The number of derivative values calculated for the different types of market data described above may be set by the operator, and is not limited to the 2, 16, and 1 described above.

Claims (14)

1. A client-side financial product automatic transaction system capable of automatically generating an ordering instruction according to a user's policy configuration and market information, comprising:
the input module is used for receiving market quotation data, analyzing the market quotation data into market quotation information and sending the market quotation information to the automatic trading module, wherein the market quotation information comprises the best buying/selling price and corresponding trading volume information on the current market, the related quotation data information of a large stock exchange and the latest trading information;
the automatic trading module is used for filtering the market quotation information and carrying out operation processing on the filtered market quotation information according to a configurable trading strategy so as to trigger a corresponding order placing instruction set, wherein the order placing instruction set comprises a plurality of order placing instructions for determining financial product trading;
the ordering module generates a correct ordering message from the ordering instruction set according to a corresponding market data protocol;
the output module is used for sending the ordering message to a trading market so as to carry out trading;
at least one of the input module, the output module and the automatic transaction module is realized based on an FPGA logic circuit;
the automatic trading system also comprises a strategy configuration module which is used for carrying out strategy configuration on parameters and data of a logic operation formula in the operation processing by a user according to market quotation data monitored in real time;
the automatic transaction module comprises a logic operation unit, a condition judgment unit and an instruction set unit, and the logic operation unit, the condition judgment unit and the operation of a plurality of formulas and a plurality of instructions in the instruction set unit are carried out in parallel in the FPGA logic circuit;
the logic operation unit is provided with a plurality of logic operation formulas, parameters and data of the logic operation formulas can be directly read according to strategy configuration performed by a user or the monitored market quotation information, and a corresponding derivative value is calculated in parallel for each logic operation formula based on the parameters and the data, wherein the calculation of the derivative value can be divided into a Basket type calculation mode and a non-Basket type calculation mode according to different types of the market quotation data;
the condition judgment unit is pre-stored with judgment conditions and judgment values, and can compare each derived value with the corresponding judgment value according to a certain judgment condition, finally each derived value corresponds to a judgment result of a binary code, and a plurality of judgment results are mapped into the binary code and sent to the instruction set unit;
the calculation of the plurality of logical operation formulas and the comparison of the plurality of derived values with the corresponding decision values may be performed in parallel;
the instruction set unit compares the received binary codes with the binary codes corresponding to each order instruction set stored in the instruction set unit, and when the received binary codes are completely the same as the binary codes in a certain order instruction set, the order instruction set is triggered and the order instructions corresponding to the order instruction set are executed.
2. The automated transaction system of claim 1, wherein:
the input module comprises a first network protocol processing unit, and the output module comprises a second network protocol processing unit;
the first network protocol processing unit receives a network data packet containing market quotation data, analyzes the network data packet into a market quotation data packet according to a network protocol and sends the market quotation data packet to the automatic trading module;
and the second network protocol processing unit receives the ordering message generated by the ordering module, encapsulates the ordering message into a network data packet and sends the network data packet to the trading market.
3. The automated transaction system of claim 2, further comprising:
the market quotation conversion unit is positioned between the first network protocol processing unit and the automatic trading module and used for analyzing market quotation data from a market quotation data packet analyzed by the first network protocol processing unit according to a market data protocol and sending the market quotation data to the automatic trading module; and
and the ordering module is positioned between the automatic transaction module and the second network protocol processing unit and used for controlling ordering according to an ordering instruction set of the automatic transaction module and sending the ordering message to the second network protocol processing unit.
4. The automated transaction system of claim 1, wherein:
the strategy configuration module is also used for realizing the transaction strategy of the user and configuring the work of the automatic transaction module according to the transaction strategy.
5. The automated transaction system of claim 4, wherein:
the automatic transaction module further comprises a register unit;
the strategy configuration module configures the working parameters of the automatic transaction module through the register unit.
6. The automated transaction system of claim 1, wherein:
the conditional decision unit decides a combination of a plurality of decision results corresponding to the plurality of derivative values;
the instruction set unit prestores the corresponding relation between the judgment result combination and the ordering instruction set, and executes the corresponding ordering instruction set according to the judgment result combination of the condition judgment unit.
7. The automated transaction system of claim 1, wherein:
the automatic trading module also comprises a market quotation format conversion unit which is used for converting the market quotation information received by the automatic trading module into market quotation information with a fixed format.
8. A client-side financial product automatic transaction method capable of automatically generating ordering instructions according to user strategy configuration and market quotation information comprises the following steps:
the method comprises the steps of inputting, receiving market quotation data and analyzing the market quotation data into market quotation information for the automatic trading step to use, wherein the market quotation information comprises the best buying/selling price and corresponding trading volume information on the current market, the related quotation data information of a large stock exchange and the latest trading information;
an automatic trading step, according to a configurable trading strategy, filtering the market quotation information and carrying out operation processing on the filtered market quotation information so as to trigger a corresponding order placing instruction set, wherein the order placing instruction set comprises a plurality of order placing instructions for determining financial product trading;
ordering step, generating ordering information from the ordering instruction set according to the corresponding market data protocol;
an output step of sending the ordering message to a trading market for trading;
wherein at least one of the inputting step, the outputting step and the automatic trading step is realized based on an FPGA logic circuit;
the method also comprises a strategy configuration step, wherein a user carries out strategy configuration on parameters and data of a logic operation formula in the operation processing according to market quotation data monitored in real time;
the automatic trading step comprises a logic operation step, a condition judgment step and an instruction generation step, wherein a plurality of formulas and a plurality of instructions in the logic operation step, the condition judgment step and the instruction generation step are operated in parallel in an FPGA logic circuit;
in the logical operation step, parameters and data of a plurality of logical operation formulas are directly read according to strategy configuration performed by a user or the monitored market situation information, and a corresponding derivative value is calculated in parallel for each logical operation formula based on the parameters and the data, wherein the calculation of the derivative value can be divided into a Basket type calculation mode and a non-Basket type calculation mode according to different types of the market situation data;
in the condition judgment step, using a pre-stored judgment condition and a judgment value, comparing each derived value with a corresponding judgment value according to a certain judgment condition, finally mapping a plurality of judgment results into binary codes, wherein each derived value corresponds to a judgment result of a binary code;
the calculation of the plurality of logical operation formulas and the comparison of the plurality of derived values with the corresponding decision values may be performed in parallel;
in the instruction generating step, the binary codes obtained in the condition judging step are compared with the binary codes corresponding to each pre-stored order instruction set, when the obtained binary codes are completely the same as the binary codes in a certain order instruction set, the order instruction set is triggered, and the order instructions corresponding to the order instruction set are executed.
9. The automated transaction method of claim 8, wherein:
the inputting step comprises a first network protocol processing step and the outputting step comprises a second network protocol processing step;
the first network protocol processing step receives a network data packet containing market quotation data and analyzes the network data packet into the market quotation data packet according to a network protocol;
and the second network protocol processing step receives the ordering message generated in the ordering step, encapsulates the ordering message into a network data packet and sends the network data packet to the trading market.
10. The automated transaction method of claim 9, further comprising:
a market quotation conversion step for analyzing market quotation data from the market quotation data packet analyzed in the first network protocol processing step according to a market data protocol; and
the ordering step is used for controlling ordering according to the ordering instruction set generated in the automatic trading step, and the ordering message is sent to a trading market in the second network protocol processing step.
11. The automated transaction method of claim 8, wherein:
the policy configuration step is further configured to accept a transaction policy of the user and configure the operation of the automatic transaction step accordingly.
12. The automated transaction method of claim 11, wherein:
in the strategy configuration step, the working parameters of the automatic trading step are configured through a register.
13. The automated transaction method of claim 8, wherein:
in the conditional decision step, deciding a combination of a plurality of decision results corresponding to the plurality of derivative values;
in the instruction generating step, the corresponding ordering instruction set is executed according to the corresponding relation between the prestored judgment result combination and the ordering instruction set.
14. The automated transaction method of claim 8, wherein:
the automatic trading step further comprises a market information format conversion step, wherein the market information received in the market information format conversion step is converted into market information in a fixed format.
CN201510448704.XA 2015-07-28 2015-07-28 Automatic trading system and automatic trading method for financial products Active CN105989538B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510448704.XA CN105989538B (en) 2015-07-28 2015-07-28 Automatic trading system and automatic trading method for financial products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510448704.XA CN105989538B (en) 2015-07-28 2015-07-28 Automatic trading system and automatic trading method for financial products

Publications (2)

Publication Number Publication Date
CN105989538A CN105989538A (en) 2016-10-05
CN105989538B true CN105989538B (en) 2021-11-02

Family

ID=57040485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510448704.XA Active CN105989538B (en) 2015-07-28 2015-07-28 Automatic trading system and automatic trading method for financial products

Country Status (1)

Country Link
CN (1) CN105989538B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106327331A (en) * 2016-08-18 2017-01-11 北京富盈通科技有限公司 Intelligent transaction system
CN107194811A (en) * 2017-05-18 2017-09-22 安徽磐众信息科技有限公司 A kind of high frequency transaction quantization system based on FPGA
CN107133873A (en) * 2017-06-12 2017-09-05 安徽简道科技有限公司 A kind of security sequencing transaction system and method for commerce
CN108230149B (en) * 2017-12-13 2021-10-22 武汉芯云道数据科技有限公司 System and method for accelerating financial transaction based on SOC FPGA
CN108769141A (en) * 2018-05-09 2018-11-06 深圳市深弈科技有限公司 A kind of method of multi-source real-time deal market data receiver and merger processing
CN110428331A (en) * 2019-07-22 2019-11-08 中国工商银行股份有限公司 Quantitative transaction data processing system and method based on cloud platform
CN110458704B (en) * 2019-08-15 2022-12-13 中国银行股份有限公司 Subscription-based transaction order generation method and device
CN112291041B (en) * 2020-10-22 2022-05-27 山东云海国创云计算装备产业创新中心有限公司 Data decoding device and method based on FPGA
CN112486274B (en) * 2020-11-12 2024-03-08 深圳宏芯宇电子股份有限公司 Computer expansion card and computer system
CN112487337A (en) * 2020-12-10 2021-03-12 盛立金融软件开发(杭州)有限公司 Market data interaction device, method and equipment
CN112506689B (en) * 2020-12-10 2023-08-11 盛立安元科技(杭州)股份有限公司 Heterogeneous counter system risk monitoring method, device, equipment and medium
CN112634041A (en) * 2020-12-28 2021-04-09 深圳华云信息系统有限公司 Financial transaction method, device and system based on FPGA
CN117788152A (en) * 2023-11-23 2024-03-29 中科驭数(北京)科技有限公司 Financial market data processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102246194A (en) * 2008-11-10 2011-11-16 索莫亚私人有限公司 Improved automated trading system
CN103425746A (en) * 2013-07-18 2013-12-04 大连理工大学 Real-time financial index market information parallel computing method based on FPGA
CN103500416A (en) * 2013-10-18 2014-01-08 擎研(上海)信息技术有限公司 Real-time automatic program trading system and trading method based on Internet
CN104599185A (en) * 2015-02-02 2015-05-06 恒生电子股份有限公司 Trading method, terminal and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102246194A (en) * 2008-11-10 2011-11-16 索莫亚私人有限公司 Improved automated trading system
CN103425746A (en) * 2013-07-18 2013-12-04 大连理工大学 Real-time financial index market information parallel computing method based on FPGA
CN103500416A (en) * 2013-10-18 2014-01-08 擎研(上海)信息技术有限公司 Real-time automatic program trading system and trading method based on Internet
CN104599185A (en) * 2015-02-02 2015-05-06 恒生电子股份有限公司 Trading method, terminal and system

Also Published As

Publication number Publication date
CN105989538A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
CN105989538B (en) Automatic trading system and automatic trading method for financial products
US11769203B2 (en) System and method for dynamically managing message flow
CN108234524A (en) Method, apparatus, equipment and the storage medium of network data abnormality detection
US7729978B2 (en) System and method for dynamically changing an electronic trade order quantity
CN102694733A (en) Method for acquiring network flow data set with accurate application type identification
US10810661B2 (en) Volume control for mass quote messages
CN111145029A (en) Futures and stock trading method, system and equipment based on big data
WO2017024020A1 (en) Real-time routing system and associated methodology for adapting order flow for enhanced execution performance
CN109688065A (en) Processing method, device and the storage medium of parameter
CN112364531A (en) Compound model construction method and device, electronic equipment and storage medium
CN110276691A (en) A kind of data processing method and device based on big data platform
CN103890802A (en) Methods and apparatus related to billing and accounting to establish asset value
US8412535B2 (en) Negotiation support systems and methods
CN109412885A (en) Detection method and device
CN109461081A (en) Credits capitalized method and device, storage medium, electronic device
WO2014023365A1 (en) Pre-match risk validation of orders
EP4277223A1 (en) Data processing method, apparatus and system, and storage medium
CN113746611B (en) Method for configuring timing value of signaling in communication, computer device and storage medium
RU2599951C2 (en) System for organizing electronic trade process using financial instruments
CN108335201B (en) Self-adaptive price difference transaction system and method based on FPGA
CN117896412A (en) Control method, device, terminal and storage medium of cloud robot
CN116827808A (en) Multi-equipment combined communication system, method and equipment based on industrial Internet of things

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 403, 4th floor, 3766 Nanhuan Road, Binjiang District, Hangzhou City, Zhejiang Province 310053

Applicant after: Shengli Anyuan Technology (Hangzhou) Co.,Ltd.

Address before: 310053 4th floor, new century building, 3766 South Ring Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: SHENGLI FINACIAL SOFTWARE DEVELOPMENT (HANGZHOU) Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant