CN106776692A - A kind of stock based on predefined pattern matching recommends share-selecting method - Google Patents

A kind of stock based on predefined pattern matching recommends share-selecting method Download PDF

Info

Publication number
CN106776692A
CN106776692A CN201610995452.7A CN201610995452A CN106776692A CN 106776692 A CN106776692 A CN 106776692A CN 201610995452 A CN201610995452 A CN 201610995452A CN 106776692 A CN106776692 A CN 106776692A
Authority
CN
China
Prior art keywords
stock
matching
pattern
share
tendency
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.)
Pending
Application number
CN201610995452.7A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201610995452.7A priority Critical patent/CN106776692A/en
Publication of CN106776692A publication Critical patent/CN106776692A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • 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/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

Recommend share-selecting method the invention discloses a kind of stock based on predefined pattern matching.The basic thought of method is pattern pre-defined first, such as reverse L type, the shares changing tendency pattern of big V-type, then carries out matching search with the recent tendency of all stocks by the pattern of definition;In order to preferably match tendency and non-specific amount of increase and amount of decrease, method needs to carry out all stock certificate datas the calculating pretreatment of benchmark closing price, the benchmark closing price specification that matching will be participated in is needed when matching simultaneously to [0,1] it is interval, carry out asymmetrical Dynamic Matching using dynamic time warping method afterwards;After matching result value is sorted from small to large, the minimum preceding T stock of numerical value is obtained as the candidate's stock recommended.The inventive method is a kind of share-selecting method, and the stock for recommending most like tendency can be given according to the preference pattern of user, so that for user selects stocks offer decision support.

Description

