CN109242160A - The method and apparatus for calculating advance versus decline probability - Google Patents

The method and apparatus for calculating advance versus decline probability Download PDF

Info

Publication number
CN109242160A
CN109242160A CN201810942728.4A CN201810942728A CN109242160A CN 109242160 A CN109242160 A CN 109242160A CN 201810942728 A CN201810942728 A CN 201810942728A CN 109242160 A CN109242160 A CN 109242160A
Authority
CN
China
Prior art keywords
stock
viewpoint
comment data
probability
comment
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
CN201810942728.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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810942728.4A priority Critical patent/CN109242160A/en
Publication of CN109242160A publication Critical patent/CN109242160A/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
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • 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)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Game Theory and Decision Science (AREA)
  • Technology Law (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a kind of method and apparatus for calculating advance versus decline probability, are directed to same branch stock s this method comprises: obtainingjStock comment data collection;The ups and downs probability cf (s of the branch stock is calculated according to the following formulaj):Wherein,Indicate stock comment data collectionIn stock comment data quantity, ciIndicate a stock comment data,For the viewpoint polarity of this trand ticket comment data,For the reliability index of this trand ticket comment data, ru (ci) it is the exact value that reliability classification is carried out to this trand ticket comment data;As cf (sjWhen) >=0, stock sjRise, and the probability to rise is | cf (sj)|;As cf (sj) < 0 when, stock sjFall, and the probability fallen is | cf (sj)|.Present invention determine that the viewpoint polarity of stock comment data, reliability prediction is carried out to stock comment data, calculate advance versus decline probability, equity investment is carried out according to advance versus decline probability, it is convenient and efficient, accuracy is high, and investor can be helped more accurately to understand the general trend of market development and stock dynamic, used for investor or quant.

Description

The method and apparatus for calculating advance versus decline probability
Technical field
The present invention relates to artificial intelligence and big data field, and in particular to it is a kind of calculate advance versus decline probability method, dress It sets, electronic equipment and computer readable storage medium.
Background technique
Investor would generally find associated value information using search engine and help its final decision, and these decision processes Major part is the analytical judgment and experience by people.In fact, the stock comment data in internet contains abundant and has The semantic information of value can help investor to understand the general trend of market development and stock dynamic.Existing stock comment and analysis method The feeling polarities of capture stock comment are mostly just focused on, to understand that stock comment acts on the macroscopic view of the general trend of market development. However, the stock comment in internet has usually contained a large amount of noise, such as waterborne troops and personal subjective tendency group psychology, To severely impact the judgement of investor.Therefore it is authoritative fine granularity to be carried out to stock comment information using artificial intelligence technology Analysis, and then being automatically an apprentice of selected good quality stock in massive information for stock invester and stock analysis is significantly.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State method, apparatus, electronic equipment and the computer readable storage medium of the calculating advance versus decline probability of problem.
According to one aspect of the present invention, a kind of method for calculating advance versus decline probability is provided, this method comprises:
It obtains and is directed to same branch stock sjStock comment data collection
The ups and downs probability cf (s of the branch stock is calculated according to the following formulaj):
Wherein,Indicate stock comment data collectionIn stock comment data quantity, ciIndicate a stock comment Data,For the viewpoint polarity of this trand ticket comment data,For the reliability index of this trand ticket comment data, r υ (ci) it is the exact value that reliability classification is carried out to this trand ticket comment data;
As cf (sjWhen) >=0, stock sjRise, and the probability to rise is | cf (sj)|;
As cf (sj) < 0 when, stock sjFall, and the probability fallen is | cf (sj)|。
According to another aspect of the present invention, the device for calculating advance versus decline probability is provided, wherein the device includes:
Acquiring unit is suitable for obtaining for same branch stock sjStock comment data collection
Computing unit, suitable for calculating the ups and downs probability cf (s of the branch stock according to the following formulaj):
Wherein,Indicate stock comment data collectionIn stock comment data quantity, ciIndicate a stock comment Data,For the viewpoint polarity of this trand ticket comment data,For the reliability index of this trand ticket comment data, r υ (ci) it is the exact value that reliability classification is carried out to this trand ticket comment data;
As cf (sjWhen) >=0, stock sjRise, and the probability to rise is | cf (sj)|;
As cf (sj) < 0 when, stock sjFall, and the probability to rise is | cf (sj)|。
According to a further aspect of the invention, a kind of electronic equipment is provided, the electronic equipment includes: processor, with And it is stored with the memory for the computer program that can be run on a processor;
Wherein, the processor, for executing any of the above-described institute when executing the computer program in the memory The method stated.
According to a further aspect of the invention, a kind of computer readable storage medium is provided, computer is stored thereon with Program, the computer program realize method described in any of the above embodiments when being executed by processor.
According to the technique and scheme of the present invention, same branch stock s is directed to by obtainingjStock comment data collectionAccording to FormulaCalculate the ups and downs probability cf (s of the branch stockj), whereinIndicate that stock is commented By data setIn stock comment data quantity, ciIndicate a stock comment data,For this trand ticket comment data Viewpoint polarity,For the reliability index of this trand ticket comment data, r υ (ci) be to this trand ticket comment data progress can By the exact value of property classification;As cf (sjWhen) >=0, stock sjRise, and the probability to rise is | cf (sj)|;As cf (sj) < 0 when, stock Ticket sjFall, and the probability fallen is | cf (sj)|.The present invention carries out specially treated and training to existing machine learning model, determines The viewpoint polarity of stock comment data carries out reliability prediction to stock comment data, advance versus decline probability is calculated, according to stock Ups and downs probability carries out equity investment, convenient and efficient, and accuracy is high, investor can be helped more accurately to understand the general trend of market development And stock dynamic, it is used for investor or quant.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of method flow diagram for calculating advance versus decline probability according to an embodiment of the invention;
Fig. 2 is a stock comment data information schematic diagram;
Fig. 3 is another representation schematic diagram of a stock comment data information;
Fig. 4 is the stock comment data amount schematic diagram after original issue stock comment data amount and cleaning;
Fig. 5 is using the profit situation schematic diagram after intelligence share-selecting method c selection stock;
Fig. 6 shows a kind of schematic device for calculating advance versus decline probability according to an embodiment of the invention;
Fig. 7 shows another schematic device for calculating advance versus decline probability according to an embodiment of the invention;
Fig. 8 is the structural schematic diagram of the electronic equipment in the embodiment of the present invention;
Fig. 9 is the structural schematic diagram of one of embodiment of the present invention computer readable storage medium.
Specific embodiment
The explanation of nouns that the present invention occurs:
FM:Factorization Machine, Factorization machine are a kind of known algorithms, are mentioned by Steffen Rendle A kind of machine learning algorithm based on matrix decomposition out, is widely used in classification and prediction model.
SVM:Support Vector Machine, support vector machines are a kind of known algorithms, for a kind of common differentiation Method.It is the learning model for having supervision in machine learning field, commonly used to carry out pattern-recognition, classification and recurrence Analysis.
ARMA:Auto Regressive Moving Average, autoregressive moving-average model, model parameter method high score One of resolution spectral analysis method.This method is to study the typical method of stationary random process rational spectrum, is suitable for very big one kind Practical problem.It has more accurate Power estimation and more excellent spectral resolution performance than AR modelling and MA modelling.
OSRatio:Opinion Shift Ratio, viewpoint changes ratio, for characterizing stock commentator to same stock A possibility that changing viewpoint.
TSRatio:the Ratio of True-then-Shift, changes correct aspect ratio, comments for characterizing stock By member to stock comment viewpoint it is correct under the premise of change viewpoint a possibility that.
FSRatio:the Ratio of False-then-Shift changes wrong views ratio, comments for indicator stock A possibility that by member to viewpoint is changed under the premise of stock comment viewpoint mistake.
TCTRatio:the Reliability Ratio of True-then-Constant, consistent correct viewpoint are reliable Ratio, for characterize stock commentator it is correct to stock comment viewpoint under the premise of still keep the reliability of the viewpoint.
TSTRatio:the Reliability Ratio of True-then-Shift, changes correct viewpoint and reliably compares Rate, for characterize stock commentator to stock comment viewpoint it is correct under the premise of change viewpoint reliability.
FCTRatio:the Reliability Ratio of False-then-Constant, consistent wrong views can By ratio, for characterizing stock commentator to the reliability for still keeping the viewpoint under the premise of stock comment viewpoint mistake.
FSTRatio:the Reliability Ratio of False-then-Shift changes wrong views and reliably compares Rate comments on stock the reliability of change viewpoint under the premise of viewpoint mistake for characterizing stock commentator.
BIC criterion: Bayesian Information Criterion, bayesian information criterion.Bayesian decision theory It is the important component that subjective Bayes send inducing theory.It is under incomplete information, to the state subjectivity that part is unknown Then probability Estimation is modified probability of happening with Bayesian formula, desired value and amendment probability is finally recycled to make most Excellent decision.
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Fig. 1 shows a kind of method flow diagram based on calculating advance versus decline probability according to an embodiment of the invention, As shown in Figure 1, this method comprises:
Step S11: it obtains and is directed to same branch stock sjStock comment data collection
Step S12: the ups and downs probability cf (s of the branch stock is calculated according to the following formulaj):
Wherein,Indicate stock comment data collectionIn stock comment data quantity, ciIndicate a stock comment Data,For the viewpoint polarity of this trand ticket comment data,For the reliability index of this trand ticket comment data, r υ (ci) it is the exact value that reliability classification is carried out to this trand ticket comment data;
As cf (sjWhen) >=0, stock sjRise, and the probability to rise is | cf (sj)|;
As cf (sj) < 0 when, stock sjFall, and the probability fallen is | cf (sj)|。
Same branch stock s is directed to by obtainingjStock comment data collectionAccording to formula Calculate the ups and downs probability cf (s of the branch stockj), whereinIndicate stock comment data collectionIn stock comment data number Amount, ciIndicate a stock comment data,For the viewpoint polarity of this trand ticket comment data,For the comment of this trand ticket The reliability index of data, r υ (ci) it is the exact value that reliability classification is carried out to this trand ticket comment data;As cf (sj)≥0 When, stock sjRise, and the probability to rise is | cf (sj)|;As cf (sj) < 0 when, stock sjFall, and the probability fallen is | cf (sj)|.This Invention carries out specially treated and training to existing machine learning model, the viewpoint polarity of stock comment data is determined, to stock Comment data carries out reliability prediction, calculates advance versus decline probability, and equity investment is carried out according to advance versus decline probability, convenient fast Victory, accuracy is high, investor can be helped more accurately to understand the general trend of market development and stock dynamic, for investor or stock market point Analysis person uses.
In one embodiment of the invention, embodiment illustrated in fig. 1 determines a stock comment data according to the following method Viewpoint polarity
It obtains the training set being made of stock comment data and verifying collects, and the every stock concentrated for training set and verifying Comment data marks viewpoint polarity;
Based on the training set after mark, machine learning model is trained, and based on the test set after mark to study The effect of model is evaluated and tested, the machine learning model after being trained;
The relevant information of stock comment data to be predicted is input to the machine learning model after training, obtains the machine The viewpoint polarity classification information of the stock comment data of learning model output, and being determined according to the viewpoint polarity classification information should The viewpoint polarity of stock comment data.
In one embodiment of the invention, the reliability index of a stock comment data is determined according to the following formula
Wherein,The date is represented,It isStock price,It isStock valence one day after Lattice,It is stock comment viewpoint polarity
In one embodiment of the invention, embodiment illustrated in fig. 1 is determined according to such as under type comments on number to a stock According to the exact value r υ (c for carrying out reliability classificationi):
Feature vector is extracted based on stock comment data collection and share price sequence sets;
Utilize support vector machines model of the extracted feature vector training based on Radial basis kernel function;
The machine learning model of predicting Stock Price is used for using the training of share price sequence sets;
Integrated SVM model and the machine learning model for predicting Stock Price are obtained for evaluating stock comment reliability Disaggregated model
Thenrυ(ci) value it is bigger, indicate to stock comment reliability classification results it is more reliable.
In one embodiment of the invention, stock comment data collection and share price sequence sets are based in embodiment illustrated in fig. 1 Extracting feature vector includes:
The each stock comment data at least partly stock comment data concentrated based on stock comment data, is extracted One of following feature or one feature vector of a variety of compositions:
This trand ticket comment data be expected to rise or viewpoint polarity information expected to fall;
In all stock comment datas for stock s that the t same day is issued, the stock comment data quantity be expected to rise is seen The stock comment data quantity fallen;
It is issued in the past first preset length time from t days, in all stock comment datas for stock s, Stock comment data quantity, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and the sight being expected to rise The stock comment data quantity of point mistake;
The price series of stock s from t days in the past second preset length time;
The stock s that machine learning model for predicting Stock Price is predicted is defeated in the price of next day of trade and the model Standard deviation out;
From t days in the past third preset length time, in all stock comment datas of stock commentator a publication, Stock comment data quantity, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and the sight being expected to rise The stock comment data quantity of point mistake;
From t days in the past 4th preset length time, the stock for stock s of stock commentator a publication is commented on In data, stock comment data quantity, the stock comment data quantity expected to fall, the correct stock comment data number of viewpoint be expected to rise The stock comment data quantity of amount and viewpoint mistake;
The stock comment sequence issued in the past 5th preset length time from t days based on stock commentator a is true Fixed, change the probability of viewpoint under the premise of the viewpoint change probability OSRatio based on stock commentator a, viewpoint are correct Viewpoint and holding are kept under the premise of the probability FSRatio of change viewpoint, viewpoint are correct under the premise of TSRatio, viewpoint mistake The correct probability TCTRatio of viewpoint, viewpoint it is correct under the premise of change viewpoint and change the correct probability of viewpoint The correct probability FCTRatio of viewpoint and viewpoint mistake of holding viewpoint and holding under the premise of TSTRatio, viewpoint mistake Under the premise of one of the correct probability FSTRatio of viewpoint or a variety of that changes viewpoint and change;
Wherein, the stock commentator of this trand ticket comment data is a, and comment is stock s, issue date t.
In one embodiment of the invention, diameter is based on using the training of extracted feature vector in embodiment illustrated in fig. 1 Include: to the SVM model of base kernel function
Enable Radial basis kernel function are as follows:
SVM model are as follows:
Wherein, x1And x2It is two feature vectors, γ is the parameter of Radial basis kernel function;Function phi () is by primitive character It is mapped to higher-dimension kernel spacing, to carry out the calculating of optimizing decision hyperplane;
The parameter ω and b of SVM model are calculated by optimizing following objective function:
S.t.yiTφ(ci)+b)≥l-ξi,
ξi>=0, i=1 ..., N,
Wherein, C is the tradeoff parameter of noise and simplified Hyperplane classification in training sample, yiIt is whether stock comments on viewpoint Correct label.
In one embodiment of the invention, utilize the training of share price sequence sets for predicting Stock Price in embodiment illustrated in fig. 1 Machine learning model include:
It is determined as the stock price sequence data of model training collection and test set, it is wherein every in training set or test set One data includes: the continuous several days stock price datas for input model, and the stock one day after as label Closing price;
Based on training set training arma modeling, and collect the prediction effect for verifying model based on verifying
In one embodiment of the invention, SVM model and the machine learning model for predicting Stock Price are integrated, is used Include: in the disaggregated model of evaluation stock comment reliability
Forecasting of Stock Prices based on the machine learning model for predicting Stock Price is as a result, construct following classification equation:
Wherein,It isThe share price of time,It is to be predicted for the machine learning model of predicting Stock PriceStock price one day after,It is stock comment viewpoint polarity, err (ci) it is machine learning mould for predicting Stock Price The standard deviation of the current stock forecast price of type output;
Integrated SVM model and the machine learning model for predicting Stock Price:Wherein, U ∈ [0,1];
The final disaggregated model that reliability is commented on for evaluating stock are as follows:
Wherein, h (ci) be 1 when, indicate stock comment it is reliable;h(ci) be -1 when, indicate stock comment it is unreliable
In one embodiment of the invention, embodiment illustrated in fig. 1 is determined as follows this trand ticket comment data Be expected to rise or viewpoint polarity information expected to fall:
It obtains the training set being made of stock comment data and verifying collects, and the every stock concentrated for training set and verifying Comment data marks viewpoint polarity;
Based on the training set after mark, machine learning model is trained, and based on the test set after mark to study The effect of model is evaluated and tested, and is used to predict the polar machine learning model of stock comment data viewpoint after being trained;
This trand ticket comment data is input to and is used to predict the polar machine learning model of stock comment data viewpoint, is obtained The viewpoint polarity classification information of the stock comment data exported to the model
In one embodiment of the invention, embodiment illustrated in fig. 1 determines the viewpoint of stock commentator a based on following method Polarity distribution information:
Based on stock commentator a to each adjacent stock comment data in the stock comment sequence of same stock, stock is extracted Comment data pair;
It is correct to determine that the viewpoint of stock commentator a changes probability OSRatio, viewpoint for stock comment data pair based on extraction Under the premise of change the probability TSRatio of viewpoint, viewpoint mistake under the premise of to change the probability FSRatio of viewpoint, viewpoint correct Under the premise of keep viewpoint and the correct probability TCTRatio of viewpoint that keeps, viewpoint it is correct under the premise of change viewpoint and change The correct probability TSTRatio of viewpoint, the correct probability of viewpoint that keeps viewpoint under the premise of viewpoint mistake and keep The correct probability FSTRatio of viewpoint for changing viewpoint under the premise of FCTRatio and viewpoint mistake and changing.
The solution proposed by the present invention that Reliability modeling is carried out to stock comment data, the program are one unified Frame, has merged a variety of Heterogeneous Information Sources, such as stock price timing, stock comment text content and delivers stock comment The historical behavior of stock commentator can effectively cross noise filtering, filter out valuable, reliable stock comment information, for investment Person or quant use;Can be applied not only to stock comment information fail-safe analysis, apply also for financial field other Aspect, such as Economic situations analysis, stock are precisely recommended, investment combination management and automated transaction.Specific implementation is as follows:
One, stock comment data cleaning treatment can tentatively wash the stock that internet obtains by data cleansing and comment By the noise of data, comprising:
(1) deleting viewpoint polarity is neutral stock comment data.
(2) sequence data and stock comment data corresponding to stock comment sequence of the length less than 5 are deleted.
Fig. 2 is a stock comment data information schematic diagram, as shown in Fig. 2, a stock comment text includes stock comment person 201 (allan), time 202 (8days ago), viewpoint polarity 203 (BUY, Bullish), target stock 204 (IBM), comment The information such as content 205 (I think there is a support at 173.11).
Wherein, because viewpoint polarity be in immediately, be difficult to be automatically recognized, i.e., deletion viewpoint polarity is neutral stock comment Data needs manually go to screen." length comments on sequence less than 5 stock " refers to that same stock comment people comments same stock By number less than 5.
Fig. 3 is another representation schematic diagram of a stock comment data information, it can be seen from the figure that target stock Be classified as A-share, for quizmaster to whether sh60000 is bought, stock commentator Liu Anlin answers this, comment the time be 2016-12-29, viewpoint polarity are to be expected to rise, and include the polar content of viewpoint are as follows: share price encounters a year line support, it may be considered that it buys in, Viewpoint is for reference.
Fig. 4 is the stock comment data amount schematic diagram after original issue stock comment data amount and cleaning, which is new Unrestrained financial planner website.It can be seen from the figure that the quantity after cleaning greatly reduces, a large amount of stock comment datas is disposed and have made an uproar Sound, and then reduce the calculation amount of follow-up data processing.
Two, stock commentator viewpoint polarity and reliability distribution pattern are excavated, and can pass through stock commentator's historical stock Comment information excavates its stock comment polarity tendency and reliability distribution, comprising:
(1) polarity distribution is commented on by the stock that stock commentator's historical stock comment information counts stock commentator, I.e. publication is expected to rise and probability distribution expected to fall.Excavate stock commentator viewpoint polarity distribution information include it is a kind of in four kinds of modes or It is a variety of, simplified summary are as follows: one-to-one, one-to-many, many-one and multi-to-multi, specifically:
All historical stocks of same stock are directed to based on the same stock commentator in acquired stock comment data Comment data, determines the probability for the stock comment data that stock commentator is expected to rise for stock publication, and determines the stock Ticket commentator issues the probability of stock comment data expected to fall for the stock;
All historical stocks of different stocks are directed to based on the same stock commentator in acquired stock comment data Comment data, determines the probability for the stock comment data that stock commentator publication is expected to rise, and determines stock commentator hair The probability of cloth stock comment data expected to fall;
All historical stocks of same stock are directed to based on the different stock commentators in acquired stock comment data Comment data, determines the probability for the stock comment data that stock commentator is expected to rise for stock publication, and determines that stock is commented The probability of stock comment data expected to fall is issued for the stock by member;
All historical stocks of different stocks are directed to based on the different stock commentators in acquired stock comment data Comment data determines the probability for the stock comment data that publication is expected to rise, and determines and issue the general of stock comment data expected to fall Rate.
(2) reliability point is commented on by the stock that stock commentator's historical stock comment information counts stock commentator Cloth, i.e. stock comment on reliable and unreliable probability distribution.
Three, the identical of views sexual norm of stock commentator excavates, and comments on sequence data by stock commentator's historical stock and digs Dig its identical of views property probability distribution, comprising:
(1) each adjacent stock comment data in sequence is commented on based on stock of the same stock commentator to same stock, Extract stock comment data pair, i.e. 2-gram data pair, the data are to include the polar stock comment data pair of viewpoint;
(2) the stock comment data pair based on extraction counts stock commentator and keeps the probability of viewpoint and change viewpoint Probability.
For example, same stock commentator is to each adjacent stock comment data in the stock comment sequence of same stock are as follows: Be expected to rise, be expected to fall, is expected to fall, be expected to rise, being expected to rise, be based on above-mentioned data, obtain the polar 2-gram data pair of viewpoint, be respectively as follows: be expected to rise, It is expected to fall;It is expected to fall, expected to fall;It is expected to fall, be expected to rise;It is expected to rise, is expected to rise.Based on above-mentioned 2-gram data pair, stock commentator guarantor is counted The probability of viewpoint is held, i.e., identical of views probability is 0.5, and the probability for changing viewpoint is 0.5.
Four, stock commentator viewpoint change pattern is excavated, and comments on Series Data Mining by stock commentator's historical stock Its viewpoint change pattern, comprising:
(1) each adjacent stock comment data in sequence is commented on based on stock of the same stock commentator to same stock, Stock comment data pair is extracted, i.e., viewpoint polarity and sight are extracted to the comment sequence data of same stock using stock commentator Point two kinds of 2-gram data pair of correctness;
(2) the stock comment data pair based on extraction determines that stock commentator changes sight under the premise of viewpoint is correct The probability TSRatio of point, and determine that stock commentator changes the probability FSRatio of viewpoint under the premise of viewpoint mistake, Under the premise of changing the probability TSRatio of viewpoint, viewpoint mistake under the premise of viewpoint is correct to statistics according to viewpoint polarity data Change the probability FSRatio of viewpoint;
(3) the stock comment data pair based on extraction determines that stock commentator keeps seeing under the premise of viewpoint is correct Point, and the correct probability TCTRatio of viewpoint kept, and determine that stock commentator changes under the premise of viewpoint is correct Viewpoint, and the correct probability TSTRatio of viewpoint changed, i.e., keep viewpoint to Statistics according to data under the premise of correct Reliability TCTRatio (i.e. stock commentator previous moment viewpoint is correct, subsequent time still maintains the viewpoint and correct), it sees Change the reliability TSTRatio of viewpoint under the premise of point is correct;
(4) the stock comment data pair based on extraction determines that stock commentator keeps seeing under the premise of viewpoint mistake Point, and the correct probability FCTRatio of viewpoint kept, and determine that stock commentator changes under the premise of viewpoint mistake Viewpoint, and the correct probability FSTRatio of viewpoint changed, i.e., according to data to holding viewpoint under the premise of Statistics mistake Reliability FCTRatio (i.e. stock commentator previous moment viewpoint mistake, subsequent time still maintain the viewpoint and correct), it sees Change the reliability FSTRatio of viewpoint under the premise of point mistake.
For example, same stock commentator is to each adjacent stock comment data in the stock comment sequence of same stock are as follows: Be expected to rise, be expected to fall, is expected to fall, be expected to rise, being expected to rise, be based on above-mentioned data, obtain the polar 2-gram data pair of viewpoint, be respectively as follows: be expected to rise, It is expected to fall;It is expected to fall, expected to fall;It is expected to fall, be expected to rise;It is expected to rise, is expected to rise, while obtaining the 2-gram data pair of viewpoint correctness, corresponding point Not are as follows: correct, correct;It is mistake, correct;Correctly, mistake;Correctly, correctly.
Changing the probability TSRatio of viewpoint under the premise of viewpoint is correct to statistics according to viewpoint polarity data is 0.5, viewpoint The probability FSRatio for changing viewpoint under the premise of mistake is 0;According to data the reliable of viewpoint is kept to Statistics under the premise of correct Property TCTRatio be 0.25, under the premise of viewpoint is correct change viewpoint reliability TSTRatio be 0.25;According to data to statistics It is 0.25 that the reliability FCTRatio of viewpoint is kept under the premise of viewpoint mistake, changes the reliability of viewpoint under the premise of viewpoint mistake FSTRatio is 0.
Five, stock comment viewpoint Check up polarity (o (ci)) utilizes the historical stock comment text data training FM mould of collection Type carries out the classification prediction of viewpoint polarity to stock comment data based on trained FM model, wherein FM model, that is, machine learning Model is a kind of existing algorithm model, but the present invention has carried out specially treated to it, is applied to stock viewpoint Check up polarity, It specifically includes:
(1) it obtains the training set being made of stock comment text and verifying collects, and every concentrated for training set and verifying Stock comment text marks viewpoint polarity, that is, determines training set, development set and test set stock comment text, wherein development set and Test set is similar, is referred to as verifying collection.Wherein, development set obtains most for optimizing in the training process to model parameter Excellent model, test set is for testing the effect of model after training;Viewpoint is polar to be labeled as manually marking, i.e., artificial mark Infuse the feeling polarities (being expected to rise or expected to fall) of every stock comment text in training set and test set.
(2) word segmentation processing being carried out to training set text, statistics obtains dictionary, for example, " I thinks that tomorrow, stock can rise ", it can Participle are as follows: " I ", " thinking ", " tomorrow ", " stock ", " meeting ", " rising ", the similar segmenting method, statistics obtain dictionary.
(3) it is based on the dictionary, determines the TF-IDF feature of every stock comment text in training set, this feature is dictionary The vector of size, each dimension are TF-IDF value of the corresponding words based on the text.
TF-IDF (term frequency-inverse document frequency) be it is a kind of for information retrieval with The common weighting technique of data mining.TF means word frequency (Term Frequency), and IDF means inverse document frequency (Inverse Document Frequency).The main thought of TFIDF is: if some word or phrase go out in an article Existing frequency is high, and seldom occurs in other articles, then it is assumed that and this word or phrase have good class discrimination ability, It is adapted to classify.TFIDF is actually: TF*IDF, TF word frequency (Term Frequency), the reverse document-frequency of IDF (Inverse Document Frequency).TF indicates the frequency that entry occurs in document d.The main thought of IDF is: such as Document of the fruit comprising entry t is fewer, that is, n smaller, and IDF is bigger, then illustrates that entry t has good class discrimination ability. If the number of files comprising entry t is m in certain a kind of document C, and the total number of documents that other classes include t is k, it is clear that all to include The number of files n=m+k of t, when m is big, n is also big, and the value of the IDF obtained according to IDF formula can be small, just illustrates entry t Class discrimination is indifferent.
In simple terms, the everyday words often occurred in some other documents occurred in training set, such as " ", " " Deng the important ratio of these words is lower, and the viewpoint polarity of " being expected to rise ", " expected to fall " etc occurred in stock comment text Word, importance are higher.TF-IDF is exactly the feature for evaluating the importance of each word in dictionary.
It is the vector of dictionary size about the TF-IDF feature, each dimension is TF- of the corresponding words based on the text The understanding of IDF value, for example, contain 1000 words in 100 sentences altogether, then the vector of each sentence is 1000 dimensions, For example the initial vector is [1,0,0 ... ... 1], wherein 1 represents target word and occurs in sentence, 0 represents target word in sentence Do not occur, 1 and 0 in initial vector will be obtained multiplied by the TF-IDF value of the stock comment text that is, multiplied by the weight of the word To the TF-IDF feature of stock comment text.
(4) feature is extracted from the stock comment text of training set, using the feature of extraction as the defeated of machine learning model Enter, using the viewpoint polarity classification information of stock comment text as the output of machine learning model;Training set stock is commented on For the TF-IDF feature of text as mode input feature, it is output that stock, which comments on feeling polarities, i.e. output is expected to rise or expected to fall, That is output 1 or 0.
(5) sight of the viewpoint polarity classification information of the output based on machine learning model and respective stock comment text mark Point-polarity, the loss of computing machine learning model, and the parameter based on calculated loss Learning machine learning model;It is based on Training set utilizes the method optimizing of cross validation using the stochastic gradient descent calligraphy learning FM model parameter of adaptive regularization The value of hyper parameter k in FM model is adjusted, wherein the value of hyper parameter k is artificial specified value.
(6) based on verifying collection, FM modelling effect is evaluated and tested, specifically: feature is extracted from the stock comment text of verifying collection, The feature of extraction is input in machine learning model, the viewpoint polarity of the stock comment text of machine learning model output is obtained Classification information;The viewpoint of viewpoint polarity classification information and respective stock the comment text mark of output based on machine learning model Polarity evaluates and tests the effect of machine learning model.
(7) (5), (6) and (7) are repeated, until FM effect meets the requirements (such as accuracy rate is greater than 95%), then completes FM model Training.
(8) it is based on trained FM model, the classification of viewpoint polarity is carried out to stock comment text, is obtainedAttribute.
(9) reliability of each stock comment is calculated according to (formula 1)
Wherein,The date is represented,ForStock price,ForSecond day stock valence Lattice,It is 0 or 1.
(10) corresponding structural data is generated for stock comment text, which includes: stock commentator mark Know, comment on time, target stock, viewpoint polarity and reliability index, is i.e. building stock comments on cell data ci={ d (ci), a (ci), s (ci), t (ci), o (ci), r (ci) }, wherein d (ci) is comment content, and a (ci) is stock commentator mark, s It (ci) is target stock, t (ci) is the comment time, and o (ci) is viewpoint polarity, and r (ci) is reliability index.
Six, stock comment information reliability scoring method, i.e., to the reliable of a certain stock comment information of some stock commentator Property marking.Extract key feature from stock comment sequence, share price sequence and stock comment person's historical behavior data, based on disaggregated model and when Between the integrated study frame of series analysis model give a mark to the reliability of stock comment information, specifically include:
(1) feature vector is extracted based on stock comment data collection and share price sequence sets, firstly, being based on stock comment data collection In at least partly stock comment data in each stock comment data, extract one of following feature or a variety of compositions One feature vector:
This trand ticket comment data be expected to rise or viewpoint polarity information expected to fall;On how to determine that this trand ticket comments on number According to be expected to rise or viewpoint polarity information expected to fall, be elaborated in step 5, details are not described herein.
In all stock comment datas for stock s that the t same day is issued, the stock comment data quantity be expected to rise is seen The stock comment data quantity fallen;
It is issued in the past first preset length time from t days, in all stock comment datas for stock s, Stock comment data quantity, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and the sight being expected to rise The stock comment data quantity of point mistake;
The price series of stock s from t days in the past second preset length time;
The stock s that machine learning model for predicting Stock Price is predicted is defeated in the price of next day of trade and the model Standard deviation out;
From t days in the past third preset length time, in all stock comment datas of stock commentator a publication, Stock comment data quantity, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and the sight being expected to rise The stock comment data quantity of point mistake;
From t days in the past 4th preset length time, the stock for stock s of stock commentator a publication is commented on In data, stock comment data quantity, the stock comment data quantity expected to fall, the correct stock comment data number of viewpoint be expected to rise The stock comment data quantity of amount and viewpoint mistake;
The stock comment sequence issued in the past 5th preset length time from t days based on stock commentator a is true Fixed, change the probability of viewpoint under the premise of the viewpoint change probability OSRatio based on stock commentator a, viewpoint are correct Viewpoint and holding are kept under the premise of the probability FSRatio of change viewpoint, viewpoint are correct under the premise of TSRatio, viewpoint mistake The correct probability TCTRatio of viewpoint, viewpoint it is correct under the premise of change viewpoint and change the correct probability of viewpoint The correct probability FCTRatio of viewpoint and viewpoint mistake of holding viewpoint and holding under the premise of TSTRatio, viewpoint mistake Under the premise of one of the correct probability FSTRatio of viewpoint or a variety of that changes viewpoint and change;
Wherein, the stock commentator of this trand ticket comment data is a, and comment is stock s, issue date t.
On how to the viewpoint polarity distribution information of determining stock commentator a, it has been elaborated in step 3, Details are not described herein.
For example, key feature is extracted from stock comment sequence, share price sequence and stock comment person's historical behavior data, the key Feature includes: viewpoint polarity, historical stock state, price timing and stock commentator's historical behavior.Wherein, viewpoint polarity is to work as Preceding comment be expected to rise or it is expected to fall;Historical stock state includes two kinds of situations: first is not consider the time, all needles of same day publication To stock comment data quantity, the stock comment data quantity expected to fall in the stock comment data of stock s, being expected to rise;Second is In stock comment in past 7 days in all stock comment datas for stock s, the stock comment data quantity be expected to rise is seen The stock comment data quantity of the correct stock comment data quantity of stock comment data quantity, viewpoint and viewpoint mistake fallen; Price timing includes: the price series of stock s and the second day price predicted with arma modeling and defeated in 25 days in the past Standard deviation out;Stock comment person's historical behavior include: some stock comment person a made within past 7/30/90 day be expected to rise/it is expected to fall/just Really/mistake stock number of reviews;Some stock comment person to current stock made within past 7/30/90 day be expected to rise/it is expected to fall/just Really/mistake stock number of reviews;It is determined based on some stock comment person a in the stock comment sequence of publication in the past 7/30/90 day One of OSRatio, TSRatio, FSRatio, TCTRatio, TSTRatio or a variety of.
(2) the support vector machines model of Radial basis kernel function (formula 2) is based on using the training of extracted feature vector:
Enable Radial basis kernel function are as follows:
Wherein, x1And x2It is two feature vectors, variable can also be become;γ is the parameter of Radial basis kernel function, is generally set Be set to 1 divided by feature sum, such as 10000 features, then r is set to 0.0001;φ () maps primitive character To higher-dimension kernel spacing, in order to carry out the calculating of optimizing decision hyperplane (formula 3);
SVM model are as follows:
The principle of SVM is to solve for correctly dividing the maximum separating hyperplance of training dataset and geometry interval.It is defeated Entering is some feature samples points, and model can determine two things: 1, all data in one hyperplane of study, this hyperplane Point is ideally divided into two classes, and the output of the first kind is 1 (corresponding reliable stock comment), and the output of the second class is 0 (corresponding not reliable stock Comment) 2, all data points it is more remoter better with a distance from hyperplane.
If it (is all linearly can not in most cases that feature samples point, which is linearly inseparable in original space, Point), then it is desirable that he is mapped in higher dimensional space the mapping for making problem become linear separability, using by a kind of mapping It is exactly kernel function.
(3) pass through optimization (formula 4) calculating parameter ω and b:
St.yiTφ(ci)+b)≥1-ξi,
ξi>=0, i=1 ..., N, (formula 4)
Wherein C is the tradeoff parameter of noise and simplified Hyperplane classification in training sample, yiIt is whether stock comments on viewpoint Correct label.These three parameters of ω, b, ξ are all the parameters for needing model training to learn, and wherein ω and b is SVM model Two parameters being used in prediction;S.t. represent it is subsequent be front constraint condition, i.e., after two rows be the first row target The constraint condition of function.yiIt is the boundary of objective function, this boundary will be the bigger the better.
(4) training of share price sequence sets is utilized to be used for the machine learning model of predicting Stock Price, such as arma modeling, comprising:
A. training set and test set stock price sequence data are determined, input data is continuous several stock price data, Output is stock price data one day after;It is determined as the stock price sequence data of model training collection and test set, wherein instructing The each data practiced in collection or test set include: for the continuous several days stock price datas of input model and conduct The stock price data one day after of label;
B. based on training set training arma modeling, and collect the prediction effect for verifying model based on verifying;I.e. based on training set, Using maximal possibility estimation training arma modeling parameter, tuning is carried out to parameter p and q based on BIC criterion, based on trained Arma modeling lasts the share price of share price data prediction one day after using certain stock, verifies the prediction effect based on verifying collection.
Generally speaking, based on the Forecasting of Stock Prices of Time Series Analysis Model, stock historical price sequence, training ARMA are utilized Model, the price based on trained arma modeling prediction stock one day after.
(5) SVM model and the machine learning model for predicting Stock Price are integrated, is obtained for evaluating stock comment reliability Disaggregated model;I.e. based on Forecasting of Stock Prices result building classification equation, such as following formula 5:
Wherein,It isThe share price of time,It isThe predicted value of second day share price,It is stock comment Viewpoint feeling polarities, err (ci) be share price sequence data standard deviation, i.e., the error of Forecasting of Stock Prices value that currently exports of model or It is confidence value that person, which says,.
(6) SVM model and arma modeling are integrated, final classification function is obtained, such as following formula 6:
h(ci) be 1 when, indicate stock comment it is reliable;When being -1, indicate that stock comment is unreliable.WhereinCalculation formula is as follows Formula 7:
[0,1] u ∈ in formula 7 is the weighting coefficient of SVM and arma modeling prediction result, is determined by experiment u=0.59 effect Fruit is best.
Stock comment reliability classification exact value 8 can be calculated according to the following formula:
As r υ (ci) it is higher when, it is more reliable to stock comment classification results.(formula 8) is the absolute value of the output result of (formula 7).
Seven, the probability calculation that stock rises or falls passes through the correlated characteristic and measurement extracted during stock comment degree of reiability As a result, calculating the probability that stock rises or falls, comprising:
(1) according to the following formula 9 calculate the branch stock ups and downs probability cf (sj):
Wherein,Indicate stock comment data collectionIn stock comment data quantity, i.e., all stock number of reviews Summation, ciIndicate a stock comment data,For the viewpoint polarity of this trand ticket comment data,For this trand ticket The reliability index of comment data, r υ (ci) it is the exact value that reliability classification is carried out to this trand ticket comment data.
(2) 10 advance versus decline is predicted according to the following formula:
(3) probability that 11 calculating stocks rise or fall according to the following formula:
w(sj)=| cf (sj) | (formula 11)
As cf (sjWhen) >=0, w (sj) value it is bigger, the probability for illustrating that stock rises is larger, as cf (sj) < 0 when, w (sj) Value is bigger, and the probability for illustrating that stock falls is larger.
Eight, stock comment reliability model is completed, when specified viewpoint information inquiry request of the reception about stock commentator Export result data corresponding with the inquiry request.
Nine, the equity investment based on stock comment reliability model measurement, is based on the reliable stock of stock comment data reliability model discrimination It comments, and is invested according to this, comprising:
(1) the probability w (s that stock rises or falls is calculated to stocks all in stock pondj), wherein sjFor single stock;
(2) a variety of intelligent share-selecting methods:
A. the stock for choosing the highest predetermined number of probability for rising and rising carries out suggestion for investment, and capital authority reselection procedure is average The mode of weighting;That is the highest K stock of screening amount of increase index is as suggestion for investment, and capital authority reselection procedure average weighted Mode, i.e. every stock average investment G/K member, wherein G is the gross investment amount of money;
B. choose and rise and the stock of the highest predetermined number of probability that rises carries out suggestion for investment, and capital authority reselection procedure according to The mode of the probability weight to rise;That is K highest stock of screening amount of increase index is as suggestion for investment, and capital authority reselection procedure is pressed According to the mode of amount of increase exponential weighting, i.e. stock siInvestment
C. the highest stock of probability for rising and rising is chosen from each Stock block, and capital authority reselection procedure averagely adds The mode of power;The highest stock of amount of increase index is selected in i.e. each column as suggestion for investment, altogether M (M=10) a plate Block (see the table below 1), and the mode of capital authority reselection procedure average weighted, i.e. every equity investment G/M member.
Table1:Sectors of stock symbols
Table 1 is stock column information, and Category represents column name, and #Covered Symbols represents the number of share of stock in column Mesh.
D. the highest stock of probability for rising and rising is chosen from each Stock block, and capital authority reselection procedure is according to rising Probability weight mode;The highest stock of amount of increase index is selected in i.e. each column as suggestion for investment, altogether M (M= 10) a plate, and the mode of capital authority reselection procedure average weighted, i.e. every stock siInvestment
E. the one or more highest stock of the probability for rising and rising is chosen from each Stock block, is selected between each plate Average weighted mode is selected, is selected in the way of the probability weight to rise between the stock of each plate of selection;It is i.e. above-mentioned to select stocks Then the combination of method, such as respectively select the highest stock of Km amount of increase from each column first with average weighted or is pressed According to the mode of amount of increase exponential weighting, each stock is invested.It wherein can also be according to average to the gross investment of each column It weights or in the way of amount of increase exponential weighting.
Fig. 5 is using the profit situation schematic diagram after intelligence share-selecting method c selection stock, in January, 2016 to 2016 It selects December intelligence share-selecting method c to carry out simulation investment, each day of trade chooses K equity investment, get a profit situation such as Fig. 5 institute Show, invests 10000 yuan, K=M, every stock 10000/M altogether.
Fig. 6 shows a kind of schematic device for calculating advance versus decline probability according to an embodiment of the invention, wherein The device 60 includes:
Acquiring unit 601 is suitable for obtaining for same branch stock sjStock comment data collection
Computing unit 602, suitable for calculating the ups and downs probability cf (s of the branch stock according to the following formulaj):
Wherein,Indicate stock comment data collectionIn stock comment data quantity, ciIndicate a stock comment Data,For the viewpoint polarity of this trand ticket comment data,For the reliability index of this trand ticket comment data, r υ (ci) it is the exact value that reliability classification is carried out to this trand ticket comment data;
As cf (sjWhen) >=0, stock sjRise, and the probability to rise is | cf (sj)|;
As cf (sj) < 0 when, stock sjFall, and the probability to rise is | cf (sj)|。
Fig. 7 shows another schematic device for calculating advance versus decline probability according to an embodiment of the invention, In, which includes: acquiring unit 601 and computing unit 602, and wherein computing unit 602 includes viewpoint polarity predicting unit 701, stock comment reliability determination unit 702, stock comment reliability classification unit 703.Acquiring unit 601 and computing unit 602 are in Fig. 6 It has been elaborated in illustrated embodiment, details are not described herein.
Viewpoint polarity predicting unit 701 is suitable for determining the viewpoint polarity of a stock comment data according to the following method
It obtains the training set being made of stock comment data and verifying collects, and the every stock concentrated for training set and verifying Comment data marks viewpoint polarity;
Based on the training set after mark, machine learning model is trained, and based on the test set after mark to study The effect of model is evaluated and tested, the machine learning model after being trained;
The relevant information of stock comment data to be predicted is input to the machine learning model after training, obtains the machine The viewpoint polarity classification information of the stock comment data of learning model output, and being determined according to the viewpoint polarity classification information should The viewpoint polarity of stock comment data
Stock comment reliability determination unit 702, suitable for determining that the reliability of a stock comment data refers to according to the following formula Number
Wherein,The date is represented,It isStock price,It isStock valence one day after Lattice,It is stock comment viewpoint.
Stock comment reliability classification unit 703 is suitable for according to as under type is determining reliable to a stock comment data progress Property classification exact value r υ (ci):
Feature vector is extracted based on stock comment data collection and share price sequence sets;
Utilize support vector machines model of the extracted feature vector training based on Radial basis kernel function;
The machine learning model of predicting Stock Price is used for using the training of share price sequence sets;
Integrated SVM model and the machine learning model for predicting Stock Price are obtained for evaluating stock comment reliability Disaggregated model
Thenrυ(ci) value it is bigger, indicate to stock comment reliability classification results it is more reliable.
Stock comment reliability classification unit 703, suitable for at least partly stock comment data concentrated based on stock comment data In each stock comment data, extract one feature vector of one of following feature or a variety of compositions:
This trand ticket comment data be expected to rise or viewpoint polarity information expected to fall;
In all stock comment datas for stock s that the t same day is issued, the stock comment data quantity be expected to rise is seen The stock comment data quantity fallen;
It is issued in the past first preset length time from t days, in all stock comment datas for stock s, Stock comment data quantity, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and the sight being expected to rise The stock comment data quantity of point mistake;
The price series of stock s from t days in the past second preset length time;
The stock s that machine learning model for predicting Stock Price is predicted is defeated in the price of next day of trade and the model Standard deviation out;
From t days in the past third preset length time, in all stock comment datas of stock commentator a publication, Stock comment data quantity, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and the sight being expected to rise The stock comment data quantity of point mistake;
From t days in the past 4th preset length time, the stock for stock s of stock commentator a publication is commented on In data, stock comment data quantity, the stock comment data quantity expected to fall, the correct stock comment data number of viewpoint be expected to rise The stock comment data quantity of amount and viewpoint mistake;
The stock comment sequence issued in the past 5th preset length time from t days based on stock commentator a is true Fixed, change the probability of viewpoint under the premise of the viewpoint change probability OSRatio based on stock commentator a, viewpoint are correct Viewpoint and holding are kept under the premise of the probability FSRatio of change viewpoint, viewpoint are correct under the premise of TSRatio, viewpoint mistake The correct probability TCTRatio of viewpoint, viewpoint it is correct under the premise of change viewpoint and change the correct probability of viewpoint The correct probability FCTRatio of viewpoint and viewpoint mistake of holding viewpoint and holding under the premise of TSTRatio, viewpoint mistake Under the premise of one of the correct probability FSTRatio of viewpoint or a variety of that changes viewpoint and change;
Wherein, the stock commentator of this trand ticket comment data is a, and comment is stock s, issue date t.
Stock comment reliability classification unit 703 utilizes SVM mould of the extracted feature vector training based on Radial basis kernel function Type specifically:
Enable Radial basis kernel function are as follows:
SVM model are as follows:
Wherein, x1And x2It is two feature vectors, γ is the parameter of Radial basis kernel function;Function phi () is by primitive character It is mapped to higher-dimension kernel spacing, to carry out the calculating of optimizing decision hyperplane;
The parameter ω and b of SVM model are calculated by optimizing following objective function:
s.t.yiTφ(ci)+b)≥l-ξi,
ξi>=0, i=1 ..., N,
Wherein, C is the tradeoff parameter of noise and simplified Hyperplane classification in training sample, yiIt is whether stock comments on viewpoint Correct label.
Stock comment reliability classification unit 703 utilizes machine learning model of the share price sequence sets training for predicting Stock Price specific Are as follows:
It is determined as the stock price sequence data of model training collection and test set, it is wherein every in training set or test set One data includes: the continuous several days stock price datas for input model, and the stock one day after as label Closing price;
Based on training set training arma modeling, and collect the prediction effect for verifying model based on verifying
Stock comment reliability classification unit 703 integrates SVM model and the machine learning model for predicting Stock Price, is used for Evaluate the disaggregated model of stock comment reliability specifically:
Forecasting of Stock Prices based on the machine learning model for predicting Stock Price is as a result, construct following classification equation:
Wherein,It isThe share price of time,It is to be predicted for the machine learning model of predicting Stock PriceStock price one day after,It is stock comment viewpoint polarity, err (ci) it is machine learning mould for predicting Stock Price The standard deviation of the current stock forecast price of type output;
Integrated SVM model and the machine learning model for predicting Stock Price:Wherein, U ∈ [0,1];
The final disaggregated model that reliability is commented on for evaluating stock are as follows:
Wherein, h (ci) be 1 when, indicate stock comment it is reliable;h(ci) be -1 when, indicate stock comment it is unreliable
Stock comment reliability classification unit 703, suitable for being determined as follows being expected to rise or seeing for this trand ticket comment data The viewpoint polarity information fallen:
It obtains the training set being made of stock comment data and verifying collects, and the every stock concentrated for training set and verifying Comment data marks viewpoint polarity;
Based on the training set after mark, machine learning model is trained, and based on the test set after mark to study The effect of model is evaluated and tested, and is used to predict the polar machine learning model of stock comment data viewpoint after being trained;
This trand ticket comment data is input to and is used to predict the polar machine learning model of stock comment data viewpoint, is obtained The viewpoint polarity classification information of the stock comment data exported to the model.
Stock comment reliability classification unit 703, suitable for determining that the viewpoint polarity distribution of stock commentator a is believed based on following method Breath:
Based on stock commentator a to each adjacent stock comment data in the stock comment sequence of same stock, stock is extracted Comment data pair;
It is correct to determine that the viewpoint of stock commentator a changes probability OSRatio, viewpoint for stock comment data pair based on extraction Under the premise of change the probability TSRatio of viewpoint, viewpoint mistake under the premise of to change the probability FSRatio of viewpoint, viewpoint correct Under the premise of keep viewpoint and the correct probability TCTRatio of viewpoint that keeps, viewpoint it is correct under the premise of change viewpoint and change The correct probability TSTRatio of viewpoint, the correct probability of viewpoint that keeps viewpoint under the premise of viewpoint mistake and keep The correct probability FSTRatio of viewpoint for changing viewpoint under the premise of FCTRatio and viewpoint mistake and changing.
In conclusion being directed to same branch stock s by obtainingjStock comment data collectionIt calculates according to the following formula The ups and downs probability cf (s of the branch stockj):
Wherein,Indicate stock comment data collectionIn stock comment data quantity, ciIndicate a stock comment Data,For the viewpoint polarity of this trand ticket comment data,For the reliability index of this trand ticket comment data, r υ (ci) it is the exact value that reliability classification is carried out to this trand ticket comment data;As cf (sjWhen) >=0, stock sjRise, and it is general to rise Rate is | cf (sj)|;As cf (sj) < 0 when, stock sjFall, and the probability fallen is | cf (sj)|.The present invention is to existing engineering It practises model and carries out specially treated and training, the classification prediction of viewpoint polarity is carried out to stock comment data, so that stock to be predicted Being somebody's turn to do for machine learning model output can be obtained after being input to the machine learning model after training in the relevant information of comment text The viewpoint polarity classification information of stock comment text calculates advance versus decline probability, carries out stock throwing according to advance versus decline probability Money, convenient and efficient, accuracy is high, and has merged a variety of Heterogeneous Information Sources, such as in stock price timing, stock comment text Hold and deliver the historical behavior for the stock commentator that stock is commented on, the multi-source heterogeneous big data is based on, by data mining skill Key feature is analysed in depth and extracted to art, carries out stock using these features and comments on degree of reiability, can effectively cross noise filtering, Valuable, reliable stock comment information is filtered out from massive information, chooses good quality stock, can help investor more Accurately understand the general trend of market development and stock dynamic, is used for investor or quant.This method can be applied not only to stock Ticket comment information fail-safe analysis applies also for other aspects of financial field, as Economic situations analysis, stock precisely recommends, Investment combination management and automated transaction etc..
It should be understood that
Algorithm and display be not inherently related to any certain computer, virtual bench or other equipment provided herein. Various fexible units can also be used together with teachings based herein.As described above, it constructs required by this kind of device Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit requires, abstract and attached drawing) disclosed in each feature can be by providing identical, equivalent, or similar purpose alternative features come generation It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize the typing dress of taking pictures of word content according to an embodiment of the present invention It sets, some or all functions of some or all components in electronic equipment and computer readable storage medium.The present invention Be also implemented as executing method as described herein some or all device or device program (for example, Computer program and computer program product).It is such to realize that program of the invention can store on a computer-readable medium, Or it may be in the form of one or more signals.Such signal can be downloaded from an internet website to obtain, or It is provided on the carrier signal, or is provided in any other form.
For example, Fig. 8 is the structural schematic diagram of the electronic equipment in the embodiment of the present invention.The electronic equipment 800 includes: processing Device 810, and it is stored with the memory 820 for the computer program that can be run on the processor 810.Processor 810, is used for Each step of method in the present invention is executed when executing the computer program in the memory 820.Memory 820 can be all Such as the electronic memory of flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk or ROM etc.It deposits Reservoir 820 has the memory space 830 stored for executing the computer program 731 of any method and step in the above method. Computer program 831 can read or be written to this one or more meter from one or more computer program product In calculation machine program product.These computer program products include such as hard disk, compact-disc (CD), storage card or floppy disk etc Program code carrier.Such computer program product is usually computer readable storage medium described in such as Fig. 9.
Fig. 9 is the structural schematic diagram of one of embodiment of the present invention computer readable storage medium.This is computer-readable Storage medium 900 is stored with the computer program 831 for executing steps of a method in accordance with the invention, can be by electronic equipment 800 processor 810 is read, and when computer program 831 is run by electronic equipment 800, the electronic equipment 800 is caused to execute Each step in method described in face, specifically, the calculation procedure 831 of the computer-readable recording medium storage can be with Execute method shown in any of the above-described embodiment.Computer program 831 can be compressed in a suitable form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.

