Futures analysis method based on quadrilateral block diagram
Through the quadrilateral block diagram method, the time and price of the futures market are divided into regular grids, and the trading volume and position volume are used to represent the color, which solves the problem that the existing technology cannot comprehensively display multi-dimensional data of the futures market, and achieves a more comprehensive market behavior analysis.
Patent Information
- Application Number
- CN202510610452.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing futures market analysis methods such as K-line charts, volume bar charts, time-sharing charts and traditional heat charts cannot effectively combine price, time, trading volume and position volume, and it is difficult to provide intuitive market behavior insights.
The quadrilateral block diagram method is adopted to divide time and price into regular quadrilateral grids, and use color depth to represent trading volume or transaction density, and build a quadrilateral block diagram, combining position volume and long-short directions to provide dynamic market behavior analysis.
It realizes dynamic display of multi-dimensional data in the futures market, providing a more comprehensive insight into the market microstructure, especially suitable for programmatic trading and risk management.
Smart Images

Figure CN120525633A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of futures analysis and visualization, and in particular to a futures analysis method based on a quadrilateral block graph. Background Art
[0002] Currently, futures market analysis mainly relies on the following traditional technologies:
[0003] 1. K-line chart (candle chart): displays price fluctuations through opening price, closing price, highest price and lowest price.
[0004] Disadvantages: It cannot directly reflect the distribution of trading volume and it is difficult to identify key support / resistance levels.
[0005] 2. Volume Bars: Overlay volume data below the candlestick chart.
[0006] Disadvantages: Trading volume is separated from price, and it is impossible to directly observe the trading activity in the price range.
[0007] 3. Tick Chart: Plots price trends by time or number of transactions.
[0008] Disadvantages: High-frequency data has high noise, making it difficult to extract effective patterns.
[0009] 4. Traditional heatmap: Some financial software provides matrix-based heatmaps (such as the order book heatmap in the foreign exchange market).
[0010] Disadvantages: It is only applicable to fixed time windows and cannot dynamically adapt to the multi-dimensional data of the futures market (price, time, trading volume, and position size).
[0011] The Quadrilateral Binned Heatmap is a grid-based data visualization technique that visually illustrates market behavior by dividing the time and price dimensions into regular quadrilateral units and using color shading to represent trading volume or density. This technique, which combines statistics, data mining, and visualization methods, is widely used for microstructural analysis of financial markets, with particular advantages in futures trading.
[0012] To this end, a futures analysis method based on quadrilateral block graph is designed to provide another technical solution to the above technical problems. Summary of the Invention
[0013] Based on this, it is necessary to provide a futures analysis method based on quadrilateral block graph to solve the technical problems raised in the above background technology.
[0014] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0015] A futures analysis method based on quadrilateral block diagram, the steps are as follows:
[0016] S1: Data collection;
[0017] S2: Preprocess the data collected in step S1;
[0018] S3: Construct a quadrilateral mesh using the data processed in step S2;
[0019] S4: Fill the quadrilateral grid obtained in step S3 with the data processed in step S2 to obtain a quadrilateral block map;
[0020] S5: Count the transaction data in the quadrilateral block graph obtained in step S4;
[0021] S6: Confirm the futures trading status by changing the color of the quadrilateral block diagram obtained in step S4.
[0022] As a preferred embodiment of the futures analysis method based on quadrilateral block graph provided by the present invention, in step S1, the steps are as follows:
[0023] Collect real-time data from futures exchanges and data from historical databases;
[0024] The collected data includes at least timestamp, price range, and trading volume and open interest.
[0025] As a preferred embodiment of the futures analysis method based on quadrilateral block graph provided by the present invention, in step S2, the processing steps are as follows:
[0026] Fill in missing price or volume data through linear interpolation or forward filling;
[0027] Identify abnormal prices through volatility channels and use dynamic threshold methods to filter abnormal trading volumes;
[0028] Fix gaps or duplicate data by checking timestamp continuity, and verify price rationality through the price limits of futures contracts;
[0029] Convert the time in the data to local time.
[0030] As a preferred embodiment of the futures analysis method based on quadrilateral block graph provided by the present invention, in step S3, the steps are as follows:
[0031] A. Divide by time axis into single-day data and cross-day data;
[0032] B. Divide into different price axes according to different prices;
[0033] C. Based on the time axis and price axis obtained in steps A and B, establish a two-dimensional time-price coordinate system.
[0034] As a preferred embodiment of the futures analysis method based on quadrilateral block graph provided by the present invention, in step S4, the steps are as follows:
[0035] Assign the data processed in step S2 to different time axes according to the timestamp, assign the data in the price range to different price axes, and match the corresponding quadrilateral grids;
[0036] According to the timestamp and price range, fill in the corresponding transaction volume and position data.
[0037] As a preferred embodiment of the futures analysis method based on quadrilateral block graph provided by the present invention, in step S5, the steps are as follows:
[0038] 1) Accumulate the transaction volume of all transaction data of the grid in the quadrilateral block diagram in step S4 to obtain the cumulative total transaction volume of the corresponding grid;
[0039] 2) Accumulate the transaction amounts of all transaction data in the grids in the quadrilateral block diagram in step S4 to obtain the cumulative total amount of the corresponding grid, and obtain the highest transaction price, the lowest transaction price, and the price fluctuation range based on the different transaction amounts;
[0040] 3) Divide the cumulative total amount obtained in step 2) by the cumulative total transaction volume obtained in step 1) to obtain the average transaction price within the grid;
[0041] 4) Accumulate the changes in the holdings of the grids in the quadrilateral block diagram in step S4 to determine the ratio of long and short positions.
[0042] As a preferred embodiment of the futures analysis method based on quadrilateral block graph provided by the present invention, in step S6, the steps are as follows:
[0043] a. Determine the color depth based on the transaction volume or number of transactions in the quadrilateral grid in step S5;
[0044] b. Determine the color depth based on the value of the holding amount in the quadrilateral grid in step S5;
[0045] c. Determine the color depth based on the ratio of long and short positions in the quadrilateral grid in step S5.
[0046] It can be seen without a doubt that the above-mentioned technical solution of this application can definitely solve the technical problem to be solved by this application.
[0047] At the same time, through the above technical solutions, the present invention has at least the following beneficial effects:
[0048] The present invention provides a futures analysis method based on a quadrilateral block diagram. By incorporating dimensions unique to the futures market, such as open interest and long-short direction, into heat map analysis, it overcomes the limitations of traditional futures diagrams and provides futures traders with a more comprehensive insight into the market microstructure. It is particularly suitable for professional scenarios such as programmed trading, arbitrage strategy development, and risk management. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0050] Figure 1 Flowchart of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0052] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0053] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions therein may be combined with each other.
[0054] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0055] Example 1
[0056] refer to Figure 1 , a futures analysis method based on quadrilateral block graph, the steps are as follows:
[0057] S1: Data collection, the steps are as follows:
[0058] Collect real-time data from futures exchanges (such as official data sources such as CME, ICE, and Shanghai Futures Exchange), third-party data providers (such as Bloomberg, Wind, TradingView, etc.), and historical databases (which store opening prices, highest prices, lowest prices, closing prices, trading volumes, open interest, etc.);
[0059] The collected data shall include at least: timestamp, price range, trading volume and open interest;
[0060] The timestamp is accurate to the minute or second level;
[0061] The price range includes the highest price, lowest price and average transaction price in each time period;
[0062] Volume and open interest are used to distinguish between long and short positions;
[0063] It can also include data such as buy and sell order depth, large order transaction records, etc.
[0064] The steps to screen the collected data are as follows:
[0065] Distinguish between data suitable for short-term trading and data for long-term trend analysis;
[0066] The data for short-term trading is short-term data such as 1 minute and 5 minutes;
[0067] The data for long-term trend judgment include daily, weekly, monthly and other long-term data.
[0068] S2: Preprocess the data collected in step S1. The steps are as follows:
[0069] Fill in missing price or volume data through linear interpolation or forward filling;
[0070] Identify abnormal prices through volatility channels and use dynamic threshold methods to filter abnormal trading volumes;
[0071] Fix gaps or duplicate data by checking timestamp continuity, and verify price rationality through the price limits of futures contracts;
[0072] Convert the time in the data to local time to avoid time zone confusion.
[0073] S3: Construct a quadrilateral mesh using the data processed in step S2. The steps are as follows:
[0074] A. Divide data into single-day data and multi-day data according to the time axis. Single-day data is divided into 1 minute / 5 minutes / 15 minutes, etc., while multi-day data is divided into trading day / trading week;
[0075] B. Divide into different price axes based on price, such as crude oil futures divided by $0.5 / barrel and gold divided by $1 / ounce. Dynamic interval division can also be achieved by adjusting the price interval width based on the ATR indicator;
[0076] C. Based on the time and price axes obtained in steps A and B, establish a two-dimensional time-price coordinate system, where each grid cell represents a time period (X-axis) and a price range (Y-axis), for example, a 1-hour x 50 yuan / ton grid for copper futures.
[0077] S4: Fill the quadrilateral mesh obtained in step S3 with the data processed in step S2 to obtain a quadrilateral block map. The steps are as follows:
[0078] Assign the data processed in step S2 to different time axes according to the timestamp, assign the data in the price range to different price axes, and match the corresponding quadrilateral grids;
[0079] Fill in the corresponding transaction volume and position data according to the timestamp and price range;
[0080] A two-dimensional array or hash table stores the numbers filled in the quadrilateral grid, where the keys are time-price coordinates and the values are statistical data;
[0081] S5: Count the transaction data in the quadrilateral block graph obtained in step S4;
[0082] 1) Accumulate the transaction volume of all transaction data of the grid in the quadrilateral block diagram in step S4 to obtain the cumulative total transaction volume of the corresponding grid;
[0083] 2) Accumulate the transaction amounts of all transaction data in the grids in the quadrilateral block diagram in step S4 to obtain the cumulative total amount of the corresponding grid, and obtain the highest transaction price, the lowest transaction price, and the price fluctuation range based on the different transaction amounts;
[0084] 3) Divide the cumulative total amount obtained in step 2) by the cumulative total transaction volume obtained in step 1) to obtain the average transaction price within the grid;
[0085] 4) Accumulate the changes in the holdings of the grids in the quadrilateral block diagram in step S4 to determine the ratio of long and short positions.
[0086] S6: The futures trading status is confirmed by the color change of the quadrilateral block diagram obtained in step S4, so that the current futures transactions and changes in the amount can be quickly seen in a visual manner. The steps are as follows:
[0087] a. Determine the color depth based on the volume or number of transactions in the quadrilateral grid in step S5. The larger the volume or number of transactions, the darker the color; the smaller the volume or number of transactions, the lighter the color. This allows users to identify transactions based on color changes.
[0088] b. Determine the color depth based on the value of the holding amount in the quadrilateral grid in step S5. If the holding amount value is larger, the color is darker, and if the holding amount value is smaller, the color is lighter, so that the holding amount changes can be viewed according to the color change;
[0089] c. The color depth is determined based on the ratio of long and short positions in the quadrilateral grid in step S5. If long positions are dominant, the color is darker, and if short positions are dominant, the color is lighter. This allows you to see the ratio of long and short positions based on the color changes.
[0090] d. Render the quadrilateral block heat map obtained in steps a, b, and c using a data visualization tool (such as G2.js, D3.js, or Python's Matplotlib / Seaborn library).
[0091] In this embodiment, the colors in step a, step b, and step c can be different. The larger the trading volume or number of transactions in step a, the red color can be set, and the smaller the trading volume or number of transactions in step a, the light yellow color can be set. The larger the position value in step b, the blue color can be set, and the smaller the position value can be set to green. In step C, the color dominated by bulls can be set to red, and the color dominated by bears can be set to green, etc.
[0092] Example 2
[0093] An application method is disclosed based on the above-mentioned embodiment 1.
[0094] 1. Collect 1 year of COMEX gold futures daily data (time, opening price, highest price, lowest price, closing price, and trading volume).
[0095] 2. The price axis is divided by $5 / ounce, and the time axis is divided by trading day.
[0096] 3. Count the total transaction volume in each grid and map it to the color of the heat map.
[0097] 4. Through the color changes in the quadrilateral block chart, we can see that the 1800-1805 US dollar range continues to be dark, forming a strong support level; the color above 1850 US dollars quickly becomes lighter, indicating significant resistance.
[0098] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the contents of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A futures analysis method based on quadrilateral block graph, characterized in that: Here are the steps: S1: Data collection; S2: Preprocess the data collected in step S1; S3: Construct a quadrilateral mesh using the data processed in step S2; S4: Fill the quadrilateral grid obtained in step S3 with the data processed in step S2 to obtain a quadrilateral block map; S5: Count the transaction data in the quadrilateral block graph obtained in step S4; S6: Confirm the futures trading status by changing the color of the quadrilateral block diagram obtained in step S4.
2. A futures analysis method based on quadrilateral block graph according to claim 1, characterized in that: In step S1, the steps are as follows: Collect real-time data from futures exchanges and data from historical databases; The collected data includes at least timestamp, price range, and trading volume and open interest.
3. A futures analysis method based on quadrilateral block graph according to claim 1, characterized in that: In step S2, the processing steps are as follows: Fill in missing price or volume data through linear interpolation or forward filling; Identify abnormal prices through volatility channels and use dynamic threshold methods to filter abnormal trading volumes; Fix gaps or duplicate data by checking timestamp continuity, and verify price rationality through the price limits of futures contracts; Convert the time in the data to local time.
4. A futures analysis method based on quadrilateral block graph according to claim 1, characterized in that: In step S3, the steps are as follows: A. Divide by time axis into single-day data and cross-day data; B. Divide into different price axes according to different prices; C. Based on the time axis and price axis obtained in steps A and B, establish a two-dimensional time-price coordinate system.
5. The futures analysis method based on quadrilateral block graph according to claim 1, characterized in that: In step S4, the steps are as follows: Assign the data processed in step S2 to different time axes according to the timestamp, assign the data in the price range to different price axes, and match the corresponding quadrilateral grids; According to the timestamp and price range, fill in the corresponding transaction volume and position data.
6. A futures analysis method based on quadrilateral block graph according to claim 1, characterized in that: In step S5, the steps are as follows: 1) Accumulate the transaction volume of all transaction data of the grid in the quadrilateral block diagram in step S4 to obtain the cumulative total transaction volume of the corresponding grid; 2) Accumulate the transaction amounts of all transaction data in the grids in the quadrilateral block diagram in step S4 to obtain the cumulative total amount of the corresponding grid, and obtain the highest transaction price, the lowest transaction price, and the price fluctuation range based on the different transaction amounts; 3) Divide the cumulative total amount obtained in step 2) by the cumulative total transaction volume obtained in step 1) to obtain the average transaction price within the grid; 4) Accumulate the changes in the holdings of the grids in the quadrilateral block diagram in step S4 to determine the ratio of long and short positions.
7. A futures analysis method based on quadrilateral block graph according to claim 1, characterized in that: In step S6, the steps are as follows: a. Determine the color depth based on the transaction volume or number of transactions in the quadrilateral grid in step S5; b. Determine the color depth based on the value of the holding amount in the quadrilateral grid in step S5; c. Determine the color depth based on the ratio of long and short positions in the quadrilateral grid in step S5.