CN112257770B - K-line form recognition method - Google Patents

K-line form recognition method Download PDF

Info

Publication number
CN112257770B
CN112257770B CN202011119572.3A CN202011119572A CN112257770B CN 112257770 B CN112257770 B CN 112257770B CN 202011119572 A CN202011119572 A CN 202011119572A CN 112257770 B CN112257770 B CN 112257770B
Authority
CN
China
Prior art keywords
point
line
low
zig
new
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
CN202011119572.3A
Other languages
Chinese (zh)
Other versions
CN112257770A (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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN202011119572.3A priority Critical patent/CN112257770B/en
Publication of CN112257770A publication Critical patent/CN112257770A/en
Application granted granted Critical
Publication of CN112257770B publication Critical patent/CN112257770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/06Asset management; Financial planning or analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Game Theory and Decision Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Operations Research (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of computer software, and discloses a K-line shape recognition method which is used for solving the problem of K-line shape recognition. The invention comprises the following steps: (1) accessing a financial market data source; (2) finding out the high and low points of the closing price in the K line stage by using a ZIG function; (3) connecting high and low points of adjacent stages, and performing K line shape classification according to the relation of the high and low points of the K line stage to form a K line shape library; (4) setting the K-line state to be found, traversing the K-line state library, and finding out the corresponding K-line state in the K-line state library. The invention is suitable for K-line shape recognition.

Description

K-line form recognition method
Technical Field
The invention relates to the technical field of computer software, in particular to a K-line form identification method.
Background
The K-line chart is in the RibendeChuan curtain age, is used by traders in Japan rice market at that time to record market conditions and price fluctuations of rice market, and is introduced into financial markets due to the exquisite unique marking mode. The drawing method of the K line graph in the financial market comprises four data, namely the opening price, the highest price, the lowest price and the closing price, and all the K lines are unfolded around the four data to reflect the situation and the price information of the great situation.
Through the K line graph, the market condition performance of each day or a certain period can be completely recorded, after the price passes through a period of time, a special area or form is formed on the graph, and different forms show different meanings. We can feel some regularity from the change of these forms. Since the expression of the K-line graph is intuitive and easy to understand, the K-line graph analysis is also an important tool and means for technical analysis.
In the past analysts manually analyzed K-line graphs. The main basis of the method is the Eisenet wave theory. The theory holds that the K-line plot repeats a pattern continuously, each cycle consisting of 5 rising waves and 3 falling waves. Many of the eigter wave theories suffer from a problem, is it done by one wave and started by another? Sometimes the first wave is seen and the second wave is seen. Poor in millili and lost in thousand miles. The consequences of a misreading can be quite severe. Even if it is a complete wave, there is no clear definition, and the number of rise and fall in the actual K-line graph mostly does not appear in the mechanical mode of five-rise and three-fall. But wave theorists misinterpret that some of the rises and falls should not be counted into the waves. Waves are completely subjective at will.
Because the wave theory of the Aidit is a set of subjective analysis tools, no objective criteria exist. The problems of high error rate of K-line state recognition, low efficiency and the like are easily caused by the reasons of inconsistent levels of analysts, large number of K-lines and the like. People have therefore begun to think about machines to assist humans in recognizing K-line morphology. However, the problem encountered at present is that the K-ray is non-standard due to its complex and various forms. Wave theory cannot give the machine a quantifiable recognition criterion, so that the key points of the stage cannot be identified: the highest point and the lowest point are not ideal even if machine learning and artificial intelligence are applied.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a K-line shape recognition method is provided to solve the problem of K-line shape recognition.
In order to solve the problems, the invention adopts the technical scheme that: a K-line shape recognition method, comprising:
(1) accessing a financial market data source;
(2) finding out the high and low points of the closing price in the K line stage by using a ZIG function;
(3) connecting high and low points of adjacent stages, and then classifying K line forms according to the relation of the high and low points of the K line stage to form a K line form library;
(4) setting the K-line state to be found, traversing the K-line state library, and finding out the corresponding K-line state in the K-line state library.
Specifically, in the step (2), the method for finding the high and low points of the phase closing price by using the ZIG function is as follows,
ZIG function
Zig-zag direction, usage:
the function expression: ZIG (K, N, ABS);
the expression means:
turning to when the price change exceeds N%,
the meaning of K is:
0, opening price, 1, highest price, 2, lowest price, 3, closing price, 4, adopting lowest price at low point and adopting highest price at high point.
If ABS is 0 or omitted, relative ZIG steering is indicated, otherwise absolute ZIG steering is indicated.
For example:
ZIG (3, 5); the meaning of the expression is: ZIG turn 5% of closing price;
ZIG (3,0.5, 1); the meaning of the expression is: 0.5-membered absolute ZIG turn to closing price.
Take ZIG (3,5) as an example, 3 represents a closing price, and 5 represents 5%.
Further, after the stage high and low points are found in the step (2), the high and low points are respectively defined as a next-new high point, a next-new low point, a new high point and a new low point; the method for connecting the high points and the low points of the adjacent stages in the step (3) comprises the following steps: connecting a high point with a high point, and connecting a low point with a low point; and when the K line shape is classified, judging the sizes of the front and rear high and low points to realize the shape classification.
Further, the K-line shape is divided into four first-order shapes of greater than, less than, upward and downward in step (3), and if the new high point, the next-new low point, the new high point and the new low point are respectively recorded as A, B, C, D, the greater shape is expressed as: a > -C, B < ═ D; the less than class morphology is represented as: a < C, B > D; the upward morphology is represented as: a < C, B < ═ D; the downward morphology is represented as: a > -C, B > D.
The invention has the following beneficial effects: the invention introduces a brand-new K-line shape classification method when identifying the K-line shape, which is completely different from the prior method of realizing shape classification by using a calculation formula of the slopes of adjacent key points in the K-line or realizing shape classification by using convolution comparison of each position point in the K-line. Compared with other technologies, the method for finding the stage high and low points by using the technology can be completely quantized, and the technical parameters can be adjusted as required. The K-line morphology classification covers all morphologies in all and the classification can be extended as needed.
Drawings
FIG. 1 is a flowchart illustrating K-ray shape recognition according to an embodiment;
FIG. 2 is a schematic view of a larger scale than the figure;
FIG. 3 is a schematic diagram of a smaller than configuration;
FIG. 4 is a schematic view of the upward configuration;
FIG. 5 is a schematic view of the downward configuration.
Detailed Description
The invention finds out the high and low points of the stage by using a ZIG function through a computer and a steering principle when the relative variation of the price exceeds N percent. The problem that the highest point and the lowest point of the phase cannot be accurately found due to the fact that no quantitative standard exists in K-line state recognition is solved. After finding out the highest point and the lowest point, connecting the front and the back two adjacent highest points and connecting the front and the back two adjacent lowest points, the form of the K-line graph can be divided into one order: greater than, less than, upward, downward; the classification of morphology covers all K-line morphologies and can continue to be extended. Only one more adjacent highest point and one more lowest point are respectively added on the basis of the first-order form to form a second-order form: greater than form, greater than less than form, greater than upward form, greater than downward form, less than upward form, less than downward form, greater than form upward, less than form upward, upward form downward, greater than form downward, less than form downward, upward form downward, downward form downward. The second-order forms are 16 types, and are subdivided on the basis of the first-order forms. In the future, when a certain specified form appears again, the specified form can be quickly identified by a traversal method. Compared with manual work, the system improves efficiency and accuracy. Compared with other technologies, the method for finding the stage high and low points by using the technology can be completely quantized, and the technical parameters can be adjusted as required. The K-line morphology classification covers all morphologies in all and the classification can be extended as needed.
The embodiment provides a K-ray shape recognition method, as shown in fig. 1, which specifically includes the following steps:
(1) accessing a financial market data source;
(2) finding out the high and low points of the closing price in the K line stage by using a ZIG function;
i. if the following sequence is coiled, 100,96,104,105,99,107.
First, find the first number of deviations from 100 of 5%, obviously the first is 105 (point a), then 105 (point a), is greater than 100, then determine the first ZIG turn as a turn, at which time the apex of Λ should be found, first determine 105 if it is this ZIG break, as long as the first following point greater than 105 and all points within the interval of 105 this point, then this point is less than (1-0.05) × 105, then 105 is the ZIG break, if not, then see if the first point greater than 105 (assuming it is point B) is the ZIG break, the determination is the same as above, first following point greater than B is found, then this point is set as point C, then whether the minimum between B, C is less than 0.95B, if it is then B is the minimum, then either C is the C point or not.
The upper closing price is 99 met, so the first ZIG break point is 105,
further examples are 100,96,104,105,103,102,101,109,103,110,105.
Then this ZIG break point is 109.
But sometimes such situations are encountered, as also described above,
100,96,104,105,103,102,101,109,105,110,109;
thus, there is no zig (3,5) that corresponds to the line graph.
At this time, we can regard the last maximum (or minimum) as a temporary break point, which may not be the case as the curve lengthens as the subsequent values increase.
Therefore, the last break point of the ZIG may not be fixed at all times.
The formula: ZIG (3, PER)
ZIG outputs a numerical value, not a straight line. Only the inflection point has output, and the rest points are smooth connecting lines between the two inflection points. It makes no sense to say that the region is not an inflection point. The ZIG function expresses the inflection point.
Trajectory of ZIG function
The definition of the ZIG function is: the ZIG (K, N) function turns when the value K varies by more than N%.
The trajectory of this function is now known, taking the sun ZIG (3,5) as an example.
(a1) When the closing price rises and falls beyond 5%, the highest or lowest closing price is generated, and the steering occurs, the trajectory of the ZIG function is a straight line sequentially connecting each high point and each low point. The ZIG values for the days in the middle of the high and low points are linear interpolation values.
(a2) The last trading day does not reach 5% of the last highest or lowest closing price point, and the function track of the period is divided into two cases (taking the latest lowest closing price valley point as an example):
1) this period rises all the time without falling back and dropping the latest minimum closing price. The closing price of the last trading day is the ZIG function value of the day, the ZIG track of the period is that the closing price of the day and the lowest closing price draw a straight line, and the ZIG value of each day in the middle is the linear interpolation value of the closing price.
2) The latest minimum closing price is broken by falling back and falling after the period of rising. The ZIG function trajectory was the same as above for the days before the nearest valley point fell again and turned back up. When the steering return rise occurs again, the closing price of the dish is the lowest point in the day before the return rise, the closing price becomes a new steering valley point, and the original valley point disappears. The ZIG function trajectory is a connecting straight line from the newly turned valley point to the front high point. Therefore, after the lowest closing price before the falling and the breaking occurs, before the rising and the turning do not occur, the new low price is not taken as the turning point, and the original valley point becomes the turning point. This turning point disappears only if a turn occurs.
The change in function value of ZIG (3,15) is illustrated below with two examples in 2010.
(1)000989 JIUZHITANG.
The vertex 15.77 yuan appears at 22 month 2010. And 5,10, closing the tray by 13.28 yuan, and changing the ZIG to 13.28 yuan, wherein 15.79% of the top 15.77 yuan is dropped on the same day, and the condition of 15% of the top is met. And 5, 12 disc closing is carried out again and the disc falls to 12.34 yuan, the ZIG is equal to 12.34, the ZIG line is a straight line between 12.34 and a vertex 15.77 on the day, and the ZIG on the middle day is a linear interpolation value of the two points.
After 5 months and 12 days, the rice will become a valley point after one-time rising and 5 months and 12 days. And 6,10, closing 13.38, and keeping the ZIG equal to 13.38, wherein the ZIG line is a straight line between 13.38 of the day and 12.34 of 5 months and 12 days, and the ZIG of the middle day is a linear interpolation value of the two points.
And 6,10, then the product falls back, and 6, 29, the product takes 12.09 and falls through 12.34 of 5, 12. Month 7 and 5 reached a minimum of 10.98. During this period the day ZIG line was 12.34 for 5 months 12 to the day's inventory. It is noted here that after month 6 29, month 5 12 was not a valley point, but the system did not shift the valley point to a new low point, but rather a turning point remained at month 5 12.
6-rise in 7 months, closing the tray by 11.17, increasing the stock price by 11.17, forming a new valley point in 7 months 5, forming a ZIG line from 7 months 5 to 4 months 22, and leaving no turning point in 5 months 12.
From the above records, it can be explained that the lowest point of the ZIG function varies day by day. If today is lower than yesterday, today is the lowest point of the function. If today rises back, a valley point occurs today. Although the valley point appears, after falling back and passing the valley point in the later period, the former valley point becomes the turning point first, and finally the valley point disappears, and the lower point starting to rise back is taken as the valley point. If you buy on day 5, 12, then the loss will be lost by day 29, 6.
(2)002319 Letongguan. And 20 months later, the valley point appears in the period of 5 months, the stock price is reduced in the period of 6 months, 29 months later, the width of the valley point is increased by 16.67, and the turning condition is achieved. Month 6 30 falls back to the tray 21.04 so that month 6 29 becomes a vertex. Later days, the temperature gradually rose back and broke 21.72 in month 29, and the closing of 24.15 in month 2 in month 7, but ZIG was not from 18.60 to 24.15, but was still 18.60 to 21.72, and there was a turning point at 21.72, and then to 24.15. Month 7 5 falls back to tray 23.53, at which time 24.15 of month 7 and 2 become the apex.
(3) After high and low points of the phase are found out, the high and low points are respectively defined as a next new high point A, a next new low point B, a new high point C and a new low point D, the high point is connected with the high point, the low point is connected with the low point, and then K line shape classification is carried out according to the relation of the high and low points of the K line phase to form a K line shape library;
the K-line pattern morphology can be divided into four morphologies, greater than, less than, and upward and downward.
b1. Class > as shown in fig. 2: a > -C, B < ═ D;
for example, 000568 Luzhou Lao jiao,
a: time: 2020/01/13 closing price: 93.03
B: time: 2020/02/04 closing price: 72.12
C: time: 2020/02/20 closing price: 82.77
D: time: 2020/02/28 closing price: 74.80
b2. Less than class, as shown in FIG. 3: a < C, B > D;
for example, 600519 Guizhou Maotai,
a: time: 2020/02/20 closing price: 1118
B: time: 2020/02/28 closing price: 1057
C: time: 2020/03/05 closing price: 1171
D: time: 2020/03/19 closing price: 996
b3. Upward class, as shown in FIG. 4: a < C, B < ═ D;
for example, 600585A cement for conchs,
a: time: 2020/01/02 closing price: 55.80
B: time: 2020/02/03 closing price: 44.83
C: time: 2020/03/02 closing price: 60.31
D: time: 2020/03/19 closing price: 50.09
b4. Downward, as shown in FIG. 5: a > -C, B > D.
For example, 601318 is safe in China,
a: time: 2020/02/20 closing price: 83.28
B: time: 2020/02/28 closing price: 77.72
C: time: 2020/03/05 closing price: 82.45
D: time: 2020/03/23 closing price: 66.76
(4) The system sets the K line state to be found, traverses the K line state library, and finds out the corresponding K line state from a plurality of K lines in the K line state library.

