CN107895051A - A kind of stock news quantization method and system based on artificial intelligence - Google Patents

A kind of stock news quantization method and system based on artificial intelligence Download PDF

Info

Publication number
CN107895051A
CN107895051A CN201711294146.1A CN201711294146A CN107895051A CN 107895051 A CN107895051 A CN 107895051A CN 201711294146 A CN201711294146 A CN 201711294146A CN 107895051 A CN107895051 A CN 107895051A
Authority
CN
China
Prior art keywords
mrow
msub
news
stock
lexical item
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
CN201711294146.1A
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.)
Peking University
Original Assignee
Hong Gu Information Technology (zhuhai) 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 Hong Gu Information Technology (zhuhai) Co Ltd filed Critical Hong Gu Information Technology (zhuhai) Co Ltd
Priority to CN201711294146.1A priority Critical patent/CN107895051A/en
Publication of CN107895051A publication Critical patent/CN107895051A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Accounting & Taxation (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Finance (AREA)
  • Biophysics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of stock news quantization method and system based on artificial intelligence, to solve the problems, such as that the news reference factor of existing Prediction of Stock Index has one-sidedness.This method includes:Obtain the stock news sequence of the day of trade in preset time;The stock news sequence is divided into word sequence according to preset length;Judge the stock news whether be the day of trade on the day of news, if so, then obtaining the term vector feature of each lexical item of the news using Word2Vec and GloVe;If the stock news be not the day of trade on the day of news, obtain the document vector characteristics of the news using fastText.The present invention extracts news features by three kinds of different vector representation learning methods, makes news more comprehensive as reference factor, predictablity rate is higher.

Description

A kind of stock news quantization method and system based on artificial intelligence
Technical field
The present invention relates to field of artificial intelligence, more particularly to a kind of stock news quantization method based on artificial intelligence And system.
Background technology
Prediction of Stock Price refers to that prediction stock is not using the historical information and stock of price related market information Carry out the ups and downs situation or price situation of a period of time.In recent years, deep learning method obtained in natural language processing field Many progress.Deep learning method also gradually applies to Prediction of Stock Index field.
TH Nguyen etc. predict stock price using agent model.In document [Topic modeling based Sentiment analysis on social media for stock market prediction] in, they propose one The topic model of individual fusion emotion and topic, and by the analysis of the main of the model use to stock related news.Obtaining After the theme distribution vector of each news, this theme vector is added in the feature of Prediction of Stock Index by they, is finally obtained Good prediction effect.But it have ignored the exclusive feature in financial field itself.
Except the news information related to stock, mass media is also used for Prediction of Stock Index with the content in social media. Johan Bollen etc. are in document [Twitter mood predicts the stock market] with Twitter Ups and downs of the content to stock market are made a prediction.They use popular feelings daily on the tool analysis Twitter such as OpinionFinde These affective characteristicses, are then added in forecast model, the ups and downs to stock market are made a prediction by sense.But can only be overall to stock market Situation make a prediction, be not suitable for the prediction of single stock.
Development situation of the related news information of stock generally to stock in itself is more related, also easily favourable comprising some Term of polarity etc., therefore Zeya Zhang et al. are in related work [Stock prediction:a method based on Extraction of news features and recurrent neural networks] in used the advantage of news The distribution of polarity section is used as its feature, and is put into Recognition with Recurrent Neural Network and is calculated in the lump with historical price information.It is but new Hear in text and contain abundant information, only go to consider from polarity favourable and insufficient.
The content of the invention
The technical problem to be solved in the present invention purpose is to provide a kind of stock news quantization method based on artificial intelligence And system, to solve the problems, such as that the news reference factor of existing Prediction of Stock Index has one-sidedness.
To achieve these goals, the technical solution adopted by the present invention is:
A kind of stock news quantization method based on artificial intelligence, including step:
Obtain the stock news sequence of the day of trade in preset time;
The stock news sequence is divided into word sequence according to preset length;
Judge the stock news whether be the day of trade on the day of news, if so, then being obtained using Word2Vec and GloVe The term vector feature of each lexical item of the news;
If the stock news be not the day of trade on the day of news, using fastText obtain the document of the news to Measure feature.
Further, the term vector feature of each lexical item that the news is obtained using Word2Vec and GloVe Step specifically includes:
Using Word2Vec obtain predicting context lexical item and by maximize conditional probability learn to obtain the first word to Measure feature;
The second term vector feature based on global information is obtained using GloVe;
The first term vector feature and the second term vector merging features are obtained into the term vector feature of each lexical item.
Further, described the step of obtaining the linear relationship between each lexical item using Word2Vec, specifically includes:
Set lexical item wiContext be the set in current sentence with the lexical item of the distance of the lexical item less than k Context(wi):
Context(wi)={ wi-k, wi-k+1..., wi-1, Wi+1..., wi+k};
Wherein, i represents position of the lexical item in sentence;
Obtain target prediction word o and appear in the lexical item wiConditional probability be:
Wherein, u0For target prediction word o outer vector,For target prediction word o interior vector;
Build Skip-Gram models;The loss function of Skip-Gram models is obtained according to the conditional probability:
Wherein, T is the sum of current sentence lexical item, and j is distance with the lexical item, m be with the lexical item it is maximum away from From.
Further, it is described obtained using GloVe based on global information the second term vector feature the step of specifically include:
In the model that co-occurrence matrix construction matches with the Skip-Gram Model Conditions;
The loss function of the model is:
Further, it is described the news is obtained using fastText document vector characteristics the step of specifically include:
Every stock news are labeled using the ups and downs of next day stock price as label;
The classification based training for having supervision is carried out using fastText;
The document vector characteristics of every stock news are calculated using the model after training.
A kind of stock news quantization system based on artificial intelligence, including:
Acquisition module, for obtaining the stock news sequence of the day of trade in preset time;
Division module, for the stock news sequence to be divided into word sequence according to preset length;
Term vector module, for judge the stock news whether be the day of trade on the day of news, if so, then utilizing Word2Vec and GloVe obtains the term vector feature of each lexical item of the news;
Document vector module, if the news on the day of being not the day of trade for the stock news, is obtained using fastText To the document vector characteristics of the news.
Further, the term vector module specifically includes:
First model unit, for obtaining predicting the lexical item of context and by maximizing conditional probability using Word2Vec Study obtains the first term vector feature;
Second model unit, for obtaining the second term vector feature based on global information using GloVe;
Concatenation unit, for the first term vector feature and the second term vector merging features to be obtained into each lexical item Term vector feature.
Further, first model unit specifically includes:
Set lexical item wiContext be the set in current sentence with the lexical item of the distance of the lexical item less than k Context(wi):
Context(wi)={ wi-k, wi-k+1..., wi-1, wi+1..., wi+k};
Wherein, i represents position of the lexical item in sentence;
Obtain target prediction word o and appear in the lexical item wiConditional probability be:
Wherein, u0For target prediction word o outer vector,For target prediction word o interior vector;
Build Skip-Gram models;The loss function of Skip-Gram models is obtained according to the conditional probability:
Wherein, T is the sum of current sentence lexical item, and j is distance with the lexical item, m be with the lexical item it is maximum away from From.
Further, second model unit specifically includes:
In the model that co-occurrence matrix construction matches with the Skip-Gram Model Conditions;
The loss function of the model is:
Further, the document vector module specifically includes:
Labeling module, for being labeled using the ups and downs of next day stock price as label to every stock news;
Sort module, for the classification based training for carrying out having supervision using fastText;
Computing module, for calculating the document vector characteristics of every stock news using the model after training.
It is of the invention compared with traditional technology, have the following advantages:
The present invention extracts news features by three kinds of different vector representation learning methods, make news as reference factor more Adding ground, the accuracy rate of prediction is higher comprehensively.
Brief description of the drawings
Fig. 1 is a kind of stock news quantization method flow chart based on artificial intelligence that embodiment one provides;
Fig. 2 is a kind of stock news quantization system structure chart based on artificial intelligence that embodiment two provides.
Embodiment
It is the specific embodiment of the present invention and with reference to accompanying drawing below, technical scheme is further described, But the present invention is not limited to these embodiments.
Embodiment one
A kind of stock news quantization method based on artificial intelligence is present embodiments provided, as shown in figure 1, including step:
S11:Obtain the stock news sequence of the day of trade in preset time;
S12:Stock news sequence is divided into word sequence according to preset length;
S13:Judge whether stock news are the news on the same day, if so, then obtaining news using Word2Vec and GloVe The term vector feature of each lexical item;
S14:If stock news be not the day of trade on the day of news, the document vector that news is obtained using fastText is special Sign.
Text based term vector identification method and document identification method are all the fashion in recent years, by it is a large amount of expect into Row training, finally learns an eigenmatrix for each word or article, makes similar word more close in vector space.Can be with Text is effectively subjected to quantification treatment.
When carrying out the application such as stock market, price advance-decline forecasting, text is as one of highly important reference factor, warp It is for reference often to need some preferable quantization characteristics.
The present embodiment carries out text vector training using substantial amounts of stock news, and with Recognition with Recurrent Neural Network to quantifying to identify History news be further processed, so as to extract the history news features related to stock, as with the new of timing Hear character representation.
The present embodiment uses news related to stock in each day of trade or agencies report as text data, then News features are extracted using three kinds of different vectorial learning methods.Including Word2Vec, GloVe and fastText.
Because the news on the same day would generally produce large effect, therefore the headline for the same day and content point to stock Word quantization means have not been used, and mark is quantified using text fragment to history news.
In the present embodiment, step S11 is the stock news sequence for obtaining the day of trade in preset time.
Specifically, stock may produce some related news or agencies report D in each day of tradet, these are logical Development situation often to stock in itself is more related, and the news sequence for recording some day of trade of continuous N days is:
In the present embodiment, step S12 is that stock news sequence is divided into word sequence according to preset length.
Specifically, the word sequence length of every news is expressed as lt, therefore news Dt can be expressed as sequence:
In the present embodiment, step S13 be judge stock news whether be the day of trade on the day of news, if so, then utilizing Word2Vec and GloVe obtains the term vector feature of each lexical item of news.
Wherein, the step of in step S13 using the term vector feature of Word2Vec and the GloVe each lexical item for obtaining news Specifically include:
Using Word2Vec obtain predicting context lexical item and by maximize conditional probability learn to obtain the first word to Measure feature;
The second term vector feature based on global information is obtained using GloVe;
The first term vector feature and the second term vector merging features are obtained into the term vector feature of each lexical item.
In step S13, described the step of obtaining the linear relationship between each lexical item using Word2Vec, specifically includes:
Set lexical item wiContext be the set in current sentence with the lexical item of the distance of the lexical item less than k Context(wi):
Context(wi)={ wi-k, wi-k+1..., wi-1, wI+1,..., wi+k};
Wherein, i represents position of the lexical item in sentence;
Obtain target prediction word o and appear in the lexical item wiConditional probability be:
Wherein, u0For target prediction word o outer vector,For target prediction word o interior vector;
Build Skip-Gram models;The loss function of Skip-Gram models is obtained according to the conditional probability:
Wherein, T is the sum of current sentence lexical item, and j is distance with the lexical item, m be with the lexical item it is maximum away from From.
Specifically, Word2Vec is the unsupervised learning method that a kind of term vector represents, sought using neutral net for word The expression looked in a vector row space, such method assume that the probability of similar word co-occurrence in the text is bigger.This implementation Example mainly uses Skip-Gram models therein, and the model predicts the word of its context using current word, and passes through maximization Its vocabulary of conditional probability acquistion.
Skip-Gram models predict all words of context using current word, therefore the utilization to training corpus is more To be efficient, and the linear relationship for proving that this term vector mark can preferably between acquistion word and word is tested, much appointed Performance in business is all slightly better than term vector models based on statistics such as SVD.
In step S13, it is described obtained using GloVe based on global information the second term vector feature the step of specifically wrap Include:
In the model that co-occurrence matrix construction matches with the Skip-Gram Model Conditions;
The loss function of the model is:
Although specifically, this term vector models based on prediction of Word2Vec can have to the linear relationship between word compared with Good assurance, but utilization of this class model to statistical information is not abundant enough, and the training time is related to language material size.And it is based on The term vector model of statistics is then with its advantage and disadvantage on the contrary, the statistical information of the overall situation can be made full use of, so as to obtain its hidden layer Semantic vector.
GloVe is then respectively to take its length between both, similar to Skip-Gram models by being constructed on co-occurrence matrix Condition, so as to obtain a term vector model based on global information, and a kind of unsupervised method for expressing.
Compared with Skip-Gram models, GloVe, also can be compared with while the global statistics information of language material is taken full advantage of The linear relationship that I is lived between word well.
In the present embodiment, if step S14 is stock news be not the day of trade on the day of news, obtained using fastText The document vector characteristics of news.
Wherein, step S14 specifically includes step:
Every stock news are labeled using the ups and downs of next day stock price as label;
The classification based training for having supervision is carried out using fastText;
The document vector characteristics of every stock news are calculated using the model after training.
Specifically, because term vector represents that feature is more concerned with the local message of each word, therefore it is used herein FastText document vector characteristics, it is easy to preferably obtain the global information amount of document.
Because fastText is supervised learning, and it is mainly used in classification task, and the task of the present embodiment is to stock The ups and downs of ticket carry out two classification tasks.Therefore, every news is labeled first in the present embodiment, with second day stock price Ups and downs be label, the classification based training for having supervision is then carried out using fastText.The model trained is finally recycled, is calculated Obtain a document vector representation feature of every news.
FastText input layer borrows feature and N-gram features using the word of document, then passes through the nerve net in intermediate layer Network carries out linear transformation to characteristic vector, and it is general to be mapped as last label finally by the nonlinear activation primitive of output layer Rate.
Because news has certain timing, therefore preferably can be obtained using Recognition with Recurrent Neural Network in news Information, and Two-way Cycle network is then made up of forward circulation neutral net with recycled back neutral net, compared to single-phase circulating net Network has bigger advantage, can capture the information of reverse sequence, and text feature processing is particularly effective.Therefore, this implementation Example handles news features based on bidirectional circulating neutral net.Multiple Recognition with Recurrent Neural Network are exported and merged, then to be required Newsletter archive quantization characteristic.
The present embodiment extracts stock news feature by three kinds of different learning methods, makes news as stock reference factor Consideration is more comprehensive, predicts that the accuracy rate of stock is higher.
Embodiment two
A kind of stock news quantization system based on artificial intelligence is present embodiments provided, as shown in Fig. 2 including:
Acquisition module 21, for obtaining the stock news sequence of the day of trade in preset time;
Division module 22, for stock news sequence to be divided into word sequence according to preset length;
Term vector module 23, for judge stock news whether be the same day news, if so, then using Word2Vec with GloVe obtains the term vector feature of each lexical item of news;
Document vector module 24, if the news on the day of being not the day of trade for stock news, is obtained using fastText The document vector characteristics of news.
Text based term vector identification method and document identification method are all the fashion in recent years, by it is a large amount of expect into Row training, finally learns an eigenmatrix for each word or article, makes similar word more close in vector space.Can be with Text is effectively subjected to quantification treatment.
When carrying out the application such as stock market, price advance-decline forecasting, text is as one of highly important reference factor, warp It is for reference often to need some preferable quantization characteristics.
The present embodiment carries out text vector training using substantial amounts of stock news, and with Recognition with Recurrent Neural Network to quantifying to identify History news be further processed, so as to extract the history news features related to stock, as with the new of timing Hear character representation.
The present embodiment uses news related to stock in each day of trade or agencies report as text data, then News features are extracted using three kinds of different vectorial learning methods.Including Word2Vec, GloVe and fastText.
Because the news on the same day would generally produce large effect, therefore the headline for the same day and content point to stock Word quantization means have not been used, and mark is quantified using text fragment to history news.
In the present embodiment, acquisition module 21 is used for the stock news sequence for obtaining the day of trade in preset time.
Specifically, stock may produce some related news or agencies report D in each day of tradet, these are logical Development situation often to stock in itself is more related, and the news sequence for recording some day of trade of continuous N days is:
In the present embodiment, division module 22 is used to stock news sequence being divided into word sequence according to preset length.
Specifically, the word sequence length of every news is expressed as lt, therefore news DtSequence can be expressed as:
In the present embodiment, term vector module 23 be used for judge stock news whether be the day of trade on the day of news, if so, then The term vector feature of each lexical item of news is obtained using Word2Vec and GloVe.
Wherein, specifically included in term vector module 23:
First model unit, for obtaining predicting the lexical item of context and by maximizing conditional probability using Word2Vec Study obtains the first term vector feature;
Second model unit, for obtaining the second term vector feature based on global information using GloVe;
Concatenation unit, for the first term vector feature and the second term vector merging features to be obtained into each lexical item Term vector feature.
First model unit specifically includes:
Set lexical item wiContext be the set in current sentence with the lexical item of the distance of the lexical item less than k Context(wi):
Context(wi)={ wi-k, wi-k+1..., wi-1, wi+1..., wi+k};
Wherein, i represents position of the lexical item in sentence;
Obtain target prediction word o and appear in the lexical item wiConditional probability be:
Wherein, u0For target prediction word o outer vector,For target prediction word o interior vector;
Build Skip-Gram models;The loss function of Skip-Gram models is obtained according to the conditional probability:
Wherein, T is the sum of current sentence lexical item, and j is distance with the lexical item, m be with the lexical item it is maximum away from From.
Specifically, Word2Vec is the unsupervised learning method that a kind of term vector represents, sought using neutral net for word The expression looked in a vector row space, such method assume that the probability of similar word co-occurrence in the text is bigger.This implementation Example mainly uses Skip-Gram models therein, and the model predicts the word of its context using current word, and passes through maximization Its vocabulary of conditional probability acquistion.
Skip-Gram models predict all words of context using current word, therefore the utilization to training corpus is more To be efficient, and the linear relationship for proving that this term vector mark can preferably between acquistion word and word is tested, much appointed Performance in business is all slightly better than term vector models based on statistics such as SVD.
Second model unit specifically includes:
In the model that co-occurrence matrix construction matches with the Skip-Gram Model Conditions;
The loss function of the model is:
Although specifically, this term vector models based on prediction of Word2Vec can have to the linear relationship between word compared with Good assurance, but utilization of this class model to statistical information is not abundant enough, and the training time is related to language material size.And it is based on The term vector model of statistics is then with its advantage and disadvantage on the contrary, the statistical information of the overall situation can be made full use of, so as to obtain its hidden layer Semantic vector.
GloVe is then respectively to take its length between both, similar to Skip-Gram models by being constructed on co-occurrence matrix Condition, so as to obtain a term vector model based on global information, and a kind of unsupervised method for expressing.
Compared with Skip-Gram models, GloVe, also can be compared with while the global statistics information of language material is taken full advantage of The linear relationship that I is lived between word well.
In the present embodiment, if document vector module 24 is used for the news on the day of stock news are not the days of trade, utilize FastText obtains the document vector characteristics of news.
Wherein, document vector module 24 specifically includes:
Unit is marked, for being labeled using the ups and downs of next day stock price as label to every stock news;
Taxon, for the classification based training for carrying out having supervision using fastText;
Computing unit, for calculating the document vector characteristics of every stock news using the model after training.
Specifically, because term vector represents that feature is more concerned with the local message of each word, therefore it is used herein FastText document vector characteristics, it is easy to preferably obtain the global information amount of document.
Because fastText is supervised learning, and it is mainly used in classification task, and the task of the present embodiment is to stock The ups and downs of ticket carry out two classification tasks.Therefore, every news is labeled first in the present embodiment, with second day stock price Ups and downs be label, the classification based training for having supervision is then carried out using fastText.The model trained is finally recycled, is calculated Obtain a document vector representation feature of every news.
FastText input layer borrows feature and N-gram features using the word of document, then passes through the nerve net in intermediate layer Network carries out linear transformation to characteristic vector, and it is general to be mapped as last label finally by the nonlinear activation primitive of output layer Rate.
Because news has certain timing, therefore preferably can be obtained using Recognition with Recurrent Neural Network in news Information, and Two-way Cycle network is then made up of forward circulation neutral net with recycled back neutral net, compared to single-phase circulating net Network has bigger advantage, can capture the information of reverse sequence, and text feature processing is particularly effective.Therefore, this implementation Example handles news features based on bidirectional circulating neutral net.Multiple Recognition with Recurrent Neural Network are exported and merged, then to be required Newsletter archive quantization characteristic.
The present embodiment extracts stock news feature by three kinds of different learning methods, makes news as stock reference factor Consideration is more comprehensive, and the accuracy rate of Prediction of Stock Index is higher.
Specific embodiment described herein is only to spirit explanation for example of the invention.Technology belonging to the present invention is led The technical staff in domain can be made various modifications or supplement to described specific embodiment or be replaced using similar mode Generation, but without departing from the spiritual of the present invention or surmount scope defined in appended claims.

Claims (10)

1. a kind of stock news quantization method based on artificial intelligence, it is characterised in that including step:
Obtain the stock news sequence of the day of trade in preset time;
The stock news sequence is divided into word sequence according to preset length;
Judge the stock news whether be the day of trade on the day of news, if so, then being obtained using Word2Vec and GloVe described The term vector feature of each lexical item of news;
If the stock news be not the day of trade on the day of news, the document vector that the news is obtained using fastText is special Sign.
A kind of 2. stock news quantization method based on artificial intelligence according to claim 1, it is characterised in that the profit The step of obtaining the term vector feature of each lexical item of the news with Word2Vec and GloVe specifically includes:
Obtain predicting the lexical item of context using Word2Vec and learn to obtain the first term vector spy by maximizing conditional probability Sign;
The second term vector feature based on global information is obtained using GloVe;
The first term vector feature and the second term vector merging features are obtained into the term vector feature of each lexical item.
A kind of 3. stock news quantization method based on artificial intelligence according to claim 2, it is characterised in that the profit The step of linear relationship between obtaining each lexical item with Word2Vec, specifically includes:
Set lexical item wiContext be the set Context in current sentence with the lexical item of the distance of the lexical item less than k (wi):
Context(wi)={ wi-k, wi-k+1..., wi-1, wi+1..., wi+k};
Wherein, i represents position of the lexical item in sentence;
Obtain target prediction word o and appear in the lexical item wiConditional probability be:
<mrow> <mi>P</mi> <mrow> <mo>(</mo> <mi>o</mi> <mo>|</mo> <msub> <mi>w</mi> <mi>i</mi> </msub> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mrow> <mi>exp</mi> <mrow> <mo>(</mo> <msup> <msub> <mi>u</mi> <mn>0</mn> </msub> <mi>T</mi> </msup> <msub> <mi>v</mi> <msub> <mi>w</mi> <mi>i</mi> </msub> </msub> <mo>)</mo> </mrow> </mrow> <mrow> <msubsup> <mi>&amp;Sigma;</mi> <mrow> <mi>w</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>W</mi> </msubsup> <mi>exp</mi> <mrow> <mo>(</mo> <msup> <msub> <mi>u</mi> <mi>w</mi> </msub> <mi>T</mi> </msup> <msub> <mi>v</mi> <msub> <mi>w</mi> <mi>i</mi> </msub> </msub> <mo>)</mo> </mrow> </mrow> </mfrac> <mo>,</mo> <mi>o</mi> <mo>&amp;Element;</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mi>t</mi> <mi>e</mi> <mi>x</mi> <mi>t</mi> <mrow> <mo>(</mo> <msub> <mi>w</mi> <mi>i</mi> </msub> <mo>)</mo> </mrow> <mo>;</mo> </mrow>
Wherein, u0For target prediction word o outer vector,For target prediction word o interior vector;
Build Skip-Gram models;The loss function of Skip-Gram models is obtained according to the conditional probability:
<mrow> <mi>J</mi> <mrow> <mo>(</mo> <mi>&amp;theta;</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mi>T</mi> </mfrac> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>t</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>T</mi> </munderover> <munder> <mi>&amp;Sigma;</mi> <mrow> <mo>-</mo> <mi>m</mi> <mo>&amp;le;</mo> <mi>j</mi> <mo>,</mo> <mo>=</mo> <mi>m</mi> <mo>,</mo> <mi>j</mi> <mo>&amp;NotEqual;</mo> <mn>0</mn> </mrow> </munder> <mi>log</mi> <mi>P</mi> <mrow> <mo>(</mo> <msub> <mi>w</mi> <mrow> <mi>t</mi> <mo>+</mo> <mi>j</mi> </mrow> </msub> <mo>|</mo> <msub> <mi>w</mi> <mi>t</mi> </msub> <mo>)</mo> </mrow> <mo>;</mo> </mrow>
Wherein, T is the sum of current sentence lexical item, and j is the distance with the lexical item, and m is the ultimate range with the lexical item.
A kind of 4. stock news quantization method based on artificial intelligence according to claim 3, it is characterised in that the profit The step of the second term vector feature based on global information is obtained with GloVe specifically includes:
In the model that co-occurrence matrix construction matches with the Skip-Gram Model Conditions;
The loss function of the model is:
<mrow> <mi>J</mi> <mrow> <mo>(</mo> <mi>&amp;theta;</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>W</mi> </munderover> <mi>f</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mrow> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo>)</mo> </mrow> <msup> <mrow> <mo>(</mo> <msup> <msub> <mi>u</mi> <mi>i</mi> </msub> <mi>T</mi> </msup> <msub> <mi>v</mi> <mi>j</mi> </msub> <mo>-</mo> <msub> <mi>logP</mi> <mrow> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>.</mo> </mrow>
A kind of 5. stock news quantization method based on artificial intelligence according to claim 1, it is characterised in that the profit The step of document vector characteristics that the news is obtained with fastText, specifically includes:
Every stock news are labeled using the ups and downs of next day stock price as label;
The classification based training for having supervision is carried out using fastText;
The document vector characteristics of every stock news are calculated using the model after training.
A kind of 6. stock news quantization system based on artificial intelligence, it is characterised in that including:
Acquisition module, for obtaining the stock news sequence of the day of trade in preset time;
Division module, for the stock news sequence to be divided into word sequence according to preset length;
Term vector module, for judge the stock news whether be the day of trade on the day of news, if so, then utilizing Word2Vec The term vector feature of each lexical item of the news is obtained with GloVe;
Document vector module, if the news on the day of being not the day of trade for the stock news, institute is obtained using fastText State the document vector characteristics of news.
A kind of 7. stock news quantization system based on artificial intelligence according to claim 6, it is characterised in that institute's predicate Vector module specifically includes:
First model unit, for obtaining predicting the lexical item of context using Word2Vec and being learnt by maximizing conditional probability Obtain the first term vector feature;
Second model unit, for obtaining the second term vector feature based on global information using GloVe;
Concatenation unit, for the first term vector feature and the second term vector merging features to be obtained into the word of each lexical item Vector characteristics.
8. a kind of stock news quantization system based on artificial intelligence according to claim 7, it is characterised in that described One model unit specifically includes:
Set lexical item wiContext be the set Context in current sentence with the lexical item of the distance of the lexical item less than k (wi);
Context(wi)={ wi-k, wi-k+1..., wi-1, wi+1..., wi+k};
Wherein, i represents position of the lexical item in sentence;
Obtain target prediction word o and appear in the lexical item wiConditional probability be:
<mrow> <mi>P</mi> <mrow> <mo>(</mo> <mi>o</mi> <mo>|</mo> <msub> <mi>w</mi> <mi>i</mi> </msub> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mrow> <mi>exp</mi> <mrow> <mo>(</mo> <msup> <msub> <mi>u</mi> <mn>0</mn> </msub> <mi>T</mi> </msup> <msub> <mi>v</mi> <msub> <mi>w</mi> <mi>i</mi> </msub> </msub> <mo>)</mo> </mrow> </mrow> <mrow> <msubsup> <mi>&amp;Sigma;</mi> <mrow> <mi>w</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>W</mi> </msubsup> <mi>exp</mi> <mrow> <mo>(</mo> <msup> <msub> <mi>u</mi> <mi>w</mi> </msub> <mi>T</mi> </msup> <msub> <mi>v</mi> <msub> <mi>w</mi> <mi>i</mi> </msub> </msub> <mo>)</mo> </mrow> </mrow> </mfrac> <mo>,</mo> <mi>o</mi> <mo>&amp;Element;</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mi>t</mi> <mi>e</mi> <mi>x</mi> <mi>t</mi> <mrow> <mo>(</mo> <msub> <mi>w</mi> <mi>i</mi> </msub> <mo>)</mo> </mrow> <mo>;</mo> </mrow>
Wherein, u0For target prediction word o outer vector,For target prediction word o interior vector;
Build Skip-Gram models;The loss function of Skip-Gram models is obtained according to the conditional probability:
<mrow> <mi>J</mi> <mrow> <mo>(</mo> <mi>&amp;theta;</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mi>T</mi> </mfrac> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>t</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>T</mi> </munderover> <munder> <mi>&amp;Sigma;</mi> <mrow> <mo>-</mo> <mi>m</mi> <mo>&amp;le;</mo> <mi>j</mi> <mo>,</mo> <mo>=</mo> <mi>m</mi> <mo>,</mo> <mi>j</mi> <mo>&amp;NotEqual;</mo> <mn>0</mn> </mrow> </munder> <mi>log</mi> <mi>p</mi> <mrow> <mo>(</mo> <msub> <mi>w</mi> <mrow> <mi>t</mi> <mo>+</mo> <mi>j</mi> </mrow> </msub> <mo>|</mo> <msub> <mi>w</mi> <mi>t</mi> </msub> <mo>)</mo> </mrow> <mo>;</mo> </mrow>
Wherein, T is the sum of current sentence lexical item, and j is the distance with the lexical item, and m is the ultimate range with the lexical item.
9. a kind of stock news quantization system based on artificial intelligence according to claim 8, it is characterised in that described Two model units specifically include:
In the model that co-occurrence matrix construction matches with the Skip-Gram Model Conditions;
The loss function of the model is:
<mrow> <mi>J</mi> <mrow> <mo>(</mo> <mi>&amp;theta;</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>W</mi> </munderover> <mi>f</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mrow> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo>)</mo> </mrow> <msup> <mrow> <mo>(</mo> <msup> <msub> <mi>u</mi> <mi>i</mi> </msub> <mi>T</mi> </msup> <msub> <mi>v</mi> <mi>j</mi> </msub> <mo>-</mo> <msub> <mi>logP</mi> <mrow> <mi>i</mi> <mi>j</mi> </mrow> </msub> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>.</mo> </mrow>
10. a kind of stock news quantization system based on artificial intelligence according to claim 6, it is characterised in that described Document vector module specifically includes:
Unit is marked, for being labeled using the ups and downs of next day stock price as label to every stock news;
Taxon, for the classification based training for carrying out having supervision using fastText;
Computing unit, for calculating the document vector characteristics of every stock news using the model after training.
CN201711294146.1A 2017-12-08 2017-12-08 A kind of stock news quantization method and system based on artificial intelligence Pending CN107895051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711294146.1A CN107895051A (en) 2017-12-08 2017-12-08 A kind of stock news quantization method and system based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711294146.1A CN107895051A (en) 2017-12-08 2017-12-08 A kind of stock news quantization method and system based on artificial intelligence

Publications (1)

Publication Number Publication Date
CN107895051A true CN107895051A (en) 2018-04-10

Family

ID=61807642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711294146.1A Pending CN107895051A (en) 2017-12-08 2017-12-08 A kind of stock news quantization method and system based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN107895051A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271632A (en) * 2018-09-14 2019-01-25 重庆邂智科技有限公司 A kind of term vector learning method of supervision
CN110390408A (en) * 2018-04-16 2019-10-29 北京京东尚科信息技术有限公司 Trading object prediction technique and device
CN111274386A (en) * 2019-11-21 2020-06-12 国网浙江杭州市萧山区供电有限公司 Work order text classification algorithm based on convolutional neural network and multi-attention machine mechanism

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649275A (en) * 2016-12-28 2017-05-10 成都数联铭品科技有限公司 Relation extraction method based on part-of-speech information and convolutional neural network
CN106855853A (en) * 2016-12-28 2017-06-16 成都数联铭品科技有限公司 Entity relation extraction system based on deep neural network
CN107168945A (en) * 2017-04-13 2017-09-15 广东工业大学 A kind of bidirectional circulating neutral net fine granularity opinion mining method for merging multiple features

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649275A (en) * 2016-12-28 2017-05-10 成都数联铭品科技有限公司 Relation extraction method based on part-of-speech information and convolutional neural network
CN106855853A (en) * 2016-12-28 2017-06-16 成都数联铭品科技有限公司 Entity relation extraction system based on deep neural network
CN107168945A (en) * 2017-04-13 2017-09-15 广东工业大学 A kind of bidirectional circulating neutral net fine granularity opinion mining method for merging multiple features

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
IGOR SANTOS: "Sentiment Analysis using Convolutional Neural Network with fastText Embeddings", 《2017IEEE》 *
MARWANAILI: "Comparative study of word embedding methods in topic segmentation", 《INTERNATIONAL CONFERENCE ON KNOWLEDGE BASED AND INTELLIGENT INFORMATION AND ENGINEERING SYSTEMS》 *
朱德超: "基于词嵌入文本聚类技术的研究与实现", 《中国优秀硕士学位论文数据库》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110390408A (en) * 2018-04-16 2019-10-29 北京京东尚科信息技术有限公司 Trading object prediction technique and device
CN110390408B (en) * 2018-04-16 2024-03-05 北京京东尚科信息技术有限公司 Transaction object prediction method and device
CN109271632A (en) * 2018-09-14 2019-01-25 重庆邂智科技有限公司 A kind of term vector learning method of supervision
CN111274386A (en) * 2019-11-21 2020-06-12 国网浙江杭州市萧山区供电有限公司 Work order text classification algorithm based on convolutional neural network and multi-attention machine mechanism

Similar Documents

Publication Publication Date Title
Wu et al. S_I_LSTM: stock price prediction based on multiple data sources and sentiment analysis
Chen et al. A comparative study of automated legal text classification using random forests and deep learning
Abdelgwad et al. Arabic aspect based sentiment analysis using bidirectional GRU based models
CN109766524B (en) Method and system for extracting combined purchasing recombination type notice information
Fu et al. Listening to the investors: A novel framework for online lending default prediction using deep learning neural networks
CN109635280A (en) A kind of event extraction method based on mark
CN109697232A (en) A kind of Chinese text sentiment analysis method based on deep learning
CN110222188A (en) A kind of the company&#39;s bulletin processing method and server-side of multi-task learning
CN108388560A (en) GRU-CRF meeting title recognition methods based on language model
Zhang et al. A hierarchical multi-input and output bi-GRU model for sentiment analysis on customer reviews
Aslan et al. TSA-CNN-AOA: Twitter sentiment analysis using CNN optimized via arithmetic optimization algorithm
CN108022016A (en) A kind of Prediction of Stock Price method and system based on artificial intelligence
Rithish et al. Automated assessment of question quality on online community forums
CN107895051A (en) A kind of stock news quantization method and system based on artificial intelligence
Zhao et al. Online news emotion prediction with bidirectional LSTM
Zhao et al. Multi-layer features ablation of BERT model and its application in stock trend prediction
Chung et al. Empirical study on character level neural network classifier for Chinese text
Wu et al. Screening patents of ICT in construction using deep learning and NLP techniques
Chen et al. Research on automatic essay scoring of composition based on CNN and OR
Caciularu et al. Cross-document language modeling
Yu et al. TABAS: Text augmentation based on attention score for text classification model
Xu et al. Neural topic modeling with deep mutual information estimation
Sekioka et al. Market prediction using machine learning based on social media specific features
Shi et al. Graph-based joint pandemic concern and relation extraction on twitter
Xie et al. The twenty-first century of structural engineering research: A topic modeling approach

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
CB03 Change of inventor or designer information

Inventor after: Yan Hongfei

Inventor after: Zhang Xiao

Inventor before: Zhang Xiao

CB03 Change of inventor or designer information
TA01 Transfer of patent application right

Effective date of registration: 20190111

Address after: 519031 Creative Valley, 1889 Huandao East Road, Hengqin New District, Zhuhai City, Guangdong Province, 18, 110-159 (Centralized Office District)

Applicant after: Hong Gu information technology (Zhuhai) Co., Ltd.

Applicant after: Peking University

Address before: 519031 Creative Valley, 1889 Huandao East Road, Hengqin New District, Zhuhai City, Guangdong Province, 18, 110-159 (Centralized Office District)

Applicant before: Hong Gu information technology (Zhuhai) Co., Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20180410

RJ01 Rejection of invention patent application after publication