Stock real-time K-line graph model reflecting trading volume by K-line thickness

By using the thickness and transparency changes of trading volume information in the K-line chart, the relationship between trading volume and price trend is intuitively displayed, which solves the problem that the existing K-line chart cannot intuitively display trading volume and price trend, and improves the decision-making efficiency of traders.

CN120147465APending Publication Date: 2025-06-13赵振宇
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510191287.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing K-line chart cannot intuitively display the relationship between trading volume and price trend, making it difficult for traders to make decisions quickly.

Method used

By visually displaying the transaction volume information with the thickness changes of the K-line, the price information of the traditional K-line chart is retained, and through technical means such as dynamic normalization and transparency changes, the close correlation between the transaction volume and price is achieved.

Benefits of technology

Enable traders to observe price trends and volume changes in the same chart at the same time, thereby making trading decisions more quickly and improving market dynamic perception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005280091280000021
    Figure BDA0005280091280000021
  • Figure BDA0005280091280000031
    Figure BDA0005280091280000031
  • Figure BDA0005280091280000041
    Figure BDA0005280091280000041
Patent Text Reader

Abstract

The invention relates to the technical field of stock market data analysis and visualization, in particular to a real-time visualization model for visually reflecting the trading volume through thickness changes of a K-line graph. According to the model, the trading volume information is visually displayed through the thickness change of a K line in an innovative visual mapping mode, so that a trader can observe the price trend and the trading volume change in the same graph at the same time, and a transaction decision can be made more quickly. According to the method, the trading volume is processed through a dynamic normalization method, and the perception ability of traders on market dynamics is further improved in combination with enhancement characteristics such as transparency change and volume-price departure prompt.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of stock market data analysis and visualization, and in particular to a real-time visualization model that intuitively reflects trading volume through the thickness change of K-line charts. Background Art

[0002] In the stock market, K-line charts are important tools for traders to analyze price trends. Traditional K-line charts represent the opening price, closing price, highest price, and lowest price of a stock through color (red for rising and green for falling) and the lengths of the real body and shadows. However, trading volume, as a key factor affecting price trends, usually requires a separate view of the volume chart, making it difficult for traders to intuitively grasp the relationship between price and volume simultaneously. This information dispersion leads to traders having to frequently switch views when analyzing the market, increasing the time cost and complexity of decision-making.

[0003] In addition, most existing stock visualization tools stay at the display of single-dimensional information and lack the ability to integrate multi-dimensional data. For example, although some platforms provide an overlay display of volume bar charts and K-line charts, this display method still cannot intuitively present the internal connection between trading volume and price trends. Therefore, a technical solution that can intuitively integrate volume information into K-line charts is needed to improve traders' perception of market dynamics. Summary of the Invention

[0004] The present invention aims to provide a real-time K-line chart model for stocks that reflects trading volume through the thickness of K-lines. By intuitively displaying trading volume information through the thickness change of K-lines, traders can observe price trends and volume changes simultaneously on the same chart, thus making trading decisions more quickly.

[0005] Technical Problem: Existing K-line charts cannot intuitively display the relationship between trading volume and price trends, making it difficult for traders to make decisions quickly.

[0006] The present invention solves the above problems through the following technical solutions:

[0007] (I) Transformation of Traditional K-lines

[0008] Retain the four elements of the opening price, closing price, highest price, and lowest price of the K-line chart to ensure the integrity of price information. This transformation does not change traders' cognitive habits of traditional K-line charts and provides a basis for introducing new visual mapping rules.

[0009] (II) Visual Mapping Rules

[0010] 1. Thickness: The width of the real body of the K-line is proportional to the current trading volume, intuitively reflecting the size of the trading volume.

[0011] 2. Transparency Aids: Optionally, overlay transparency changes to further reflect the changing trend of trading volume. This transparency change can be dynamically adjusted according to the size of the trading volume, making the high-volume areas more prominent and the low-volume areas relatively transparent.

[0012] (III) Volume Normalization

[0013] Through a dynamic normalization method, the trading volume is normalized to the range [0.1, 1], avoiding interference from historical extreme values while retaining the minimum width to ensure visibility. The normalization formula is as follows (Python):

[0014]

[0015] (IV) Width Mapping Function

[0016] Convert the normalized trading volume to the K-line width, with the formula as follows (Python):

[0017]

[0018] The design of the width mapping function is based on two key parameters: base width (base_width) and maximum width (max_width). The base width is used to ensure that the K-line still has a certain visibility at low trading volumes; the maximum width is used to limit the width of the K-line at high trading volumes, avoiding visual chaos caused by excessive width. By adjusting these two parameters, it is possible to flexibly adapt to the needs and preferences of different traders.

[0019] (V) Dynamic Visualization Scheme

[0020] 1. Real-time Data Stream Processing

[0021] Support time granularities for multiple cycles such as intraday, minute, and daily lines, and allow configuration of the trading volume reference window (e.g., the last N K-lines). This multi-cycle support enables traders to select the appropriate time granularity according to different trading strategies and analysis needs, thus better grasping market dynamics.