Claims (10)

1. a kind of method for calculating advance versus decline probability, wherein this method comprises:
It obtains and is directed to same branch stock sjStock comment data collection
The ups and downs probability cf (s of the branch stock is calculated according to the following formulaj):
Wherein,Indicate stock comment data collectionIn stock comment data quantity, ciIndicate a stock comment data,For the viewpoint polarity of this trand ticket comment data,For the reliability index of this trand ticket comment data, r υ (ci) it is pair The exact value of this trand ticket comment data progress reliability classification;
As cf (sjWhen) >=0, stock sj rises, and the probability to rise is | cf (sj)|;
As cf (sj) < 0 when, stock sjFall, and the probability fallen is | cf (sj)|。
2. the method for claim 1, wherein determining the viewpoint polarity of a stock comment data according to the following method
The every stock comment for obtaining the training set being made of stock comment data and verifying collecting, and concentrated for training set and verifying Data mark viewpoint polarity;
Based on the training set after mark, machine learning model is trained, and based on the test set after mark to the study The effect of model is evaluated and tested, the machine learning model after being trained;
The relevant information of stock comment data to be predicted is input to the machine learning model after the training, obtains the machine The viewpoint polarity classification information of the stock comment data of learning model output, and being determined according to the viewpoint polarity classification information should The viewpoint polarity of stock comment data.
3. the method for claim 1, wherein determining the reliability index of a stock comment data according to the following formula
Wherein,The date is represented,It isStock price,It isStock price one day after,It is stock comment viewpoint polarity.
4. the method for claim 1, wherein carrying out reliability to a stock comment data according to as under type is determined The exact value r υ (c of classificationi):
Feature vector is extracted based on stock comment data collection and share price sequence sets;
Utilize support vector machines model of the extracted feature vector training based on Radial basis kernel function;
The machine learning model of predicting Stock Price is used for using the training of share price sequence sets;
The SVM model and the machine learning model for predicting Stock Price are integrated, is obtained for evaluating stock comment reliability Disaggregated model
Thenrυ(ci) value it is bigger, indicate to stock comment reliability classification results it is more reliable.
5. method as claimed in claim 4, wherein it is described based on stock comment data collection and share price sequence sets extract feature to Amount includes:
The each stock comment data at least partly stock comment data concentrated based on the stock comment data, is extracted One of following feature or one feature vector of a variety of compositions:
This trand ticket comment data be expected to rise or viewpoint polarity information expected to fall;
It is the stock comment data quantity be expected to rise, expected to fall in all stock comment datas for stock s that the t same day is issued Stock comment data quantity;
It issues in the past first preset length time from t days, in all stock comment datas for stock s, is expected to rise Stock comment data quantity, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and viewpoint it is wrong Stock comment data quantity accidentally;
The price series of stock s from t days in the past second preset length time;
The stock s that the machine learning model for predicting Stock Price is predicted is defeated in the price of next day of trade and the model Standard deviation out;
From t days in the past third preset length time, in all stock comment datas of stock commentator a publication, it is expected to rise Stock comment data quantity, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and viewpoint it is wrong Stock comment data quantity accidentally;
From t days in the past 4th preset length time, the stock comment data for stock s of stock commentator a publication In, the stock comment data quantity be expected to rise, stock comment data quantity expected to fall, the correct stock comment data quantity of viewpoint and The stock comment data quantity of viewpoint mistake;
It is determined based on the stock comment sequence of stock commentator a issued in the past 5th preset length time from t days, Change the probability TSRatio of viewpoint under the premise of viewpoint change probability OSRatio based on stock commentator a, viewpoint are correct, see Viewpoint is kept under the premise of the probability FSRatio of change viewpoint, viewpoint are correct under the premise of point mistake and the viewpoint kept is correct Probability TCTRatio, viewpoint it is correct under the premise of change viewpoint and the correct probability TSTRatio of viewpoint that changes, viewpoint are wrong Change viewpoint under the premise of holding viewpoint and the correct probability FCTRatio of viewpoint kept and viewpoint mistake under the premise of accidentally And one of correct probability FSTRatio of viewpoint changed or a variety of;
Wherein, the stock commentator of this trand ticket comment data is a, and comment is stock s, issue date t.
6. method as claimed in claim 4, wherein described to be based on Radial basis kernel function using the training of extracted feature vector SVM model include:
Enable Radial basis kernel function are as follows:
SVM model are as follows:
Wherein, x1And x2It is two feature vectors, γ is the parameter of Radial basis kernel function;Function phi () maps primitive character To higher-dimension kernel spacing, to carry out the calculating of optimizing decision hyperplane;
The parameter ω and b of SVM model are calculated by optimizing following objective function:
s.t. yiTφ(ci)+b)≥1-ξi,
ξi>=0, i=1 ..., N,
Wherein, C is the tradeoff parameter of noise and simplified Hyperplane classification in training sample, yiIt is whether stock comment viewpoint is correct Label.
7. method as claimed in claim 4, wherein the machine learning for being used for predicting Stock Price using the training of share price sequence sets Model includes:
It is determined as the stock price sequence data of model training collection and test set, wherein each in training set or test set Data include: the continuous several days stock price datas for input model, and as the stock closing quotation one day after of label Valence;
Based on training set training arma modeling, and collect the prediction effect for verifying model based on verifying.
8. calculating the device of advance versus decline probability, wherein the device includes:
Acquiring unit is suitable for obtaining for same branch stock sjStock comment data collection
Computing unit, suitable for calculating the ups and downs probability cf (s of the branch stock according to the following formulaj):
Wherein,Indicate stock comment data collectionIn stock comment data quantity, ciIndicate a stock comment data,For the viewpoint polarity of this trand ticket comment data,For the reliability index of this trand ticket comment data, r υ (ci) it is pair The exact value of this trand ticket comment data progress reliability classification;
As cf (sjWhen) >=0, stock sjRise, and the probability to rise is | cf (sj)|;
As cf (sj) < 0 when, stock sjFall, and the probability to rise is | cf (sj)|。
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes: processor, and being stored with can be on a processor The memory of the computer program of operation;
Wherein, the processor, for when executing the computer program in the memory perform claim require it is any in 1-7 Method described in.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt Processor realizes method of any of claims 1-7 when executing.
CN201810942728.4A 2018-08-17 2018-08-17 The method and apparatus for calculating advance versus decline probability Pending CN109242160A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810942728.4A CN109242160A (en) 2018-08-17 2018-08-17 The method and apparatus for calculating advance versus decline probability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810942728.4A CN109242160A (en) 2018-08-17 2018-08-17 The method and apparatus for calculating advance versus decline probability

