30 knowledge points that must be mastered in quantitative development [What is the data of a piece by piece]?

Basic concepts of "tick-by-tick" and "tick-by-tick" data

Previously, we have initially introduced the difference between Level-1 and Level-2 data in " 30 Knowledge Points You Must Master in Quantitative Development [What is Level-2 Data]" . Today, let's study the tick-by-tick data and tick-by-tick data in detail .

If the market is compared to a non-stop video stream, then the market snapshot is a timed screenshot of this video stream, which is also the most intuitive understanding of the name of the snapshot (Snpashot). Since the Level-1 market only provides snapshot data, in order to reflect the data difference between two adjacent snapshots, the tick data came into being.

Tick ​​data, also known as time-sharing data or detailed data, is calculated by using the difference between the current snapshot market and the previous snapshot market . The purpose is to describe the market from more dimensions based on limited Level-1 market information Buying and selling power, transaction direction and other information.

insert image description here
First we need to understand some basic concepts:

insert image description here
In summary, it can be summed up as: "The outer disk is red, the inner disk is green, and it cannot be judged as neutral . "

Next, let's take a look at how the actual algorithm calculates the tick data .

Call auction stage¶

The call auction stage is a virtual transaction. The first sale is the matching volume and price, and the second sale is the amount that cannot be matched. Because there is no matching, there is no price. The displayed volume on Sell 2 = unmatched sell volume, and the displayed volume on Buy 2 = unmatched buy volume. At this time, the sell 2 volume is used as the internal order, the buy 2 volume is used as the external order, and the unmatched volume is taken as the buy 2 volume or sell 2 volume The larger of the quantities. The closing price of the call auction is fixed as the indistinguishable internal and external market, which is a neutral market.

Take Huatai Securities 601688.SH, 20210622 data as an example:

insert image description here

continuous bidding phase

If the first ask price is greater than 0, and the latest snapshot price is greater than or equal to the first ask price, it is an external offer.
If the bid price is greater than 0, and the latest snapshot price is less than or equal to the bid price, it is an internal market.
The ones that cannot be judged are neutral, and the displayed quantity is the difference between the trading volumes of the two snapshots.

Take Vanke A 000002.SZ, 20210712 day data as an example:
insert image description here

More informative tick-by-tick data

Tick-by-tick data , as the name suggests, refers to every transaction order and transaction information that occurs in real time in the market . It can present the current transaction details in the market at the most granular level. Through the tick-by-tick data, the current real-time state of the market can be restored. At present, the Level-2 market service of the Shanghai and Shenzhen Stock Exchanges can provide tick-by-tick data. Let's go deep into it and see how to use it!

Shenzhen Stock Exchange tick-by-tick data

insert image description here
It can be seen that the Shenzhen Stock Exchange reveals each order and transaction record, which can be associated with the original corresponding order record in the transaction, and reveals the cancellation information in the transaction by transaction, and the transaction details are clear at a glance.

SSE tick-by-tick data

insert image description here
The tick-by-tick transaction data of the Shanghai Stock Exchange is similar to that of the Shenzhen Stock Exchange, the main difference being the tick-by-tick entrustment data.

The SSE entrustment data reveals the remaining entrusted quantity after the transaction is matched. From the data in the above table, it can be seen that when all entrusted quantities are matched, the corresponding entrusted information will no longer be disclosed to the public. Unlike Shenzhen Stock Exchange, which discloses order cancellations in transaction-by-transaction transactions, order cancellations on the Shanghai Stock Exchange are disclosed in transaction-by-transaction entrustment data.

From the above comparison of Shanghai and Shenzhen tick-by-tick data, we can see that the tick-by-tick data of the Shenzhen Stock Exchange is easier to understand, while the tick-by-tick data of the Shanghai Stock Exchange is easier to build an order book.

In addition, in the process of actually using the entrustment data of the Shanghai Stock Exchange, the following information needs to be paid attention to:

  1. The valid orders received by the SSE during the call auction and trading suspension stage are not released in real time, but are released uniformly after the call auction or trading suspension stage ends;
  2. The order-by-order data generated by after-hours fixed-price transactions on the SSE will not be released;
  3. When the SSE cancels the order, the order number of the order cancellation order is the order number in the initial order-by-order order;
  4. For the tick-by-tick data issued in the same data channel, the SSE uses a unified number in the business for the message numbers in the tick-by-tick transaction data and the message numbers in the tick-by-tick entrustment data, which increase monotonically and continuously. The value of this number is irrelevant to the business, and In terms of technical reception, the one with the smaller number is not necessarily received first;
  5. The deal numbers in the deal-by-ticket deals of the SSE are individually numbered and monotonically increasing. However, the numerical value of the number has nothing to do with the message number or the order number.

From the above analysis process, it is not difficult to see that there are obvious limitations in the pen data . First of all, the sub-tick data only analyzes the data of active transactions from a statistical point of view, and does not reflect the information of passive transactions and orders. Secondly, there is a big difference between the transaction data and the real transaction. It is only the cumulative difference in the transaction results between the two snapshots, and many details of the transaction are missing. The above two limitations can be eliminated by using data one by one. This means that by accessing the transaction-by-transaction data, you can obtain more commission and transaction information in the market, and grasp market changes in a more accurate and timely manner!

In addition, at the technical level, the transaction-by-transaction data is Level-2 data provided by the exchange. It adopts a communication protocol with higher transmission efficiency, a technical system with lower delay, and a more reliable transmission mechanism. The overall data quality has achieved Level-2 -Up effect.

How to get market data

It is recommended to use the INSIGHT financial data service of Huatai Securities, which can push the raw market data of Level-2 stocks, bonds, funds, options, and futures in real time, as well as the derivative index data calculated based on the original market data.

The Shanghai and Shenzhen level1 market is completely free. Compared with the paid data provided by some other data providers, it is not only free but also fast and stable. It is highly recommended for everyone to use

For application see:
https://findata-insight.htsc.com:9151/help/sdk/SDKDownload/

insert image description here

Guess you like

Origin blog.csdn.net/weixin_38132951/article/details/125906450