Claims (1)

1. A K-ray shape recognition method is characterized by comprising the following steps:
(1) accessing a financial market data source;
(2) finding out high and low points of the closing price in the K line stage by using a ZIG function, and respectively defining the high and low points as a next-new high point, a next-new low point, a new high point and a new low point;
(3) connecting high and low points of adjacent stages, and classifying K-line states according to the relation of the high and low points of the K-line stage to form a K-line state library; the method for connecting the high points and the low points of the adjacent stages comprises the following steps: connecting a high point and a high point, and connecting a low point and a low point; when the K line form is classified, the sizes of the front and rear high and low points are judged to realize form classification;
(4) setting a K line state to be found, traversing a K line state library, finding a corresponding K line state in the K line state library, dividing the K line state into four first-order forms of a higher form, a lower form, an upper form and a lower form, and if a next new high point, a next new low point, a new high point and a new low point are respectively recorded as A, B, C, D, the higher form is expressed as: a > ═ C, B < ═ D; the less than class morphology is represented as: a < C, B > D; the upward morphology is represented as: a < C, B < ═ D; the downward morphology is represented as: a > -C, B > D.
CN202011119572.3A 2020-10-19 2020-10-19 K-line form recognition method Active CN112257770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011119572.3A CN112257770B (en) 2020-10-19 2020-10-19 K-line form recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011119572.3A CN112257770B (en) 2020-10-19 2020-10-19 K-line form recognition method