A kind of stock based on predefined pattern matching recommends share-selecting method
Technical field
The present invention relates to stock certificate data digging technology field, more particularly, to a kind of stock based on predefined pattern matching Recommend share-selecting method.
Background technology
With the ripe popularization with information technology of database technology, the data scale of relevant industries drastically expands.Expert The development of the knowledge discovering technologies such as system, artificial intelligence and machine learning so that " extracted from mass data or recognized effective , novel, potentially useful and final intelligible pattern " be possibly realized.
In recent years, in the financial field that data are extremely abundant, some analysis methods with stock market generation and development progressively Improve, such as:Dow analytic approach, K chart algorithms, point-and-figure chart analytic approach, the method for moving average, also have morphological analysis, become Potential analysis method, angle analysis method, mysterious series and golden section spiral calendar, four degree of space laws etc..However, these methods are only Only it is analysis means, can't directly predicts the dynamic of stock market.
Over time and memory technology development, increasing stock exchange data is stored.In sea Many useful information are often concealed in the stock exchange data of amount, data mining technology is thereby promoted and is led in stock analysis Application in domain.The method that stock certificate data is excavated, such as neutral net, evolution algorithm, fuzzy logic, rough set, SVMs Deng obtaining more and more extensive research and application.
The content of the invention
Recommend share-selecting method the invention discloses a kind of stock based on predefined pattern matching.The basic thought of method is Pattern, such as reverse L type, the shares changing tendency pattern of big V-type are pre-defined first, and the pattern that then will be defined is recent with all stocks Tendency carries out matching search;In order to preferably match tendency and non-specific amount of increase and amount of decrease, method needs to carry out all stock certificate datas The calculating pretreatment of benchmark closing price, while need the benchmark closing price specification that will participate in matching interval to [0,1] during matching, it Afterwards asymmetrical Dynamic Matching is carried out using dynamic time warping method;After matching result value is sorted from small to large, obtain The minimum preceding T stock of access value is used as the candidate's stock recommended.
The inventive method is a kind of share-selecting method, and the stock for recommending most like tendency can be given according to the preference pattern of user Ticket, so that for user selects stocks offer decision support.
The step of the inventive method, is as follows:
(1)It is the benchmark closing price on the basis of certain time point to the amount of increase and amount of decrease data prediction of every stock;
(2)Predefined pattern to be matched;
(3)Obtain every benchmark closing price data of stock recent a period of time;
(4)Standardization processing is carried out to recent benchmark closing price data;
(5)Pattern to be matched is carried out asymmetrical dynamic with the recent tendency application dynamic time warping method of every stock Match somebody with somebody, obtain matching distance;
(6)In all of matching, the strong matching stock list of obtaining mode, as recommendation stock list.
Wherein, for every stock in step (1), using certain time point as starting point, such as 2005-01-01, interception certainly should Time point is coming amount of increase and amount of decrease data now;Then the closing price of start time point is made on the basis of 1, the receipts of subsequent point in time Disk valency enters line translation and obtains according to amount of increase and amount of decrease, and the amount of increase and amount of decrease of such as second day is Change2, then the benchmark closing price of second day be: 1*(1+Change2/100);The amount of increase and amount of decrease of the 3rd day is Change3, then the benchmark closing price of the 3rd day be:1*(1+ Change2/100) (1+Change3/100);By that analogy, the benchmark closing price array of this stock is formed.
Wherein, the predefined pattern to be matched of step (2), such as reverse L type, big V-type isotype.Reverse L pattern formula refers to stock The low level adjustment of a period of time is first passed through, the tendency form for rapidly drawing high then is started in share price within the next few days.Big V-type pattern refers to Stock through rapidly drop after a while, then in the rapidly tendency form of pull-up suddenly of share price within the next few days.Such as reverse L type and greatly V-type pattern can be defined as:
MReverse L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1]
MBig V=[1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1]。
Wherein, in step (3), for every stock, from its benchmark closing price array, obtain in the recent period and predefined pattern The data of the L isometric day of trade.
Wherein, the recent benchmark closing price data in step (4) to every stock carry out standardization processing, used here as [0,1] interval format mode.Specially:Assuming that array A, A=[an at], t=1 ..., L, L are array length, to it [0,1] process of range format is:To each a in A arraystEnter line translation, at = (at-Min(A))/(Max(A)-Min (A)),t=1…L。
Wherein, pattern to be matched is matched with the recent tendency of every stock in step (5).When matching is using dynamic Between regular method, the time window of regular matching is set to 2, that is to say, that allow the asymmetric dynamic of 2 position deviations State is matched, and after calculating most short regular distance, obtains two matching distances of pattern.
Wherein, step (6) is after pattern to be matched is matched with the recent tendency of all stocks, matching distance to be arranged Sequence, obtains the minimum corresponding stock of T value of distance, constitutes strong matching stock list, and list stock is recommendation stock.
Brief description of the drawings
Fig. 1 is the flow chart that stock of the present invention based on predefined pattern matching recommends share-selecting method.
Fig. 2 is that predefined pattern carries out the schematic diagram that asymmetric dynamic is matched with the recent tendency of stock.
Fig. 3 is the recommendation stock list based on the inventive method output.
Here the reverse L pattern formula M that length is 30 has been pre-defined, has been specifically defined as:
MReverse L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1],
Then the value of T is 12, acquires the corresponding stock of preceding 12 smallest match values, constitutes strong matching stock list, defeated After going out as shown in Figure 3.
Fig. 4 is the recent typical reverse L type tendency of a certain stock.Fig. 4 be Fig. 3 obtain recommend stock list on the basis of, Check that certain only recommends the recent tendency of stock, such as National Travel Agency's joint -600358, the trend graph for being obtained.
Specific embodiment
Below in conjunction with the accompanying drawings and example, the present invention is described in detail.
The inventive method is scanned for, so as to match by pre-defined pattern in the recent tendency of all stocks Obtain the stock of similar tendency.
Assuming that stock list is S, S=[S1, S2,…,Si,…,Sn], n is the quantity of stock in stock pond, such as in China The quantity of city's stock or the quantity of listed stock of the U.S..
The pattern definition of the inventive method, pattern match and stock recommendation process are comprised the following steps that.
First, stock certificate data pretreatment.
For every stock, it is assumed that current stock is Si, i=1 ..., the specific pre-treatment steps of n are as follows.
1.1 for Stock Index Time Series Si, using certain time point as starting point, such as 2005-01-01, intercept from the time Put to come data now.
1.2 couples of SiCarry out following treatment:The closing price of start time point is made on the basis of 1, the receipts of its subsequent point in time Disk valency enters line translation and obtains according to amount of increase and amount of decrease, and the amount of increase and amount of decrease of such as second day is Change2, then the benchmark closing price of second day be: 1*(1+Change2/100);The amount of increase and amount of decrease of the 3rd day is Change3, then the benchmark closing price of the 3rd day be:1*(1+ Change2/100) (1+Change3/100);By that analogy, S is formediCorresponding benchmark closing price array MyClosei
After being pre-processed to all stocks, benchmark closing price two-dimensional array MyClose is eventually formed,
MyClose=[MyClosei], i=1,…,n。
2nd, stock pattern definition.
The step pre-defines pattern, such as reverse L type, big V-type isotype.
Reverse L pattern formula refers to the low level adjustment that stock first passes through a period of time, then starts rapidly to draw in share price within the next few days The tendency form for rising.
Big V-type pattern refer to stock through rapidly drop after a while, then in the rapidly pull-up suddenly of share price within the next few days Tendency form.
It is the pattern M of k for a length, M is defined as:M=[m0,…mj…mk], wherein j=[0, k].
It is element m inside the process of the artificial Setting pattern of simplification, patternjValue normally only take 0,1 two kinds of situations, generation Table low level and a high position.
Such as K=30, reverse L type and big V-type pattern can be defined as:
MReverse L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1]
MBig V=[1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1]
More fine and complicated pattern, such as schema elements m can certainly be setjValue is [0,1] interval arbitrary small number Value.
3rd, the acquisition of recent stock certificate data to be matched.
According to the length of pre-defined pattern, obtain to be matched from stock benchmark closing price two-dimensional array MyClose Stock certificate data.Assuming that define the pattern M that a length is k, then from stock list from the data for obtaining the recent k day of trade, Specially for each array MyClosei, intercept the benchmark closing price data of the recent k day of trade.For convenience of description, finally The two-dimensional array of formation is still designated as MyClose=[MyClosei], i=1 ..., n, the difference is that MyCloseiLength be only k, Specially:MyClosei= [C0,…Cj…Ck], wherein j=[0, k].
4th, stock certificate data is formatted.
This step recent benchmark closing price array MyClose further to being obtained in previous stepiIt is formatted place Reason.Used here as the formatting that [0,1] is interval.
Assuming that array A, A=[an at], t=1 ..., L, L are array length, to the process of its [0,1] range format For:To each a in A arraystEnter line translation, at = (at-Min(A))/(Max(A)-Min(A)),t=1…L
To MyCloseiAfter being formatted treatment, MyClose is still designated asi
5th, stock pattern match.
This step is matched with pre-defined pattern M with the stock two-dimensional array MyClose after formatting, for Every a line tuple MyClose in MyClosei, the matching process with the pattern M that its length is all k is as follows.
M is designated as X, MyClose by 5.1iY, wherein X are designated as, Y equal lengths are all k.
5.2 carry out X using dynamic time warping method (Dynamic Time Warping, DTW), and Y distances are calculated.
Because the value of k is typically not too large, the time window of regular matching is set to 2 here, then with Dynamic Programming Method seek two beeline Dist (X, Y) of time series X and Y.Assuming that i is the coordinate of X, j is the coordinate of Y, is needed here A regular path W is found, W must be from W1=(1,1) starts, to WL=(k, k) ends up, and ensures each coordinate in X and Y Occur all in W, while i and j must be monotone increasing.
Regular path is a most short regular path of distance:
D(i,j) = Distance(i,j)+min[D(i-1,j), D(i,j-1), D(i-1,j-1)]
Distance (i, j) is Euclidean distance.
Finally the most short regular distance of X and Y is:Dist(X,Y) = D(L1,L2)
All tuples in stock two-dimensional array MyClose are all matched with M, the matching distance one-dimension array with M is obtained DistM.Each element represents M and MyClose in arrayiDistance.
6th, the strong matching stock list of obtaining mode.
Array DistM is sorted from small to large, minimum preceding T corresponding stock of numerical value is obtained, these stocks are just Constitute the strong matching stock list of predefined pattern M.The T stock for being obtained is the stock of recommendation.
Here the acquirement of L values has following several method,
A. T value sizes, such as T=10 are manually set;
B. the length according to array DistM sets a percent value, so as to obtain T value sizes
C. according to the distribution of distance value in array DistM, a probability for distribution is set, so as to obtain T values.
In sum, the present invention proposes a kind of stock recommendation share-selecting method based on predefined pattern matching.Method is led to Pre-defined pattern is crossed, in the historical data of all stocks, with the dynamic time warping method search of asymmetric matching most Similar match pattern, stock list of the strong list of matches that will finally obtain as recommendation.Method can be selecting stocks for user Decision support is provided.
The inventive method is similarly applied to security class has the data of time series feature, such as fund, futures.Cause This, although disclosing specific embodiments and the drawings of the invention for the purpose of illustration, its object is to help understand in of the invention Hold and implement according to this, but it will be appreciated by those skilled in the art that:The essence of claim of the invention and appended is not being departed from In god and scope, various replacements, to change and modifications all be impossible.Therefore, the present invention should not be limited to most preferred embodiment and Accompanying drawing disclosure of that.Presently disclosed embodiment should be understood illustrative rather than it be claimed in all respects Scope limitation.