Publications (1)

Publication Number Publication Date
CN109242160A true CN109242160A (en) 2019-01-18

Family

ID=65071724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810942728.4A Pending CN109242160A (en) 2018-08-17 2018-08-17 The method and apparatus for calculating advance versus decline probability

Country Status (1)

Country Link
CN (1) CN109242160A (en)

Similar Documents

Publication Publication Date Title
US10417523B2 (en) Dimension grouping and reduction for model generation, testing, and documentation
US9881080B2 (en) System for enhancing expert-based computerized analysis of a set of digital documents and methods useful in conjunction therewith
CN109299252A (en) The viewpoint polarity classification method and device of stock comment based on machine learning
CN101408887B (en) Recommending terms to specify body space
US7730023B2 (en) Apparatus and method for strategy map validation and visualization
CN101408886B (en) Selecting tags for a document by analyzing paragraphs of the document
US8533194B1 (en) System for enhancing expert-based computerized analysis of a set of digital documents and methods useful in conjunction therewith
CN109035025A (en) The method and apparatus for evaluating stock comment reliability
Ahmed et al. Clarify of the random forest algorithm in an educational field
US10083263B2 (en) Automatic modeling farmer
Forte Mastering predictive analytics with R
CN106227756A (en) A kind of stock index forecasting method based on emotional semantic classification and system
Sumathi et al. Data mining: analysis of student database using classification techniques
CN112215696A (en) Personal credit evaluation and interpretation method, device, equipment and storage medium based on time sequence attribution analysis
CN109300030A (en) Realize the method and apparatus that equity investment is recommended
CN109300031A (en) Data digging method and device based on stock comment data
US20210090101A1 (en) Systems and methods for business analytics model scoring and selection
Arifin et al. Comparative analysis on educational data mining algorithm to predict academic performance
CN108345622A (en) Model retrieval method based on semantic model frame and device
CN109242160A (en) The method and apparatus for calculating advance versus decline probability
Tunç Feature selection in credibility study for finance sector
CN113505117A (en) Data quality evaluation method, device, equipment and medium based on data indexes
CA3160715A1 (en) Systems and methods for business analytics model scoring and selection
CN112506930A (en) Data insight platform based on machine learning technology
Elsid et al. Data Mining: Classification Techniques of Students’ Database A Case Study of the Nile Valley University, North Sudan

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