[0022] 2. Plotting Implementation

[0023] Implement the plotting of the K-line chart through Python code. The code is as follows (Python):

[0024]

[0025]

[0026] In the drawing implementation, the K-line entities are drawn using the Rectangle function of the matplotlib library, and the shadow lines are drawn using the vlines function. This implementation method not only ensures the visual effect of the K-line chart but also realizes the visualization of trading volume by dynamically adjusting the width. In addition, the time axis is formatted using the `xaxis_date` and `xaxis.set_major_formatter` functions, making the time labels clearer and more readable.

[0027] (VI) Enhancement Feature Optimization

[0028] 1. Visual Optimization

[0029] Dynamic transparency: By setting `alpha = 0.3 + 0.7 * norm_vol`, the transparency of the K-lines is dynamically adjusted according to the trading volume, making the high-volume areas more prominent and the low-volume areas relatively transparent.

[0030] 2. Interactive Features

[0031] In the web version, tooltips are displayed on mouse hover through pseudocode to enhance the user experience (javascript):

[0032]

[0033] Information such as price, trading volume, and width ratio is displayed on mouse hover, helping traders quickly obtain key data and improving analysis efficiency.

[0034] Technical Challenges and Solutions

[0035] Challenge 1: Extreme trading volume leads to width imbalance

[0036] Solution: Use logarithmic normalization or quantile truncation to avoid the influence of extreme values on width mapping. By adjusting the normalization formula, ensure that the K-line width changes within a reasonable range.

[0037] Challenge 2: K-line overlap causes visual chaos

[0038] Solution: Dynamically adjust the K-line spacing and highlight the current K-line on mouse hover to reduce visual interference and improve readability.

[0039] Challenge 3: Real-time data refresh performance

[0040] Solution: Adopt WebGL accelerated rendering technology combined with an incremental update strategy to only update the changed parts, reducing the computational and rendering burden and ensuring smooth display of real-time data.

[0041] Application Scenario Examples

[0042] (I) Identification of Main Force Abnormal Movements:

[0043] The suddenly thickened K-line indicates the entry of large orders, helping traders quickly identify the trend of major capital.

[0044] (2) Breakthrough verification:

[0045] When the price breaks through the previous high with increased trading volume (thick K-line), the credibility of the signal is increased, assisting traders in judging the effectiveness of the breakthrough.

[0046] (3) Monitoring of volume-price divergence:

[0047] The price continues to rise but the K-line gradually becomes thinner, warning of the exhaustion of the trend, helping traders to make early arrangements or adjust strategies. Specific implementation method

[0048] (1) Data acquisition:

[0049] Obtain real-time data of the stock market, including the opening price, closing price, highest price, lowest price and trading volume. The data can be obtained through the exchange interface or financial data providers.

[0050] (2) Data processing:

[0051] Use the dynamic normalization method to process the trading volume and calculate the width of the K-line according to the normalization result. The specific formula is as follows (python):

[0052]

[0053] (1) Plot implementation:

[0054] Use Python code to implement the drawing of the K-line chart, combined with dynamic width and transparency changes to enhance the visualization effect. The specific code is as follows (python):

[0055]

[0056]

[0057] (2) Enhancement feature implementation:

[0058] 1. Dynamic transparency: By adjusting the `alpha` value, dynamically change the transparency of the K-line according to the trading volume.

[0059] 2. Interactive function: Implement mouse hover to display prompt information in the web version to enhance the user experience.

[0060] VII. Summary

[0061] Through an innovative K-line chart model, the present invention visually displays trading volume information through the thickness changes of K-lines, solving the problem of scattered trading volume information in traditional K-line charts. Through enhancement features such as dynamic normalization methods and transparency changes, the present invention further improves traders' perception of market dynamics. The present invention not only improves the efficiency of trading decisions, but also provides new ideas and methods for the development of stock market visualization technology.

Claims

1. A real-time stock K-line chart model that reflects trading volume by K-line thickness, characterized by: The four elements of the traditional K-line chart, namely, opening price, closing price, highest price and lowest price, are retained. The size of the trading volume is directly reflected by making the width of the K-line entity proportional to the current trading volume. The trading volume is normalized to the interval [0.1,1] using a dynamic normalization method, and the normalized trading volume is converted into the K-line width through a width mapping function.

2. The real-time stock K-line chart model according to claim 1, characterized in that: Transparency changes can be optionally superimposed to further reflect the changing trend of volume.

3. The real-time stock K-line chart model according to claim 1, characterized in that: It supports multiple time granularities such as intraday, minute, and daily, and allows configuration of the volume reference window.

4. The real-time stock K-line chart model according to claim 1, characterized in that: Providing dynamic transparency to help traders identify market activity.

5. The real-time stock K-line chart model according to claim 1, characterized in that: Supports interactive functions of the Web version, and displays prompt information when the mouse hovers, including price, volume and width ratio.