CN110322347A - A kind of shot and long term strategy multiple-factor quantization capitalized method and device - Google Patents

A kind of shot and long term strategy multiple-factor quantization capitalized method and device Download PDF

Info

Publication number
CN110322347A
CN110322347A CN201910340352.4A CN201910340352A CN110322347A CN 110322347 A CN110322347 A CN 110322347A CN 201910340352 A CN201910340352 A CN 201910340352A CN 110322347 A CN110322347 A CN 110322347A
Authority
CN
China
Prior art keywords
stock
day
factor
prediction model
short
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
CN201910340352.4A
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.)
University of Science and Technology Beijing USTB
Original Assignee
University of Science and Technology Beijing USTB
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 University of Science and Technology Beijing USTB filed Critical University of Science and Technology Beijing USTB
Priority to CN201910340352.4A priority Critical patent/CN110322347A/en
Publication of CN110322347A publication Critical patent/CN110322347A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Human Resources & Organizations (AREA)
  • Operations Research (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention provides a kind of shot and long term strategy multiple-factor quantization capitalized method and device, being capable of investment return.The described method includes: obtaining stock historical data;Determining, which influences several big stock impact factors as the impact factor of long and short phase strategy prediction model to stock yield, combines;Stock yield is calculated according to closing price on the two adjacent in stock historical data, stock label is determined according to earning rate;Corresponding historical data and stock label are combined according to determining impact factor, constructs long and short phase Strategies Training collection respectively;According to the long term policy training set of building training long term policy prediction model, and according to the short-term strategies training set of building training short-term strategies prediction model;The prime investment stock portfolio that quantization is invested on the day of determining prediction day according to trained long and short phase strategy prediction model.The present invention relates to financial investment fields.

Description

A kind of shot and long term strategy multiple-factor quantization capitalized method and device
Technical field
The present invention relates to financial investment field, a kind of shot and long term strategy multiple-factor quantization capitalized method and dress are particularly related to It sets.
Background technique
Quantization investment is to realize the quantitative management of investment of stock using computer technology and historical data modeling method, Seek effective investment tactics based on mathematical model and data statistics, obtains continuous income.
In recent years, with the rapid development of information technology, the quantization for needing a large amount of statistical mathematics and computing technique to support is thrown Money has obtained more extensive utilization.In existing magnanimity financial market data, extraneous multifactor impact is overcome, establish more smart Close effective investment model has important theoretical value and practical significance.
Different features is presented on long-term and short period in the market price of stock, in the prior art, generally using single One data (long-term/short-term) carry out quantization investment and select stocks, and cause investment return unstable.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of shot and long term strategy multiple-factors to quantify capitalized method and device, with It solves to carry out quantifying to invest selecting stocks using single data present in the prior art, leads to the problem that investment return is unstable.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of shot and long term strategy multiple-factor quantization capitalized method, Include:
Obtain stock historical data, wherein the stock historical data includes: a variety of stock impact factor historical datas;
Determining influences influence of several the big stock impact factors as long and short phase strategy prediction model to stock yield Combinations of factors;
Stock yield is calculated according to closing price on the two adjacent in stock historical data, stock mark is determined according to earning rate Label;
Corresponding historical data and stock label are combined according to determining impact factor, constructs long and short phase strategy instruction respectively Practice collection;
According to the long term policy training set of building training long term policy prediction model, and according to the training of the short-term strategies of building Collect training short-term strategies prediction model;
The prime investment stock group that quantization is invested on the day of determining prediction day according to trained long and short phase strategy prediction model It closes.
Further, the type of stock impact factor include: the market factor, the financial factor, the valuation factor, scale factor with And technique factor.
Further, determining that several stock impact factors big on stock yield influence are pre- as long and short phase strategy It surveys before the impact factor combination of model, which comprises
Remove the null value in stock historical data;
Each column of stock historical data after removal null value are standardized, wherein standardization formula indicates are as follows:
Wherein, y1,y2,...,ynFor the new sequence after standardization, x1,x2,...,xnOriginal series before indicating standardization,Indicate that serial mean, s indicate variance, n indicates the number of the stock obtained.
Further, the determination influences several big stock impact factors as long and short phase strategy to stock yield The impact factor of prediction model combines
Determine the stock impact factor historical data after standardizing to the influence degree of stock yield;
From big to small according to influence degree, stock impact factor is ranked up;
It is combined top n stock impact factor as the impact factor of long and short phase strategy prediction model, wherein N first Preset value.
Further, earning rate of the every stock at (i-1)-th day closing quotation moment to i-th day closing quotation moment indicates are as follows:
Further, described to determine that stock label includes: according to earning rate
For long term policy prediction model, i-th day earning rate is more than or equal to mark of the stock of the second preset value at i-th day Label are labeled as third preset value, and i-th day earning rate is pre- labeled as the 4th in i-th day label less than the stock of the second preset value If value;
For short-term strategies prediction model, i-th day earning rate is more than or equal to mark of the stock of the 5th preset value at i-th day Label are labeled as third preset value, and i-th day earning rate is pre- labeled as the 4th in i-th day label less than the stock of the second preset value If value.
Further, described to include: according to the long term policy training set of building training long term policy prediction model
According to the long term policy training set of building, respectively using more granularities cascade forest algorithm, adaptive boosting algorithm with And gradient promotes decision tree and logistic regression blending algorithm is trained long term policy prediction model, obtains 3 kinds of long term policies Prediction model;
Wherein, for any stock, the stock of day to be predicted is carried out respectively using 3 kinds of long term policy prediction models pre- It surveys, and arithmetic mean is carried out to the probability that Tag Estimation is third preset value, the result of arithmetic mean exists as current branch stock The probability of day profit to be predicted.
Further, described to include: according to the short-term strategies training set of building training short-term strategies prediction model
According to the short-term strategies training set of building, support vector machines, linear regression algorithm and random forest are used respectively Short-term strategies prediction model is trained, 3 kinds of short-term strategies prediction models are obtained;
Wherein, for any stock, the stock of day to be predicted is carried out respectively using 3 kinds of short-term strategies prediction models pre- It surveys, and arithmetic mean is carried out to the probability that Tag Estimation is third preset value, wherein the result of arithmetic mean is current branch stock In the probability of day to be predicted profit.
Further, described that the quantization investment of same day prediction day is determined according to trained long and short phase strategy prediction model Prime investment stock portfolio includes:
For any stock, the stock that long term policy prediction model and short-term strategies prediction model are obtained is to be predicted The probability that day gets a profit is weighted and averaged, and obtains current branch stock in the prediction probability value got a profit day to be predicted;
The prediction probability value of all premium on capital stock is ranked up from big to small on the day of to prediction day, M stock conduct before taking The prime investment stock portfolio of quantization investment on the day of predicting day.
The embodiment of the present invention also provides a kind of shot and long term strategy multiple-factor quantization investment device, comprising:
Module is obtained, for obtaining stock historical data, wherein the stock historical data includes: that a variety of stocks influence The factor;
First determining module influences several big stock impact factors as the long and short phase to stock yield for determining The impact factor of tactful prediction model combines;
Second determining module, for calculating stock yield, root according to closing price on the two adjacent in stock historical data Stock label is determined according to earning rate;
Module is constructed, for combining corresponding historical data and stock label according to determining impact factor, is constructed respectively Long and short phase Strategies Training collection;
Training module, for training long term policy prediction model according to the long term policy training set of building, and according to building Short-term strategies training set training short-term strategies prediction model;
Third determining module is thrown for quantization on the day of determining prediction day according to trained long and short phase strategy prediction model The prime investment stock portfolio of money.
The advantageous effects of the above technical solutions of the present invention are as follows:
In above scheme, obtain stock historical data, wherein the stock historical data include: a variety of stocks influence because Sub- historical data;Determining influences several big stock impact factors as long and short phase strategy prediction model to stock yield Impact factor combination;Stock yield is calculated according to closing price on the two adjacent in stock historical data, is determined according to earning rate Stock label;Corresponding historical data and stock label are combined according to determining impact factor, constructs long and short phase strategy instruction respectively Practice collection;According to the long term policy training set of building training long term policy prediction model, and according to the short-term strategies training set of building Training short-term strategies prediction model;Quantization is invested on the day of determining prediction day according to trained long and short phase strategy prediction model Prime investment stock portfolio.In this way, constructing long and short phase Strategies Training from a variety of stock impact factor angle analysis stock objects Collection, and shot and long term strategy combination method is taken to predict prime investment stock portfolio, it can guarantee investment tactics to a certain extent Income, to meet the use demand of investor.
Detailed description of the invention
Fig. 1 is the flow diagram that shot and long term strategy multiple-factor provided in an embodiment of the present invention quantifies capitalized method;
Fig. 2 is the detailed process schematic diagram that shot and long term strategy multiple-factor provided in an embodiment of the present invention quantifies capitalized method;
Fig. 3 is that shot and long term strategy multiple-factor provided in an embodiment of the present invention quantization investment return is illustrated compared with benchmark benefit Figure;
Fig. 4 is the structural schematic diagram of shot and long term strategy multiple-factor provided in an embodiment of the present invention quantization investment device.
Specific embodiment
To keep the technical problem to be solved in the present invention, technical solution and advantage clearer, below in conjunction with attached drawing and tool Body embodiment is described in detail.
The present invention carries out quantifying to invest selecting stocks for existing using single data, causes investment return is unstable to ask Topic provides a kind of shot and long term strategy multiple-factor quantization capitalized method and device.
Embodiment one
As shown in Figure 1, shot and long term strategy multiple-factor provided in an embodiment of the present invention quantifies capitalized method, comprising:
S101 obtains stock historical data, wherein the stock historical data includes: a variety of stock impact factor history Data;
S102, determining influences several big stock impact factors as long and short phase strategy prediction model to stock yield Impact factor combination;
S103 calculates stock yield according to closing price on the two adjacent in stock historical data, is determined according to earning rate Stock label;
S104 combines corresponding historical data and stock label according to determining impact factor, constructs long and short phase plan respectively Slightly training set;
S105, according to the long term policy training set of building training long term policy prediction model, and according to the short-term plan of building Slightly training set training short-term strategies prediction model;
S106, the prime investment that quantization is invested on the day of determining prediction day according to trained long and short phase strategy prediction model Stock portfolio.
Shot and long term strategy multiple-factor described in the embodiment of the present invention quantifies capitalized method, obtains stock historical data, wherein The stock historical data includes: a variety of stock impact factor historical datas;Determining influences big several personal shares on stock yield Ticket impact factor is combined as the impact factor of long and short phase strategy prediction model;It was received according to adjacent two days in stock historical data Disk calculation of price stock yield determines stock label according to earning rate;Corresponding history is combined according to determining impact factor Data and stock label construct long and short phase Strategies Training collection respectively;According to the long term policy training set of building training long term policy Prediction model, and according to the short-term strategies training set of building training short-term strategies prediction model;According to trained long and short phase plan Slightly prediction model determines that same day prediction day quantifies the prime investment stock portfolio of investment.In this way, from a variety of stock impact factors angle Degree analysis stock objects, construct long and short phase Strategies Training collection, and shot and long term strategy combination method is taken to predict prime investment stock Combination, can improve to a certain extent the income of investment tactics, to meet the use demand of investor.
In the specific embodiment of aforementioned shot and long term strategy multiple-factor quantization capitalized method, further, stock influences The type of the factor includes: the market factor, the financial factor, the valuation factor, scale factor and technique factor.
In the present embodiment, the historical data of all stocks to be selected in stock pond is obtained, the history for obtaining stock to be selected is related Data, wherein the stock historical data includes: the market factor data such as opening price, closing price, exchange hand of stock, The finance factor data such as same day net assets, operating income, the valuations factor data such as p/e ratio, price value ratio, same day total market capitalisation, the same day The scales factor data such as shareholding equity, the technique factors data such as turnover rate.
In the specific embodiment of aforementioned shot and long term strategy multiple-factor quantization capitalized method, further, at determining pair Before stock yield influences several big stock impact factors as the impact factor combination of long and short phase strategy prediction model, The described method includes:
The stock historical data of acquisition is pre-processed, removes the null value in stock historical data, and to removal null value Each column of stock historical data afterwards are standardized, wherein standardization formula is as follows:
Wherein, y1,y2,...,ynFor the new sequence after standardization, x1,x2,...,xnOriginal series before indicating standardization,Indicate that serial mean, s indicate variance, n indicates the number of the stock obtained.
In the specific embodiment of aforementioned shot and long term strategy multiple-factor quantization capitalized method, further, the determination Several big stock impact factors are influenced as the impact factor of long and short phase strategy prediction model on stock yield and combine packet It includes:
(eXtreme Gradient Boosting, xgBoost) algorithm can be promoted by extreme gradient determines standardization Influence degree of the stock impact factor historical data afterwards to stock yield;
From big to small according to influence degree, stock impact factor is ranked up;
The impact factor that top n stock impact factor is chosen as long and short phase strategy prediction model combines, wherein N the One preset value.
In the present embodiment, stock yield is calculated according to closing price on the two adjacent in stock historical data, specific:
For every stock in stock pond, (i-1)-th day in stock market factor data closing price and i-th day are used Closing price, pass through earning rate calculation formula:
The stock is calculated in the earning rate at (i-1)-th day closing quotation moment to i-th day closing quotation moment.
In the specific embodiment of aforementioned shot and long term strategy multiple-factor quantization capitalized method, further, the basis Earning rate determines that stock label includes:
For long term policy prediction model, i-th day earning rate is more than or equal to mark of the stock of the second preset value at i-th day Label are labeled as third preset value, and i-th day earning rate is pre- labeled as the 4th in i-th day label less than the stock of the second preset value If value;
For short-term strategies prediction model, i-th day earning rate is more than or equal to mark of the stock of the 5th preset value at i-th day Label are labeled as third preset value, and i-th day earning rate is pre- labeled as the 4th in i-th day label less than the stock of the second preset value If value.
In the present embodiment, according to earning rate calculated result, determine that label of the stock at i-th day, label determine method such as Under:
The stock that i-th day earning rate is more than or equal to t (t is certain preset value) is default labeled as third in i-th day label It is worth (for example, 1), the stock by i-th day earning rate less than t is labeled as the 4th preset value (for example, 0) in i-th day label;
In the present embodiment, correspond to long term policy prediction model, t takes the second preset value, for example, t=0.2;Corresponding to short Phase strategy prediction model, t takes the 5th preset value, for example, t=0.
In the present embodiment, the stock label that corresponding historical data is combined according to determining impact factor and is determined, respectively Construct long and short phase Strategies Training collection.
In the present embodiment, using building long term policy training set training long term policy prediction model and to carry out model excellent Change, specific:
According to the long term policy training set of building, forest (multi-Grained Cascade is cascaded using more granularities respectively Forest, cForest) algorithm, adaptive boosting (Adaptive Boosting, AdaBoost) algorithm, gradient promotion decision tree The fusion of (Gradient Boosting Decision Tree, GBDT) and logistic regression (logistics regression, LR) Algorithm is trained long term policy prediction model, obtains 3 kinds of long term policy prediction models;
Wherein, in actual prediction, for any stock, using 3 kinds of long term policy prediction models respectively to be predicted The stock of day is predicted, and carries out arithmetic mean to the probability that Tag Estimation is third preset value (that is: 1), arithmetic mean As a result the probability got a profit as current branch stock in day to be predicted.
In the present embodiment, using building short-term strategies training set training short-term strategies prediction model and to carry out model excellent Change, specific:
According to the short-term strategies training set of building, support vector machines, linear regression algorithm and random forest are used respectively Short-term strategies prediction model is trained, 3 kinds of short-term strategies prediction models are obtained;
Wherein, in actual prediction, for any stock, using 3 kinds of short-term strategies prediction models respectively to be predicted The stock of day is predicted, and carries out arithmetic mean to the probability that Tag Estimation is third preset value (that is: 1), wherein is counted flat Equal result is the probability that current branch stock is got a profit in day to be predicted.
In the present embodiment, all using training set to hyper parameter in single model, i.e., artificial determination is needed in model training Parameter, such as the decision tree number of the penalty factor of support vector machines, random forest optimizes.
In the specific embodiment of aforementioned shot and long term strategy multiple-factor quantization capitalized method, further, the basis The prime investment stock portfolio of quantization investment includes: on the day of trained long and short phase strategy prediction model determines prediction day
For any stock, the stock that long term policy prediction model and short-term strategies prediction model are obtained is to be predicted The probability that day gets a profit is weighted and averaged, and obtains current branch stock in the prediction probability value got a profit day to be predicted;
The prediction probability value of all premium on capital stock is ranked up from big to small on the day of to prediction day, M stock conduct before taking The prime investment stock portfolio of quantization investment on the day of predicting day, wherein M is preset value.
In the present embodiment, after the prime investment stock portfolio for quantifying investment on the day of determining prediction day, according to what is obtained Prime investment stock portfolio carries out stock and returns survey, calculates quantization investment tactics benefit, can specifically include following steps:
According to obtained prime investment stock portfolio, within preset time survey period, according to history truthful data, carry out Practical Stock-operation is sold with opening price and holds still the not stock in prime investment stock portfolio in selling, bought with closing price Hui Wei holds but the stock in prime investment stock portfolio;
It is calculated back by earning rate calculation formula and surveys the earning rate that prime investment stock portfolio is daily in the period.
Shot and long term strategy multiple-factor described in embodiment quantifies capitalized method for a better understanding of the present invention, public with middle card Department 2805 stocks for, quantify investment target be choose in demonstrate,prove index shares pond in 20 stocks as odd-numbered day target Combination carries out return on investment, using last portfolio yield as the judgment criteria of quantization returns of investment, to guarantee that investment is effective Property, when starting transaction daily and closing the trade, 20 stocks are held in guarantee.
As shown in Fig. 2, shot and long term strategy multiple-factor described in the present embodiment quantization capitalized method can specifically include it is following Step:
First, it obtains stock historical data and the stock historical data of acquisition is pre-processed and standardized, wherein stock The part field description of ticket historical data and classification, as shown in table 1.
1 stock historical data field description of table and classification (partial data)
Data field name Data description
Opening price The bargain is closed price that the first stroke after reopening after a cessation of business each day of trade is per share
Closing price The closing price of stock
Exchange hand The quantity that both parties conclude the transaction
Same day net assets Deduct total assets after day-rate cost and other expenses
Operating income Main cause health service revenue and other health service revenue summations
P/e ratio The ratio of market value of the stock and its earnings per share
Price value ratio The ratio of market value of the stock and net assets per share
Same day total market capitalisation The stock total value that same day shareholding equity number is obtained multiplied by share price at that time
Same day shareholding equity The summation of the quantity of the share of share and new issue before initial public offering
Turnover rate The frequency that stock turn is bought and sold in market within a certain period of time
In the present embodiment, it is assumed that the stock historical data of acquisition are as follows: 2016 to 2018 stock history in stock pond Data, wherein stock historical data is numeric type, as shown in table 2.
2 stock historical data (partial data) of table
In table 2, first is classified as stock coding, each encodes a corresponding stock;Second is classified as stock in the receipts of one day Disk price, f1-f10 indicate impact factor, only list partial data herein.Every data line is single branch stock in some day Real market situation record, each column field correspond to the same affect factor data of different stocks.To the historical data of acquisition into Row pretreatment, removing in stock certificate data has the data of null value, and is standardized to remaining data.
Second, determining influences several big stock impact factors as long and short phase strategy prediction model to stock yield Impact factor combination.
In the present embodiment, it is assumed that stock impact factor one shares 203, then this 203 are candidate stock impact factors Totally 203, the stock impact factor type to be screened is mainly the market factor and the financial factor, including: the market factor 41 A, the financial factor 162.Stock impact factor data description to be selected is as shown in table 3
The stock impact factor (partial data) to be selected of table 3
In the present embodiment, the stock impact factor historical data after xgBoost algorithm normalized can be used is to stock The influence degree of ticket income from big to small according to influence degree is ranked up stock impact factor.Select preceding 87 stock shadows The impact factor for ringing the factor as long and short phase strategy prediction model combines.
Third calculates stock yield according to closing price as a result, determining stock label according to earning rate, and building is grown respectively The training set of phase strategy and short-term strategies.
In the present embodiment, what long term policy prediction model was selected when training is the stock portfolio data in nearest half a year, When the determination method of label is that earning rate is greater than 0.2, it is designated as 1, when less than 0.2, is designated as 0.
In the present embodiment, what short-term strategies prediction model was selected when training is the stock portfolio data in nearest two months, When the determination method of label is that earning rate is greater than 0, it is designated as 1, when less than 0, is designated as 0.
4th, using the long term policy training set training long term policy prediction model of building, use the short-term strategies of building Training set training short-term strategies prediction model simultaneously carries out model optimization.
In the present embodiment, according to the long term policy training set of building, using more algorithm fusion strategies, to improve prediction knot The robustness of fruit, specific:
Model training is carried out using training set using more granularities cascade forest (gcForest) algorithm first, gcForest is adopted Learnt with the cascade structure of random forest, is integrated integrated, the more granularity windows being able to carry out in data sequence of decision tree Mouthful scanning, can obtain preferably in long term policy data as a result, can be compared with using the prediction that this method carries out long-term sequence Retain long-term characteristic well.
Then AdaBoostClassifier () method is called to carry out model training, the parameter combination after adjusting ginseng is decision tree Depth capacity be 3, select Taxonomy and distribution (Classification and Regression Tree, CART) classification tree As Weak Classifier, algorithms selection is to use training set classifying quality as the weight of weak learner, maximum weak learner Number is 200.
The algorithm finally used is GBDT and LR blending algorithm, generates feature group using nonlinear model GDBT and is combined into LR mould Type provides the feature combination foundation being effectively predicted.Parameter combination is learning rate 0.005, weak learner number after GDBT model tune ginseng It is 1200, the depth capacity of decision tree is 7, and smallest sample number needed for internal node is subdivided is 60, the minimum sample of leaf node Number is 1200, sub-sampling value 0.7, and the characteristic for classification is 7, and the random seed number of the random number generated every time is 10. The feature for using GBDT to select is combined as the input of LR model, is made prediction, such method saves manpower in Feature Engineering Time of selected characteristic combination, and the characteristics of combine LR linear prediction fast speed improves the efficiency of prediction result and accurate Degree.
On the basis of the training of above-mentioned three classes algorithm, the stock certificate data of day to be predicted is predicted.For example, to jth day Certain stock predicted using three kinds of algorithms, obtain it and classify prediction result and to obtain the corresponding probability of its prediction label, select The arithmetic mean that label is predicted as 1 probability in three kinds of algorithms uses long term policy prediction model label in this day as the stock 1 final probability results are predicted as, that is, the stock obtains the probability of profit in jth day.
In the present embodiment, using building short-term strategies training set training short-term strategies prediction model and to carry out model excellent Change, specific:
According to the short-term strategies training set of building, using support vector machines, linear regression algorithm and random forest to short Phase strategy prediction model is trained, and support vector machines, linear regression algorithm and random forest three are used in actual prediction Kind algorithm predicts day to be predicted (for example, in jth day) stock, and the probability for being 1 to Tag Estimation carries out arithmetic mean, The probability that the result of arithmetic mean is got a profit as stock in jth day.
In the present embodiment, punishment parameter C's and radial basis function σ is carried out to support vector machines used in short-term strategies Optimization, it is specific: the training of short-term strategies prediction model being carried out using training set using support vector machines first, calls svm.svc () function Training Support Vector Machines prediction model on the short-term strategies training data of building, and to punishment parameter C and radial direction Basic function σ is optimized.Then logistic regression algorithm is used, calls LogistRegression () function in the short-term of building Training logistic regression prediction model in Strategies Training data.Random forest prediction model finally is trained using random forests algorithm, The random seed number of the random number generated every time is 10.
In the present embodiment, on the basis of three kinds of support vector machines, linear regression algorithm and random forest algorithm training, The stock certificate data of day to be predicted is predicted.For example, certain stock to jth day is calculated using support vector machines, linear regression Three kinds of algorithms of method and random forest are predicted, are obtained its classification prediction result and are obtained the corresponding probability of its prediction label, Label is predicted as the arithmetic mean of 1 probability in three kinds of selection support vector machines, linear regression algorithm and random forest algorithms Using short-term strategies prediction model Tag Estimation in jth day as the stock is 1 final probability results, that is, the stock exists Jth day obtains the probability of profit.
5th, the prime investment that quantization is invested on the day of determining prediction day according to trained long and short phase strategy prediction model Stock portfolio, and stock is carried out according to obtained prime investment stock portfolio and returns survey, calculate quantization investment tactics benefit.
In the present embodiment, every stock is obtained to be predicted according to long term policy prediction model and short-term strategies prediction model Two kinds of tactful probability weights, are averagely obtained final prediction probability result by the probability that day gets a profit.To general on the day of prediction day Rate prediction result, is sorted from large to small, and takes M=20 to obtain the stock of preceding 20 most probables profit, on the day of obtaining prediction day Quantify the prime investment stock portfolio of investment.It sets back and surveys the period as nearest half a year, it is 5 days, i.e., five days that the storehouse period is adjusted in setting Primary quantization investment in stock combination is calculated, and is traded according to true share price data, it is last according to earning rate calculation formula Yield curve is calculated, is compared with benchmark benefit, last result is as shown in Figure 3.
From the figure 3, it may be seen that surveying in the period returning, quantify investor using shot and long term strategy multiple-factor described in the present embodiment The strategic investment income that method carries out is higher than benchmark benefit, can obtain preferable investment return.
To sum up, the quantization of shot and long term strategy multiple-factor described in embodiment of the present invention capitalized method, foundation stock historical data, Determining, which influences several big stock impact factors as the impact factor of long and short phase strategy prediction model to stock yield, combines And construct effective long and short phase Strategies Training collection;Simultaneously excavate for a long time with the feature difference in short-term history data, fusion from The prediction technique that different angle is set out captures the validity feature combination in historical data, pre- using trained long and short phase strategy The income of investment tactics can be guaranteed to a certain extent by surveying the prime investment stock portfolio that model is selected, to meet investment The use demand of person.On the basis of modern computer rapid development, new investment tactics is provided for quantization investment, is had important Meaning.
Embodiment two
The present invention also provides the specific embodiments that a kind of shot and long term strategy multiple-factor quantifies investment device, due to the present invention The shot and long term strategy multiple-factor quantization investment device of offer and the specific reality of aforementioned shot and long term strategy multiple-factor quantization capitalized method It is corresponding to apply mode, shot and long term strategy multiple-factor quantization investment device can be by executing in above method specific embodiment Process step achieve the object of the present invention, therefore above-mentioned shot and long term strategy multiple-factor quantifies capitalized method specific embodiment In explanation, be also applied for the specific embodiment of shot and long term strategy multiple-factor provided by the invention quantization investment device, It will not be described in great detail in present invention specific embodiment below.
As shown in figure 4, the embodiment of the present invention also provides a kind of shot and long term strategy multiple-factor quantization investment device, comprising:
Module 11 is obtained, for obtaining stock historical data, wherein the stock historical data includes: a variety of stock shadows Ring the factor;
First determining module 12 influences several big stock impact factors as long and short to stock yield for determining The impact factor of phase strategy prediction model combines;
Second determining module 13, for calculating stock yield according to closing price on the two adjacent in stock historical data, Stock label is determined according to earning rate;
Module 14 is constructed, for combining corresponding historical data and stock label, difference structure according to determining impact factor Build long and short phase Strategies Training collection;
Training module 15, for training long term policy prediction model according to the long term policy training set of building, and according to structure The short-term strategies training set training short-term strategies prediction model built;
Third determining module 16, for quantifying on the day of determining prediction day according to trained long and short phase strategy prediction model The prime investment stock portfolio of investment.
The quantization investment device of shot and long term strategy multiple-factor described in the embodiment of the present invention, stock historical data is obtained, In, the stock historical data includes: a variety of stock impact factor historical datas;Determination influences greatly several on stock yield Stock impact factor is combined as the impact factor of long and short phase strategy prediction model;According to adjacent two days in stock historical data Closing price calculates stock yield, determines stock label according to earning rate;It is gone through according to determining impact factor combination is corresponding History data and stock label construct long and short phase Strategies Training collection respectively;According to the long-term plan of the long term policy training set of building training Slightly prediction model, and according to the short-term strategies training set of building training short-term strategies prediction model;According to the trained long and short phase The prime investment stock portfolio that quantization is invested on the day of tactful prediction model determines prediction day.In this way, from a variety of stock impact factors Angle analysis stock objects construct long and short phase Strategies Training collection, and shot and long term strategy combination method is taken to predict prime investment stock Ticket combination, can guarantee to a certain extent the income of investment tactics, to meet the use demand of investor.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art For, without departing from the principles of the present invention, several improvements and modifications can also be made, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (10)

1. a kind of shot and long term strategy multiple-factor quantifies capitalized method characterized by comprising
Obtain stock historical data, wherein the stock historical data includes: a variety of stock impact factor historical datas;
Determining influences impact factor of several the big stock impact factors as long and short phase strategy prediction model to stock yield Combination;
Stock yield is calculated according to closing price on the two adjacent in stock historical data, stock label is determined according to earning rate;
Corresponding historical data and stock label are combined according to determining impact factor, constructs long and short phase Strategies Training collection respectively;
It assembles for training according to the long term policy training set of building training long term policy prediction model, and according to the training of the short-term strategies of building Practice short-term strategies prediction model;
The prime investment stock portfolio that quantization is invested on the day of determining prediction day according to trained long and short phase strategy prediction model.
2. shot and long term strategy multiple-factor according to claim 1 quantifies capitalized method, which is characterized in that stock impact factor Type include: the market factor, the financial factor, the valuation factor, scale factor and technique factor.
3. shot and long term strategy multiple-factor according to claim 1 quantifies capitalized method, which is characterized in that determining to stock It is described before several big stock impact factors of revenue impact are as the impact factor combination of long and short phase strategy prediction model Method includes:
Remove the null value in stock historical data;
Each column of stock historical data after removal null value are standardized, wherein standardization formula indicates are as follows:
Wherein, y1,y2,...,ynFor the new sequence after standardization, x1,x2,...,xnOriginal series before indicating standardization,Table Show that serial mean, s indicate variance, n indicates the number of the stock obtained.
4. shot and long term strategy multiple-factor according to claim 3 quantifies capitalized method, which is characterized in that the determination is to stock Several big stock impact factors of ticket revenue impact are combined as the impact factor of long and short phase strategy prediction model
Determine the stock impact factor historical data after standardizing to the influence degree of stock yield;
From big to small according to influence degree, stock impact factor is ranked up;
It is combined top n stock impact factor as the impact factor of long and short phase strategy prediction model, wherein N is first default Value.
5. shot and long term strategy multiple-factor according to claim 1 quantifies capitalized method, which is characterized in that every stock is the The earning rate at i-1 days closing quotation moment to i-th day closing quotation moment indicates are as follows:
6. shot and long term strategy multiple-factor according to claim 1 quantifies capitalized method, which is characterized in that described according to income Rate determines that stock label includes:
For long term policy prediction model, i-th day earning rate is more than or equal to label mark of the stock of the second preset value at i-th day It is denoted as third preset value, the stock by i-th day earning rate less than the second preset value is preset in i-th day label labeled as the 4th Value;
For short-term strategies prediction model, i-th day earning rate is more than or equal to label mark of the stock of the 5th preset value at i-th day It is denoted as third preset value, the stock by i-th day earning rate less than the second preset value is preset in i-th day label labeled as the 4th Value.
7. shot and long term strategy multiple-factor according to claim 1 quantifies capitalized method, which is characterized in that described according to building Long term policy training set training long term policy prediction model include:
According to the long term policy training set of building, respectively using more granularities cascade forest algorithm, adaptive boosting algorithm and ladder Degree promotes decision tree and logistic regression blending algorithm is trained long term policy prediction model, obtains 3 kinds of long term policy predictions Model;
Wherein, for any stock, the stock of day to be predicted is predicted respectively using 3 kinds of long term policy prediction models, And arithmetic mean is carried out to the probability that Tag Estimation is third preset value, the result of arithmetic mean is as current branch stock to pre- Survey the probability of day profit.
8. shot and long term strategy multiple-factor according to claim 1 quantifies capitalized method, which is characterized in that described according to building Short-term strategies training set training short-term strategies prediction model include:
According to the short-term strategies training set of building, respectively using support vector machines, linear regression algorithm and random forest to short Phase strategy prediction model is trained, and obtains 3 kinds of short-term strategies prediction models;
Wherein, for any stock, the stock of day to be predicted is predicted respectively using 3 kinds of short-term strategies prediction models, And arithmetic mean is carried out to the probability that Tag Estimation is third preset value, wherein the result of arithmetic mean is that current branch stock exists The probability of day profit to be predicted.
9. shot and long term strategy multiple-factor according to claim 1 quantifies capitalized method, which is characterized in that described according to training The prime investment stock portfolio of quantization investment includes: on the day of good long and short phase strategy prediction model determines prediction day
For any stock, the stock that long term policy prediction model and short-term strategies prediction model obtain is full of in day to be predicted The probability of benefit is weighted and averaged, and obtains current branch stock in the prediction probability value got a profit day to be predicted;
The prediction probability value of all premium on capital stock is ranked up from big to small on the day of to prediction day, and M stock is as prediction before taking The prime investment stock portfolio of quantization investment on the day of day.
10. a kind of shot and long term strategy multiple-factor quantization investment device characterized by comprising
Module is obtained, for obtaining stock historical data, wherein the stock historical data includes: a variety of stock impact factors;
First determining module influences several big stock impact factors as long and short phase strategy to stock yield for determining The impact factor of prediction model combines;
Second determining module, for calculating stock yield according to closing price on the two adjacent in stock historical data, according to receipts Beneficial rate determines stock label;
Module is constructed, for combining corresponding historical data and stock label according to determining impact factor, is constructed respectively long and short Phase Strategies Training collection;
Training module, for training long term policy prediction model according to the long term policy training set of building, and according to the short of building Phase Strategies Training collection training short-term strategies prediction model;
Third determining module is invested for quantization on the day of determining prediction day according to trained long and short phase strategy prediction model Prime investment stock portfolio.
CN201910340352.4A 2019-04-25 2019-04-25 A kind of shot and long term strategy multiple-factor quantization capitalized method and device Pending CN110322347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910340352.4A CN110322347A (en) 2019-04-25 2019-04-25 A kind of shot and long term strategy multiple-factor quantization capitalized method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910340352.4A CN110322347A (en) 2019-04-25 2019-04-25 A kind of shot and long term strategy multiple-factor quantization capitalized method and device

Publications (1)

Publication Number Publication Date
CN110322347A true CN110322347A (en) 2019-10-11

Family

ID=68113330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910340352.4A Pending CN110322347A (en) 2019-04-25 2019-04-25 A kind of shot and long term strategy multiple-factor quantization capitalized method and device

Country Status (1)

Country Link
CN (1) CN110322347A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738852A (en) * 2020-06-19 2020-10-02 中国工商银行股份有限公司 Service data processing method and device and server
CN111738331A (en) * 2020-06-19 2020-10-02 北京同邦卓益科技有限公司 User classification method and device, computer-readable storage medium and electronic device
CN112884576A (en) * 2021-02-02 2021-06-01 上海卡方信息科技有限公司 Stock trading method based on reinforcement learning

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111738852A (en) * 2020-06-19 2020-10-02 中国工商银行股份有限公司 Service data processing method and device and server
CN111738331A (en) * 2020-06-19 2020-10-02 北京同邦卓益科技有限公司 User classification method and device, computer-readable storage medium and electronic device
CN111738852B (en) * 2020-06-19 2023-10-20 中国工商银行股份有限公司 Service data processing method, device and server
CN112884576A (en) * 2021-02-02 2021-06-01 上海卡方信息科技有限公司 Stock trading method based on reinforcement learning

Similar Documents

Publication Publication Date Title
Farboodi et al. Long-run growth of financial data technology
Xia et al. Cost-sensitive boosted tree for loan evaluation in peer-to-peer lending
US7162445B2 (en) Methods and systems for quantifying cash flow recovery and risk
MXPA01008622A (en) Rapid valuation of portfolios of assets such as financial instruments.
CA2362441A1 (en) Methods and systems for optimizing return and present value
WO2001050310A9 (en) Methods and systems for automated inferred valuation of credit scoring
JP2003526146A (en) Method and system for reducing risk by obtaining evaluation values
EP1264256A1 (en) Cross correlation tool for automated portfolio descriptive statistics
Du Mean–variance portfolio optimization with deep learning based-forecasts for cointegrated stocks
Chen et al. Financial trading strategy system based on machine learning
CN110322347A (en) A kind of shot and long term strategy multiple-factor quantization capitalized method and device
CN109325863A (en) A kind of enterprise's valuation platform
Cao et al. Bond rating using support vector machine
Ünvan et al. Financial performance analysis with the fuzzy COPRAS and entropy-COPRAS approaches
US20220058483A1 (en) Parallel and multi-layer long short-term memory neural network architectures
Wang et al. Applying TOPSIS method to evaluate the business operation performance of Vietnam listing securities companies
Mačerinskiene et al. The evaluation model of a commercial bank loan portfolio
Moubariki et al. Enhancing cash management using machine learning
Carluccio et al. Private firms, corporate investment and the WACC: evidence from France
Nagy et al. An Analysis of the Financial Health of Companies Concerning the Business Environment of the V4 Countries
Gruszczyński et al. Modeling financial distress and bankruptcy
Andreou et al. Stock options pricing via machine learning methods combined with firm characteristics
CN109858824A (en) A kind of enterprise's estimation method and system
Møller Valuation of inventory of live biological assets: Measurement, value relevance and usefulness to equity investors
Ariff Efficiency measurement and determinants of Indonesian bank efficiency

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: 20191011