CN109544346A - A kind of controllable type investment combination share-selecting method based on AP clustering algorithm - Google Patents
A kind of controllable type investment combination share-selecting method based on AP clustering algorithm Download PDFInfo
- Publication number
- CN109544346A CN109544346A CN201811231235.6A CN201811231235A CN109544346A CN 109544346 A CN109544346 A CN 109544346A CN 201811231235 A CN201811231235 A CN 201811231235A CN 109544346 A CN109544346 A CN 109544346A
- Authority
- CN
- China
- Prior art keywords
- cluster
- stock
- num
- clustering algorithm
- investment combination
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/06—Asset management; Financial planning or analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Finance (AREA)
- Development Economics (AREA)
- Accounting & Taxation (AREA)
- Bioinformatics & Computational Biology (AREA)
- Probability & Statistics with Applications (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Entrepreneurship & Innovation (AREA)
- Evolutionary Computation (AREA)
- Game Theory and Decision Science (AREA)
- Human Resources & Organizations (AREA)
- Operations Research (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
The invention discloses a kind of controllable type investment combination share-selecting method based on AP clustering algorithm, step includes: the stock pond data obtained in fixed time period, calculate earning rate of each branch stock in the stock pond obtained in the fixed time period, controllable parameter is set, the cluster of time series is carried out using AP clustering algorithm, calculate the similarity matrix of each stock in stock pond, Attraction Degree matrix and degree of membership matrix, obtain cluster result, and combine controllable parameter, judged, until cluster result meets controllable parameter, the cluster centre in each cluster is chosen as investment combination according to cluster result, carry out investment analysis.The present invention selects stocks by using the AP cluster of controllable type, greatly control in AP cluster that the cluster class number that occurs is excessive/very few to be led to not carry out correct Portfolio Selection Problem, the independence chosen in investment combination between each branch stock is improved simultaneously, reduces investment risk.
Description
Technical field
The present invention relates to investment tactics fields, more particularly, to a kind of controllable type investment group based on AP clustering algorithm
Close share-selecting method.
Background technique
Investment way of the investor by assets investment in two or more financial product is known as investment combination.It throws
Providing Combination thought is that the wealth of investor is dispersed into more parts, the investment risk of investor is reduced, so that investor is not because of market
Fluctuation greatly brings unnecessary loss.And during the selection of investment combination, since the quantity of personal share is big, stock market is related
Property be affected, optimal investment combination candidate's stock is not easily found during stock selection, therefore in reality
Cannot evade in investment combination influences loss of assets brought by the risk of multiply due to one, is huge for investor
Challenge.
It is directed to investment combination to select stocks, many researchers are directed to investment combination research in recent years, they mainly pass through pair
The correlation of assets is analyzed, to obtain the less investment combination of each stock correlation.South China Science & Engineering University Sun Wei et al. is mentioned
A kind of fuzzy stochastic investment combination method is developed in fuzzy stochastic mean-standard deviation method out, solves different type investor's
Portfolio Selection Problem;Hunan University Wu Hui etc. proposes the theory converted based on macroeconomy, it is found that it has Portfolio Selection
Significant impact;Li Jianfu etc. studies Index Portfolio Selection weight mechanism select permeability, and discovery basic side method of weighting is being thrown
Behave oneself best in money combination.Research in recent years is based substantially on the conventional learning algorithms of traditional investment combination, by investment
The preference of person and relevant research of selecting stocks carried out to the fluctuation in market, but there is no the investment combination of stock selected by considering whether
Meet real investment value, and whether there is the ability for reducing risk;And research process is based on traditional statistical method, and
The machine learning bring method in reality is not accounted for, therefore investment combination research is also in an elementary step, Wu Fazhen
Just it is applied to market.Select stocks and whether meet the relativity problem of investment combination in the process, and corresponding to selecting stocks during be
It is no reach reduction select stocks risk the problems such as, be investment combination be worth research direction.
Summary of the invention
The present invention in order to overcome at least one of the drawbacks of the prior art described above, provide it is a kind of based on AP clustering algorithm can
Control formula investment combination share-selecting method.
The present invention is directed to solve above-mentioned technical problem at least to a certain extent.
Primary and foremost purpose of the invention is to provide a kind of controllable type investment combination share-selecting method based on AP clustering algorithm,
In order to solve the above technical problems, technical scheme is as follows:
A kind of controllable type investment combination share-selecting method based on AP clustering algorithm, the method includes following processing steps:
S1: the stock pond data in fixed time period are obtained;
S2: earning rate of each branch stock in the fixed time period in the stock pond of acquisition is calculated;
S3: setting controllable parameter;
S4: carrying out the cluster of time series using AP clustering algorithm, calculates the similarity matrix of each stock in stock pond, inhales
Degree of drawing matrix and degree of membership matrix obtain cluster result, and combine controllable parameter, are judged, until cluster result meets
Until controllable parameter;
S5: the cluster centre in each cluster is chosen as investment combination according to cluster result, carries out investment analysis.
Further, the fixed time period can customize setting, and the unit of period is day, and minimum time section is 30
It.
Further, each branch stock yield formula calculated in stock pond is as follows: P_value=(closei-
closei-1)/closei-1, wherein P_value indicates stock yield, represents increasing of the same day income compared to the income of yesterday
Long rate, closei represent stock same day closing price, and closei-1 represents stock proxima luce (prox. luc) closing price, and each branch stock is with earning rate
Based on the time series within the fixed section time.
Further, the controllable parameter includes number clus_num_max in maximum cluster, number clus_num_ in most tuftlet
Min, ideal number of clusters cluster_num;Number clus_num_max is used for when number is higher than in the cluster in cluster process in maximum cluster
Upper limit threshold numhWhen, carry out segmentation in subsequent cluster;Number clus_num_min is used for when the cluster in cluster process in most tuftlet
Interior number is lower than lower threshold numl, and when number in most tuftlet is not satisfied in the number in each cluster, carry out between subsequent cluster
Merge;Ideal number of clusters cluster_num is used for the asset allocation share for investor to investment and sets up, to meet investment
The number of the desired separated investment assets of person.
Further, the upper limit threshold numh, lower threshold numlIt is determined according to different number of clusters k, k gets N, N from 1
The sum for indicating stock records after carrying out k-means cluster in the case where different k average departure centre distance in class, and passes through
The mapping of elbow method judges number of clusters of the k corresponding to the maximum point of slope variation as cluster, calculating upper limit threshold value numh=N/ (k-
1), lower threshold numl=N/ (k+1).
Further, the cluster of time series, each branch stock energy in the stock pond of acquisition are carried out using AP clustering algorithm
It is enough as being the time series based on earning rate, or as the time series based on earning rate variation tendency.It is dimension with number of days
Degree, calculates the similarity matrix of each branch stock, obtains Attraction Degree matrix by similarity matrix and degree of membership matrix, update change
Generation, and controllable parameter is combined, carry out the cluster in stock pond.
Further, after carrying out AP cluster, candidate stock of the cluster centre as investment combination in each cluster is chosen.
Compared with prior art, the beneficial effect of technical solution of the present invention is:
The present invention selects stocks by using the AP cluster of controllable type, greatly controls the cluster class number occurred in AP cluster
Mesh is excessive/very few to be led to not carry out correct Portfolio Selection Problem, while being improved and being chosen in investment combination between each branch stock
Independence, reduce investment risk.
Detailed description of the invention
Fig. 1 is algorithm flow chart.
Fig. 2 is the daily earning rate information of 300 constituent stocks of Shanghai and Shenzhen wherein five stock in certain time.
Fig. 3 is that AP clusters similarity matrix.
Fig. 4 is stock principle of similitude figure.
Fig. 5 is that controllable type AP clusters flow chart a.
Fig. 6 is that controllable type AP clusters flow chart b.
Fig. 7 is that controllable type AP clusters flow chart c.
Specific embodiment
The following further describes the technical solution of the present invention with reference to the accompanying drawings and examples.
Embodiment 1
A kind of controllable type investment combination share-selecting method based on AP clustering algorithm, step include:
1. the stock pond for crawling in the fixed section time and (recommending 30≤day≤50) such as 300 constituent stocks of Shanghai and Shenzhen, upper card refer to
Number, Shenzhen Stock Exchange are used as stock pond at finger etc..The dimension that number of days is too long to will lead to cluster calculates excessive, and too short meeting of number of days is so that cluster
Accuracy is not high, and the set time is with day unit, the range of recommendation 30 to 50 days.
2. calculating each branch stock yield in stock pond, calculation formula is as follows:
P_value=(closei-closei-1)/closei-1,
Wherein, P_value indicates stock yield, represents growth rate of the same day income compared to the income of yesterday, therefore
Each branch stock is based on the time series within certain time of earning rate.The earning rate P_ of 5 stocks is had recorded in Fig. 2
The information of value, wherein have stock1, stock2, stock3, stock4, stock5, five stocks, △ (stocki,
Stockj), expression be stocki and stockj two stock earning rate difference, as shown be each of five stocks with
The earning rate difference of other stocks, from some date date (i), it can be seen that for stock1, stock2 compared to
The earning rate of stock3 is closer, and other periods are also in this way, therefore, one can consider that stock2 is phase from trend
It is similar to stock1, there is certain correlation.In stock3, stock4, stock5, stock4 and stock5 are in each time
The sum of yield gap in section is smaller than stock3, therefore one can consider that within the specific period, stock4 with
Stock5 has higher correlation.Therefore, by judging the deviation of the earning rate in certain time, it can be seen that its correlation
It influences, relativity measurement index is as follows:
P_value (stocka) indicates the earning rate of stock a, and P_value (stockb) indicates the earning rate of stock b
The distance of stock a and stock b in period date (i) to date (j) are indicated in Relation (stocka, stockb) formula
Difference, it can be understood as the Euclidean distance based on trend.In addition, other daily indexs, such as simple moving average also can be selected
The indexs such as SMA, weighted moving average WMA carry out clustering, and selection earning rate carries out analysis and is derived from earning rate more here
It can reflect the Long-term change trend of a stock, and calculate simply, be easy to get.
3.AP clustering algorithm carries out the cluster of time series, and each branch stock in the stock pond of acquisition is considered as to be based on
The time series of earning rate can also see the time series based on earning rate variation tendency as.Using number of days as dimension, each is calculated
The similarity matrix of stock, as shown in Figure 3.Similarity is regarded as ability of the stock A as the cluster centre of stock B, here
Using negative Euclidean distance, as shown in figure 4, if the value of S is bigger, similarity is higher, with stock stock1 and stock stock2
For, it can more illustrate stock stock1Ability as cluster centre is stronger.Furthermore Attraction Degree square is obtained by similarity matrix
Battle array and degree of membership matrix update iteration, and combine controllable parameter, carry out the cluster to stock pond.Attraction Degree matrix and return
The formula of category degree matrix is as follows:
Attraction Degree matrix calculates are as follows: Rt+1(i, k)=(1- λ) Rt+1(i,k)+λ·Rt(i,k)
Wherein, Attraction Degree matrix is updated to
λ in formula is learning rate, and value range [0.5,1), the convergence for algorithm.
Wherein Rt+1(i, k) indicate new point i for the Attraction Degree of point k, by i for k similarity S (i, k) and i for
The degree of membership A of other points (not including k)t(i, j) and the old Attraction Degree R for other pointst(i, j) is determined;Work as i
When with k being same, i.e., it need to be only compared by original similarity with the similarity of other points, choose maximum be used as more
Newly.The sum of angelica degree and Attraction Degree are bigger, then can illustrate that k is bigger as the probability of cluster centre.
Degree of membership matrix calculates are as follows: At+1(i, k)=(1- λ) At+1(i,k)+λ·At(i,k)
Wherein, degree of membership matrix update is
λ in formula is learning rate, and value range [0.5,1), the convergence for algorithm.
Wherein At+1(i, k) is new degree of membership matrix, indicate i belong to point k degree be have it is much, by comparing more
The Attraction Degree R of point k after newt+1Whether the size of the Attraction Degree of (i, k) and other points, decision-point i should be attributed to centered on point k
Class.
Attraction Degree matrix puts the ability for other each points as cluster centre, if it is bigger, the point to analyze certain
It can be used as a cluster centre;The ability which central point degree of membership matrix should be attributed to illustrate the point, angelica degree are got over
Height, then the point should be attributed in the corresponding highest point of degree of membership by explanation;One point of comprehensive descision belongs to center, is still attributed to
Some point, takes maximization to compare, to carry out the classification to point.The number in cluster is judged as shown in Fig. 5,6,7, after classification
Whether mesh meets set controllable factor, and separation or merging in cluster are carried out in the case of being unsatisfactory for, and obtains stock cluster to the end
As a result.
The terms describing the positional relationship in the drawings are only for illustration, should not be understood as the limitation to this patent;
Obviously, the above embodiment of the present invention be only to clearly illustrate example of the present invention, and not be pair
The restriction of embodiments of the present invention.For those of ordinary skill in the art, may be used also on the basis of the above description
To make other variations or changes in different ways.There is no necessity and possibility to exhaust all the enbodiments.It is all this
Made any modifications, equivalent replacements, and improvements etc., should be included in the claims in the present invention within the spirit and principle of invention
Protection scope within.
Claims (7)
1. a kind of controllable type investment combination share-selecting method based on AP clustering algorithm, which is characterized in that the method includes following
Processing step:
S1: the stock pond data in fixed time period are obtained;
S2: earning rate of each branch stock in the fixed time period in the stock pond of acquisition is calculated;
S3: setting controllable parameter;
S4: carrying out the cluster of time series using AP clustering algorithm, calculates the similarity matrix of each stock, Attraction Degree in stock pond
Matrix and degree of membership matrix obtain cluster result, and combine controllable parameter, are judged, until cluster result meets controllably
Until parameter;
S5: the cluster centre in each cluster is chosen as investment combination according to cluster result, carries out investment analysis.
2. a kind of controllable type investment combination share-selecting method based on AP clustering algorithm according to claim 1, feature exist
In the fixed time period can customize setting, and the unit of period is day, and minimum time section is 30 days.
3. a kind of controllable type investment combination share-selecting method based on AP clustering algorithm according to claim 1, feature exist
In each branch stock yield formula calculated in stock pond is as follows: P_value=(closei-closei-1)/closei-1,
In, P_value indicates stock yield, represents same day growth rate of the income compared to the income of yesterday, closeiRepresent stock
Same day closing price, closei-1Stock proxima luce (prox. luc) closing price is represented, each branch stock is based on earning rate in the fixed section time
Interior time series.
4. a kind of controllable type investment combination share-selecting method based on AP clustering algorithm according to claim 1, feature exist
In the controllable parameter includes number clus_num_max in maximum cluster, number clus_num_min, ideal number of clusters in most tuftlet
cluster_num;Number clus_num_max is used for when number is higher than upper limit threshold num in the cluster in cluster process in maximum clusterh
When, carry out segmentation in subsequent cluster;Number clus_num_min is used under number is lower than in the cluster in cluster process in most tuftlet
Limit threshold value numl, and when number in most tuftlet is not satisfied in the number in each cluster, merge between subsequent cluster;Ideal number of clusters
Cluster_num is used for the asset allocation share for investor to investment and sets up, for the desired separated for meeting investor
The number of investment assets.
5. a kind of controllable type investment combination share-selecting method based on AP clustering algorithm according to claim 4, feature exist
In the upper limit threshold numh, lower threshold numlIt is determined according to number of clusters k, k gets N from 1, and N indicates the sum of stock, record
Average departure centre distance in class is carried out after k-means cluster in the case where different k, and its slope is judged by the mapping of elbow method
Change k corresponding to maximum point, as the number of clusters of cluster, calculating upper limit threshold value numh=N/ (k-1), lower threshold numl=
N/(k+1)。
6. a kind of controllable type investment combination share-selecting method based on AP clustering algorithm according to claim 1, feature exist
In using the cluster of AP clustering algorithm progress time series, it is based on receipts that each branch stock in the stock pond of acquisition, which can be used as,
The time series of beneficial rate, or as the time series based on earning rate variation tendency.Using number of days as dimension, each branch stock is calculated
Similarity matrix, Attraction Degree matrix and degree of membership matrix are obtained by similarity matrix, update iteration, and combines controllable ginseng
Number carries out the cluster in stock pond.
7. a kind of controllable type investment combination share-selecting method based on AP clustering algorithm according to claim 1, feature exist
In, carry out AP cluster after, choose candidate stock of the cluster centre as investment combination in each cluster.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811231235.6A CN109544346A (en) | 2018-10-22 | 2018-10-22 | A kind of controllable type investment combination share-selecting method based on AP clustering algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811231235.6A CN109544346A (en) | 2018-10-22 | 2018-10-22 | A kind of controllable type investment combination share-selecting method based on AP clustering algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109544346A true CN109544346A (en) | 2019-03-29 |
Family
ID=65844162
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811231235.6A Pending CN109544346A (en) | 2018-10-22 | 2018-10-22 | A kind of controllable type investment combination share-selecting method based on AP clustering algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109544346A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110362558A (en) * | 2019-06-12 | 2019-10-22 | 广东工业大学 | A kind of energy consumption data cleaning method based on neighborhood propagation clustering |
CN111179077A (en) * | 2019-12-19 | 2020-05-19 | 成都数联铭品科技有限公司 | Method and system for identifying abnormal stock transaction |
-
2018
- 2018-10-22 CN CN201811231235.6A patent/CN109544346A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110362558A (en) * | 2019-06-12 | 2019-10-22 | 广东工业大学 | A kind of energy consumption data cleaning method based on neighborhood propagation clustering |
CN110362558B (en) * | 2019-06-12 | 2022-12-16 | 广东工业大学 | Energy consumption data cleaning method based on neighborhood propagation clustering |
CN111179077A (en) * | 2019-12-19 | 2020-05-19 | 成都数联铭品科技有限公司 | Method and system for identifying abnormal stock transaction |
CN111179077B (en) * | 2019-12-19 | 2023-09-12 | 成都数联铭品科技有限公司 | Stock abnormal transaction identification method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | An overview of personal credit scoring: techniques and future work | |
Balakrishnan et al. | A study of the classification capabilities of neural networks using unsupervised learning: A comparison with K-means clustering | |
Nguyen et al. | Learning pattern classification tasks with imbalanced data sets | |
Zhu et al. | Particle Swarm Optimization (PSO) for the constrained portfolio optimization problem | |
Witten et al. | Supervised multidimensional scaling for visualization, classification, and bipartite ranking | |
CN109034231A (en) | The deficiency of data fuzzy clustering method of information feedback RBF network valuation | |
CN110210973A (en) | Insider trading recognition methods based on random forest and model-naive Bayesian | |
CN109390037A (en) | The full site recognition methods of mature miRNA based on SVM-AdaBoost | |
CN109544346A (en) | A kind of controllable type investment combination share-selecting method based on AP clustering algorithm | |
Liang et al. | An Adaptive News-Driven Method for CVaR-sensitive Online Portfolio Selection in Non-Stationary Financial Markets. | |
CN109948534A (en) | The method for carrying out recognition of face is clustered using fast density peak value | |
Damoulas et al. | Inferring sparse kernel combinations and relevance vectors: an application to subcellular localization of proteins | |
Kadam et al. | Machine learning methode for automatic potato disease detection | |
CN117253550A (en) | Spatial transcriptome data clustering method | |
Khan et al. | DeepGene transformer: Transformer for the gene expression-based classification of cancer subtypes | |
CN111914900B (en) | User electricity utilization mode classification method | |
CN113688960A (en) | Grey wolf optimization GHFCM-based residential power data clustering method and device | |
Krawczyk et al. | Breast thermogram analysis using a cost-sensitive multiple classifier system | |
Ahmadi et al. | Model order selection for multiple cooperative swarms clustering using stability analysis | |
CN107909478A (en) | FOF mutual fund portfolio system and methods based on social network clustering and information gain entropy index | |
CN106354886A (en) | Method for screening nearest neighbor by using potential neighbor relation graph in recommendation system | |
Chang et al. | Stock portfolio construction using evolved bat algorithm | |
Li et al. | A fuzzy linear programming-based classification method | |
Bhat et al. | DeepCancer: Detecting cancer via deep generative learning through gene expressions | |
Wan et al. | Sddsmote: Synthetic minority oversampling technique based on sample density distribution for enhanced classification on imbalanced microarray data |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190329 |