Publications (2)

Publication Number Publication Date
CN112257770A CN112257770A (en) 2021-01-22
CN112257770B true CN112257770B (en) 2022-05-06

Family

ID=74244956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011119572.3A Active CN112257770B (en) 2020-10-19 2020-10-19 K-line form recognition method

Country Status (1)

Country Link
CN (1) CN112257770B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2021466668A1 (en) 2021-09-30 2024-04-18 Futu Network Technology (shenzhen) Co., Ltd. K-line form recognition method, and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106447494A (en) * 2015-08-01 2017-02-22 郑志豪 Security analysis system and method based on graphical recognition
CN107294093A (en) * 2017-07-26 2017-10-24 广东电网有限责任公司电力科学研究院 Electric power data analysis method, device and intelligent terminal based on K line charts
CN107833258A (en) * 2017-10-16 2018-03-23 刘军 K line charts method for drafting and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101665049A (en) * 2009-09-24 2010-03-10 杨颐 Stock K-line analysis ruler
CN102110273A (en) * 2009-12-29 2011-06-29 黄肇基 Method for interpreting trend of K-line structure diagram by utilizing pearl colour-ribbon diagram
CN102737344A (en) * 2012-06-29 2012-10-17 裘海雯 Method and system for recording security price operation trend according to security trading data
CN105701450B (en) * 2015-12-31 2019-10-08 上海银赛计算机科技有限公司 The recognition methods of K line morphology and device
CN106779167A (en) * 2016-11-23 2017-05-31 上海银天下科技有限公司 The method and device of forecast price tendency flex point
CN108389248B (en) * 2017-12-29 2021-11-23 广州金十信息科技有限公司 Animation scaling method of K-line graph, electronic equipment and storage medium
CN110796006A (en) * 2019-09-27 2020-02-14 鹏城实验室 Stock K-line image identification method and device, intelligent terminal and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106447494A (en) * 2015-08-01 2017-02-22 郑志豪 Security analysis system and method based on graphical recognition
CN107294093A (en) * 2017-07-26 2017-10-24 广东电网有限责任公司电力科学研究院 Electric power data analysis method, device and intelligent terminal based on K line charts
CN107833258A (en) * 2017-10-16 2018-03-23 刘军 K line charts method for drafting and device