Claims (4)

1. a kind of stock based on predefined pattern matching recommends share-selecting method, it is characterised in that methods described includes following step Suddenly:
(1)It is the benchmark closing price on the basis of certain time point to the amount of increase and amount of decrease data prediction of every stock;
(2)Predefined pattern to be matched;
(3)Obtain every benchmark closing price data of stock recent a period of time;
(4)Standardization processing is carried out to recent benchmark closing price data;
(5)Pattern to be matched is carried out asymmetrical dynamic with the recent tendency application dynamic time warping method of every stock Match somebody with somebody, obtain matching distance;
(6)In all of matching, the strong matching stock list of obtaining mode, as recommendation stock list.
2. a kind of stock based on predefined pattern matching according to claim 1 recommends share-selecting method, it is characterised in that The definition mode of predefined pattern to be matched, only takes 0, and 1 two kinds of situations represent low level and a high position, and it is anti-to define typical module L-type and big V-type pattern;Simplified method to set up readily satisfies Manual definition's process of pattern.
3. a kind of stock based on predefined pattern matching according to claim 1 recommends share-selecting method, it is characterised in that Matched with predefined pattern pair as if all stock near-mid term amounts of increase and amount of decrease by benchmark closing price calculate, [0,1] range format Data after change, which allows to preferably match tendency rather than specific amount of increase and amount of decrease.
4. a kind of stock based on predefined pattern matching according to claim 1 recommends share-selecting method, it is characterised in that The matching process of predefined pattern and tendency, the method for using is dynamic time warping method, and what is carried out is asymmetrical dynamic Matching, the matching process more meets the actual conditions of stock.
CN201610995452.7A 2016-11-11 2016-11-11 A kind of stock based on predefined pattern matching recommends share-selecting method Pending CN106776692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610995452.7A CN106776692A (en) 2016-11-11 2016-11-11 A kind of stock based on predefined pattern matching recommends share-selecting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610995452.7A CN106776692A (en) 2016-11-11 2016-11-11 A kind of stock based on predefined pattern matching recommends share-selecting method

Publications (1)

Publication Number Publication Date
CN106776692A true CN106776692A (en) 2017-05-31

Family

ID=58973376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610995452.7A Pending CN106776692A (en) 2016-11-11 2016-11-11 A kind of stock based on predefined pattern matching recommends share-selecting method

Country Status (1)

Country Link
CN (1) CN106776692A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108765146A (en) * 2018-04-25 2018-11-06 武汉灯塔之光科技有限公司 The method and apparatus that a kind of basis has tracing pattern selection specific curves stock
CN114943255A (en) * 2022-05-27 2022-08-26 中信建投证券股份有限公司 Asset object form identification method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108765146A (en) * 2018-04-25 2018-11-06 武汉灯塔之光科技有限公司 The method and apparatus that a kind of basis has tracing pattern selection specific curves stock
CN114943255A (en) * 2022-05-27 2022-08-26 中信建投证券股份有限公司 Asset object form identification method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
Basodi et al. Gradient amplification: An efficient way to train deep neural networks
Feurer et al. Efficient and robust automated machine learning
Rani et al. Performance analysis of classification algorithms under different datasets
CN106909931A (en) A kind of feature generation method for machine learning model, device and electronic equipment
Gunaratne et al. Alternate social theory discovery using genetic programming: towards better understanding the artificial anasazi
Donalek et al. Feature selection strategies for classifying high dimensional astronomical data sets
CN106776692A (en) A kind of stock based on predefined pattern matching recommends share-selecting method
WO2017201605A1 (en) Large scale social graph segmentation
Yoshimori et al. Deep SAR matrix: SAR matrix expansion for advanced analog design using deep learning architectures
CN110808083A (en) Construction method of gene regulation network based on scRNA-seq and dynamic time warping
Zhu et al. An automatic identification method of imbalanced lithology based on Deep Forest and K-means SMOTE
Su et al. Searching for network width with bilaterally coupled network
CN102663430A (en) Object clustering method in situation assessment
Shi et al. Optimization and data mining for fracture prediction in geosciences
CN106529726A (en) Method of performing classification and recommendation based on stock prediction trends
CN106780020A (en) A kind of stock trend analysis and share-selecting method based on strong matching sequence
Zheng et al. Boosting feature-aware network for salient object detection
Nicart et al. Building document treatment chains using reinforcement learning and intuitive feedback
Meena et al. Cluster analysis to form similarity for major selected crops in Rajasthan, India
CN111967616B (en) Automatic time series regression method and device
Boudjeloud et al. Visual interactive evolutionary algorithm for high dimensional data clustering and outlier detection
Aaltio et al. Making sense of women entrepreneurship research: a qualitative meta-analytical review
Manzali et al. Classification algorithm using branches importance
Muñoz et al. INTEREST: a reference-point-based interactive procedure for stochastic multiobjective programming problems
CN113076695B (en) Ionosphere high-dimensional data feature selection method based on improved BBA algorithm

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531

RJ01 Rejection of invention patent application after publication