Also Published As

Publication number Publication date
CN112257770A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
Tay et al. ε-descending support vector machines for financial time series forecasting
Kurbalija et al. The influence of global constraints on similarity measures for time-series databases
Procacci et al. Forecasting market states
CN112257770B (en) K-line form recognition method
CN109727446A (en) A kind of identification and processing method of electricity consumption data exceptional value
CN102682089A (en) Method for data dimensionality reduction by identifying random neighbourhood embedding analyses
CN114015825A (en) Method for monitoring abnormal state of blast furnace heat load based on attention mechanism
CN110059126B (en) LKJ abnormal value data-based complex correlation network analysis method and system
Wu et al. A hybrid stock market prediction model based on GNG and reinforcement learning
CN114971055A (en) Optimization method for outlier data identification in traffic emission quota allocation process
CN101826070A (en) Key point-based data sequence linear fitting method
CN111967616B (en) Automatic time series regression method and device
Park et al. Machine learning models based on bubble analysis for Bitcoin market crash prediction
CN116384310B (en) Self-adaptive layout method and system of programmable logic device
Zhang et al. Spatial weighted graph-driven fault diagnosis of complex process industry considering technological process flow
CN113065970A (en) Option implied fluctuation rate and price analysis system based on fusion characteristics
Zhang et al. Probabilistic score estimation with piecewise logistic regression
CN111737308A (en) Stock exchange point prediction method, system and storage medium based on minimum entropy score
CN114844696B (en) Network intrusion dynamic monitoring method, system, equipment and readable storage medium based on risk pool minimization
CN111143425A (en) XGboost-based high-dimensional data set adaptive feature selection method
CN112132352A (en) Stock price trend prediction method based on attention and dense connection
US20060155394A1 (en) Method and apparatus for order-preserving clustering of multi-dimensional data
Park et al. Improved predictive deep temporal neural networks with trend filtering
CN112506984A (en) Method and system for analyzing influence of change trend of multiple indexes based on machine learning
CN106530087A (en) Stock historical data segmenting method based on inflection point detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant