KR20200145347A - Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis - Google Patents

Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis Download PDF

Info

Publication number
KR20200145347A
KR20200145347A KR1020190074221A KR20190074221A KR20200145347A KR 20200145347 A KR20200145347 A KR 20200145347A KR 1020190074221 A KR1020190074221 A KR 1020190074221A KR 20190074221 A KR20190074221 A KR 20190074221A KR 20200145347 A KR20200145347 A KR 20200145347A
Authority
KR
South Korea
Prior art keywords
stock price
company
event
event identification
sentiment
Prior art date
Application number
KR1020190074221A
Other languages
Korean (ko)
Other versions
KR102214871B1 (en
Inventor
김종우
김동성
왕동규
Original Assignee
한양대학교 산학협력단
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 한양대학교 산학협력단 filed Critical 한양대학교 산학협력단
Priority to KR1020190074221A priority Critical patent/KR102214871B1/en
Publication of KR20200145347A publication Critical patent/KR20200145347A/en
Application granted granted Critical
Publication of KR102214871B1 publication Critical patent/KR102214871B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

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

Abstract

The present invention relates to a method and a device for stock price prediction based on event identification by enterprise and multi-category sentiment analysis. The device includes a processor and a memory connected to the processor. Program commands that can be executed by the processor are stored in the memory such that an event identification reference for each enterprise is generated by calculating the number of news articles by enterprise collected for a preset past period, a sentiment score is calculated by performing multi-category sentiment analysis with reference to a pre-established sentiment dictionary on the news article pertaining to an event period in which news articles exceeding a first event identification reference of a first enterprise are present, a stock price prediction model is trained using the calculated sentiment score as an input variable and the excess return of the first enterprise for the event period as a result variable, and future stock price prediction is performed using the trained stock price prediction model in a case where the news articles of the first enterprise exceed the first event identification reference.

Description

기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 방법 및 장치{Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis}Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis}

본 발명은 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 방법 및 장치에 관한 것이다. The present invention relates to a method and apparatus for predicting stock prices based on event identification and multi-category sentiment analysis for each company.

일반적으로 온라인상의 비정형 데이터를 활용한 기업의 주가 예측 시스템은 소셜 미디어에서 발생되는 비정형 데이터를 주가 예측 대상이 되는 기업과의 연관성만을 확인하여 수집한 뒤, 이에 대하여 긍정 또는 부정으로 감성을 분석한 결과를 기업의 주가 예측에 활용하고 있다.In general, a company's stock price prediction system using online unstructured data collects unstructured data generated from social media by checking only the association with the company targeted for stock price prediction, and then analyzing the emotions as positive or negative. Is being used to predict the company's stock price.

기존 관련 기술에서는 기업과 관련된 다양한 출처의 비정형 데이터를 단순 수집한 후, 긍정 또는 부정의 이분형 범주로 감성을 분석하여 기업의 주가 예측에 활용하는 방법이 주를 이루고 있다. In the existing related technology, a method of simply collecting unstructured data from various sources related to a company and then analyzing the sentiment in a positive or negative dichotomy category is used to predict a company's stock price.

이는 기업의 경영 활동 과정에서 발생하는 주요 이벤트들이 상대적으로 주가에 높은 영향을 미치는 점, 기업 경영 활동에서 발생 가능한 이벤트들이 다양한 만큼 보다 세밀하게 분석해야 하는 점에서 주가 예측을 위한 비정형 데이터의 실질적인 활용 방안을 간과하고 있다는 문제점을 가지고 있다. This is a practical use plan of unstructured data for stock price prediction, as major events occurring in the process of business activities have a relatively high impact on stock prices, and since the various events that can occur in business activities require more detailed analysis. It has a problem that it is overlooked.

KR 등록특허 10-1531970KR registered patent 10-1531970

상기한 종래기술의 문제점을 해결하기 위해, 본 발명은 기업별로 주가 예측의 정확도를 높일 수 있는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 방법 및 장치를 제안하고자 한다. In order to solve the problems of the prior art, the present invention proposes a method and apparatus for predicting stock prices based on event identification and multi-category sentiment analysis, which can increase the accuracy of stock price prediction for each company.

상기한 바와 같은 목적을 달성하기 위하여, 본 발명의 일 실시예에 따르면, 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치로서, 프로세서; 및 상기 프로세서에 연결되는 메모리를 포함하되, 상기 메모리는, 미리 설정된 과거 기간 동안 수집된 기업별 뉴스 기사의 수를 계산하여 각 기업의 이벤트 식별 기준을 생성하고, 제1 기업의 제1 이벤트 식별 기준을 초과하는 뉴스 기사가 존재하는 이벤트 기간 동안의 뉴스 기사를 미리 구축된 감성 사전을 참조하여 다범주 감성 분석하여 감성 스코어를 계산하고, 상기 계산된 감성 스코어를 입력변수로 하고, 상기 이벤트 기간 동안의 상기 제1 기업의 초과 수익률을 결과변수로 하여 주가 예측 모델을 학습하고, 현재 상기 제1 기업의 뉴스 기사가 상기 제1 이벤트 식별 기준을 초과하는 경우, 상기 학습된 주가 예측 모델을 이용하여 미래 주가를 예측하도록, 상기 프로세서에 의해 실행 가능한 프로그램 명령어들을 저장하는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치가 제공된다. In order to achieve the above object, according to an embodiment of the present invention, a stock price prediction apparatus based on event identification and multi-category sentiment analysis for each company, comprising: a processor; And a memory connected to the processor, wherein the memory generates an event identification criterion for each company by calculating the number of news articles for each company collected over a preset past period, and a first event identification criterion for the first company A news article during the event period in which there is a news article in excess of is calculated by analyzing a multi-category emotion with reference to a previously built emotion dictionary, and using the calculated emotion score as an input variable, during the event period A stock price prediction model is learned by using the excess return of the first company as an outcome variable, and when the current news article of the first company exceeds the first event identification criterion, the future stock price using the learned stock price prediction model In order to predict, there is provided a stock price prediction apparatus based on event identification and multi-category sentiment analysis for each company storing program instructions executable by the processor.

상기 다범주 감성은, 혐오, 공포, 분노, 놀람, 행복 및 슬픔 중 적어도 하나의 감성 변수를 포함할 수 있다. The multi-category emotion may include at least one emotional variable among hate, fear, anger, surprise, happiness, and sadness.

상기 혐오 및 슬픔이 다른 감성 변수에 비해 높은 가중치를 가질 수 있다. The hatred and sadness may have a higher weight than other emotional variables.

상기 뉴스 기사 중 스폰서 관련 기사 및 사진 기사는 제외될 수 있다. Among the news articles, sponsor-related articles and photo articles may be excluded.

상기 감성 스코어는 상기 이벤트 기간 동안의 뉴스 제목의 수 및 상기 뉴스 제목에 포함된 개별 감성 범주에 속하는 감성 단어의 수를 이용하여 결정될 수 있다. The sentiment score may be determined using the number of news titles during the event period and the number of sentiment words belonging to individual sentiment categories included in the news title.

상기 주가 예측 모델은, 로지스틱 회귀분석(Logistic Regression Model), 서포트 벡터 머신(Support Vector Machine), 나이브 베이지안 분류기(Naive Beysian Classifier), 랜덤포레스트 회귀분석(Random Forest Regression Model) 중 적어도 하나를 포함하는 머신러닝 알고리즘으로 구축될 수 있다. The stock price prediction model is a machine including at least one of a logistic regression model, a support vector machine, a Naive Beysian Classifier, and a random forest regression model. It can be built with a running algorithm.

상기 미래 주가는 현재 이벤트 발생 기준날짜의 소정 시점 이후로부터 15일 내지 20일 기간의 주가일 수 있다. The future stock price may be a stock price for a period of 15 to 20 days after a predetermined time point of the reference date of the current event.

상기 초과 수익률은, 시장에서의 주가 상승분을 고려한 개별 기업의 주가 상승 또는 하락을 나타내는 지표일 수 있다. The excess return may be an index indicating an increase or decrease in the stock price of an individual company in consideration of the increase in stock price in the market.

본 발명의 다른 측면에 따르면, 프로세서 및 메모리를 포함하는 장치에서 기업별 이벤트 식별 및 다범주 감성 분석 기반으로 주가를 예측하는 방법으로서, 미리 설정된 과거 기간 동안 수집된 기업별 뉴스 기사의 수를 계산하여 각 기업의 이벤트 식별 기준을 생성하는 단계; 제1 기업의 제1 이벤트 식별 기준을 초과하는 뉴스 기사가 존재하는 이벤트 기간 동안의 뉴스 기사를 미리 구축된 감성 사전을 참조하여 다범주 감성 분석하여 감성 스코어를 계산하는 단계; 상기 계산된 감성 스코어를 입력변수로 하고, 상기 이벤트 기간 동안의 상기 제1 기업의 초과 수익률을 결과변수로 하여 주가 예측 모델을 학습하는 단계; 및 현재 상기 제1 기업의 뉴스 기사가 상기 제1 이벤트 식별 기준을 초과하는 경우, 상기 학습된 주가 예측 모델을 이용하여 미래 주가를 예측하는 단계를 포함하는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 방법이 제공된다. According to another aspect of the present invention, as a method of predicting a stock price based on event identification and multi-category sentiment analysis in a device including a processor and a memory, the number of news articles for each company collected during a preset past period is calculated. Generating an event identification criterion for each company; Calculating a sentiment score by analyzing a multi-category sentiment with reference to a preset sentiment dictionary for a news article during an event period in which a news article exceeding a first event identification criterion of the first company exists; Learning a stock price prediction model using the calculated emotion score as an input variable and the excess return rate of the first company during the event period as a result variable; And predicting a future stock price using the learned stock price prediction model when the current news article of the first company exceeds the first event identification criterion, event identification for each company and stock price based on multi-category sentiment analysis. A prediction method is provided.

본 발명의 또 다른 측면에 따르면, 상기한 방법을 수행하는 기록매체에 저장되는 프로그램이 제공된다. According to another aspect of the present invention, there is provided a program stored in a recording medium performing the above method.

본 발명에 따르면, 기업의 이벤트 식별과 이에 대한 다범주 감성 분석, 이를 활용한 주가 예측 모델의 생성은 기업의 주가 변동이 발생할 가능성이 높은 시점을 우선적으로 선별함으로써 주가 예측의 정확도를 보다 향상 시킬 수 있다. According to the present invention, the accuracy of the stock price prediction can be further improved by prioritizing the timing when the company's stock price fluctuations are likely to occur in the identification of a company's event, analysis of multi-category sentiment for it, and the generation of a stock price prediction model using this. have.

또한, 본 발명에 따르면, 기업의 이벤트별 주가 변동의 크기를 확인하고, 경영 활동 모니터링, 평판 관리와 같은 용도로도 활용이 가능할 것이다.In addition, according to the present invention, it will be possible to check the size of a company's stock price fluctuations for each event, and use it for purposes such as monitoring business activities and managing reputation.

도 1은 본 실시예에 따른 주가 예측 모델의 구축 과정을 도시한 도면이다.
도 2는 본 발명의 바람직한 일 실시예에 따른 실제 주가 예측 과정을 도시한 도면이다.
도 3은 기술 지표(기술통계변수)만을 입력변수로 하는 주가 예측 모델의 정확도를 나타낸 것이다.
도 4는 감성 스코어만을 입력변수로 하는 주가 예측 모델의 정확도를 나타낸 것이다.
도 5는 감성 스코어 및 기술 지표를 입력변수로 하는 주가 예측 모델의 정확도를 나타낸 것이다.
도 6은 테스트 기간에 따른 기술통계변수모델과 감성분석모델 및 Mixed 모델의 정확도를 나타낸 것이다.
도 7은 감성 스코어만을 입력변수로 하는 주가 예측 모델에서 알고리즘별 정확도를 나타낸 것이다.
도 8은 감성 변수 간에 회귀분석을 통한 주가와 감성 변수 간의 상관 관계를 나타낸 것이다.
도 9는 본 발명의 바람직한 일 실시예에 따른 주가 예측 장치의 구성을 도시한 도면이다.
1 is a diagram illustrating a process of constructing a stock price prediction model according to the present embodiment.
2 is a diagram illustrating an actual stock price prediction process according to an embodiment of the present invention.
3 shows the accuracy of a stock price prediction model using only a technical index (technical statistical variable) as an input variable.
4 shows the accuracy of a stock price prediction model using only an emotion score as an input variable.
5 shows the accuracy of a stock price prediction model using emotion scores and technical indicators as input variables.
6 shows the accuracy of the descriptive statistical variable model, the emotion analysis model, and the mixed model according to the test period.
7 shows the accuracy of each algorithm in a stock price prediction model using only emotion scores as input variables.
8 shows the correlation between the stock price and the sentiment variable through regression analysis among sentiment variables.
9 is a diagram showing the configuration of a stock price prediction apparatus according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다.In the present invention, various modifications may be made and various embodiments may be provided, and specific embodiments will be illustrated in the drawings and described in detail.

그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. However, this is not intended to limit the present invention to a specific embodiment, it is to be understood to include all changes, equivalents, and substitutes included in the spirit and scope of the present invention.

본 발명은 기업 관련 이벤트 발생 시, 뉴스 기사의 다범주 감성을 분석하여 개별 기업의 미래 시점의 주가를 예측한다. In the present invention, when a company-related event occurs, the stock price of an individual company is predicted by analyzing the multi-category sensitivity of a news article.

본 실시예에 따른 주가 예측 과정은 크게 모델 구축 과정(model building phase)와 스코어링 과정(scoring phase)로 구분할 수 있다. The stock price prediction process according to the present embodiment can be largely divided into a model building phase and a scoring phase.

도 1은 본 실시예에 따른 주가 예측 모델의 구축 과정을 도시한 도면이다. 1 is a diagram illustrating a process of constructing a stock price prediction model according to the present embodiment.

도 1을 참조하면, 우선 웹크롤링을 통해 과거 미리 설정된 기간 동안 각 기업의 뉴스 기사를 수집하여 뉴스 기사 데이터베이스를 생성한다(단계 100).Referring to FIG. 1, first, a news article database is created by collecting news articles of each company for a past preset period through web crawling (step 100).

단계 100은 각 기업의 뉴스 기사 제목을 수집하고, 뉴스 기사 제목 데이터베이스를 구축하는 과정일 수 있다. Step 100 may be a process of collecting news article titles of each company and establishing a news article title database.

본 실시예에서 수집하는 뉴스 중 주가에 미치는 영향이 극히 미미하다고 판단되는 야구, 축구, 배구 등에의 기업 스포츠 스폰서 활동과 스폰서를 받는 구단과 구단에 소속된 선수에 관련된 기사는 제외될 수 있고, 포토뉴스(사진 뉴스)들의 대부분이 주가에 영향을 미칠 수 있는 기업 관련 정보가 아닌 단순 가십 기사인 경우가 많아 포토뉴스(사진 뉴스) 또한 배제할 수 있다. Among the news collected in this example, articles related to corporate sports sponsorship activities such as baseball, soccer, volleyball, etc., which are judged to have very little impact on stock prices, and articles related to sponsored clubs and players belonging to the club may be excluded. Since most of the news (photo news) are simply gossip articles rather than corporate-related information that can affect the stock price, photo news (photo news) can also be excluded.

하지만 광고 및 연예인과 같은 광고 모델에 관련된 뉴스 기사는 기업의 마케팅 활동으로써 주가에 영향을 미칠 수 있는 정보로 판단하여 분석 대상에 포함시킨다. However, news articles related to advertising models such as advertisements and celebrities are judged as information that can affect the stock price as a marketing activity of a company and included in the analysis target.

다음으로, 각 기업별 뉴스 기사의 수를 통계적으로 계산하고(단계 102), 각 기업별 이벤트 식별 기준(event identification criteria)을 설정한다(단계 104).Next, the number of news articles for each company is statistically calculated (step 102), and event identification criteria for each company are set (step 104).

여기서, 기업별 이벤트 식별 기준은 과거 소정 기간 동안의 뉴스 기사의 수를 통해 계산된 일별 평균 및 표준편차의 합으로서 정의될 수 있다. Here, the event identification criterion for each company may be defined as a sum of a daily average and standard deviation calculated through the number of news articles for a predetermined period in the past.

본 발명에서, 이벤트 발생은 특정 기업의 일별 뉴스 기사의 수가 이벤트 식별 기준을 초과하는 경우로 정의될 수 있다. In the present invention, the occurrence of an event may be defined as a case where the number of daily news articles of a specific company exceeds the event identification criterion.

예를 들어, 모든 기사를 기업에 관련된 정보로 판단하기보다 평소보다 뉴스의 수가 급증하는 경우 기업에 관련된 이벤트가 발생했다고 보는 것이다. For example, rather than judging all the articles as information related to the company, if the number of news increases more than usual, it is considered that an event related to the company has occurred.

N년 동안 웹크롤링한 뉴스 기사 수를 통계적으로 계산하여 미리 설정된 임계치인 이벤트 식별 기준을 설정하고, 현재 날짜 t의 뉴스 기사 수가 이벤트 식별 기준을 초과하면 이벤트가 발생하는 것으로 정의한다. An event identification criterion, which is a preset threshold, is set by statistically calculating the number of web-crawled news articles for N years, and an event occurs when the number of news articles on the current date t exceeds the event identification criterion.

본 실시예에 따르면, 이벤트 간의 혼동 효과(confounding effect)을 배제하고자 단기 이벤트 윈도우(short event window)를 설정하여 각 이벤트의 주요 내용을 중심으로 군집화를 하거나 임의의 기준으로 이벤트들을 통합하여 하나의 이벤트로 설정하지 않고 통계적 이벤트 기준을 충족하는 서로 분리되는(discrete) 기간을 개별 이벤트로 간주한다. According to the present embodiment, in order to exclude confounding effects between events, a short event window is set and clustered around the main contents of each event, or events are combined on an arbitrary basis to form one event. Discrete periods that do not set to and meet the statistical event criteria are considered as individual events.

다음으로, 특정 기업의 이벤트 식별 기준을 초과하는 뉴스 기사가 존재하는 이벤트 기간 동안의 뉴스 기사를 다범주 감성 분석하여 감성 스코어(Event Sentiment Score)를 계산한다(단계 106).Next, the event sentiment score is calculated by analyzing the multi-category sentiment of the news article during the event period in which the news article exceeding the event identification criterion of a specific company exists (step 106).

단계 106은 미리 구축된 감성 사전(Sentiment Lexicon)을 참조하여 수행될 수 있다. Step 106 may be performed with reference to a pre-built Sentiment Lexicon.

감성 사전 기반 감성 분석은 실용성과 정확성 때문에 널리 쓰여왔으나 분석의 정확성을 위해서는 양질의 감성 사전을 필수적으로 요구한다. 따라서 본 실시에에서는 분석의 정확도를 위해 기존 한국어 감성 사전에서 더 발전된 형태의 다범주 감성 사전을 적용한다. Emotional dictionary-based sentiment analysis has been widely used because of its practicality and accuracy, but for the accuracy of analysis, a high-quality emotional dictionary is essential. Therefore, in this embodiment, for the accuracy of analysis, a multi-category sensibility dictionary in a more advanced form from the existing Korean sensibility dictionary is applied.

본 실시예에서, 감성을 ‘행복’, ‘슬픔’, ‘공포’, ‘분노’, ‘혐오’, ‘놀람’, ‘중성’, 6가지 감성 변수로 범주를 나누고 기준값(threshold)을 넘지못해 분류가 모호한 감성은 중성(neutrality)로 처리한다. 이러한 분류는 일상생활에서 사람들이 감성을 묘사하는 형태와 유사하고 직관적이기 때문에 이해하기 쉽다는 장점이 있다.In this embodiment, the emotions are categorized into'happiness','sad','fear','anger','hate','surprise','neutral', and six emotional variables, and do not exceed the threshold. Emotions whose classification is ambiguous are treated as neutrality. This classification has the advantage of being easy to understand because it is intuitive and similar to the form that people describe emotions in everyday life.

본 실시예에 따르면, 각 기업의 이벤트 기간 동안 감성 스코어를 계산하기 위해, 아래와 같은 수식을 이용한다. According to this embodiment, in order to calculate the emotional score during the event period of each company, the following formula is used.

Figure pat00001
Figure pat00001

여기에서 ‘Number of Sentiment Words’는 이벤트 기간 동안의 뉴스 기사 제목에서 감성 단어가 존재하는 개수를 의미하고 ‘Number of Event News Articles’는 이벤트 기간 동안의 뉴스 제목을 의미한다.Here,'Number of Sentiment Words' means the number of sentiment words in the title of a news article during the event period, and'Number of Event News Articles' means the news title during the event period.

본 실시예에 따르면, 이벤트의 크기에 상관없이 이벤트가 일으키는 각 감성(‘행복’, ‘슬픔’, ‘공포’, ‘분노’, ‘혐오’, ‘놀람’)의 정도를 측정하기 때문에 ‘Number of Sentiment Words’을 ‘Number of Event News Articles’로 나누어 이벤트 기간 동안의 감성 스코어를 계산한다. According to this embodiment, since the degree of each emotion ('happiness','sad','fear','anger','hate','surprise') caused by the event is measured regardless of the size of the event,'Number Dividing'of Sentiment Words' by'Number of Event News Articles' to calculate the emotional score during the event.

이벤트 기간 동안의 뉴스 기사 제목을 분석하기 전에 정확한 감성 분석을 위해 전처리 과정을 수행한다. 수집된 뉴스에서 의미를 갖는 형태소만을 활용할 수 있도록 특수기호 및 불용어를 제거한다. Before analyzing the title of the news article during the event, a pre-processing process is performed for accurate sentiment analysis. Special symbols and stop words are removed so that only morphemes with meaning can be used from the collected news.

전처리 과정을 거친 텍스트 데이터를 미리 구축한 감성 사전을 참조하여 감성 분석을 수행하며, 본 실시예에 따른 다범주 감성에 따른 감성 스코어를 계산한다.The sentiment analysis is performed with reference to the sentiment dictionary built in advance of the pre-processed text data, and the sentiment score according to the multi-category sentiment according to the present embodiment is calculated.

단계 106와 함께, 이벤트 기간 동안의 특정 기업의 주가 데이터 분석을 통해 기술 지표를 산출한다(단계 108).In conjunction with step 106, a technical indicator is calculated through analysis of stock price data of a specific company during the event period (step 108).

기술적 분석(Technical analysis)은 주가 예측을 위하여 일반적으로 사용되는 방안 중 하나이며, 이를 위해 활용하는 주요 기술적 지표들(technical indicators)은 SMA (Simple Moving Average), MACD (Moving Average Convergence Divergence) oscillator, Stochastic oscillator 등이 있다. Technical analysis is one of the methods commonly used for stock price prediction, and the main technical indicators used for this are SMA (Simple Moving Average), MACD (Moving Average Convergence Divergence) oscillator, and Stochastic. oscillator, etc.

이러한 기술적 지표들은 주식 시장에서의 거래 가격, 거래량 등을 기반으로 산출할 수 있으며, 주식의 상승 또는 하락과 같은 변화 추이의 분석을 위해 다수의 선행 연구들에서 활용하고 있다.These technical indicators can be calculated based on the transaction price and volume in the stock market, and are used in a number of previous studies to analyze changes such as the rise or fall of stocks.

본 실시예에서 활용한 기술적 지표는 SMA (Simple Moving Average), EMA (Exponential Moving Average), MACD (Moving Average Convergence Divergence) oscillator, RSI (Relative Strength Index), Stochastic oscillator K%, Stochastic oscillator D%, Ultimate Oscillator (Larry William's R%) 이며, 이는 통상의 기술자에게 널리 알려진 사항이므로 이에 대한 상세한 설명은 생략한다. The technical indicators used in this embodiment are SMA (Simple Moving Average), EMA (Exponential Moving Average), MACD (Moving Average Convergence Divergence) oscillator, RSI (Relative Strength Index), Stochastic oscillator K%, Stochastic oscillator D%, Ultimate Oscillator (Larry William's R%), which is widely known to a person skilled in the art, and thus a detailed description thereof will be omitted.

본 발명의 일 실시예에 따르면, 감성 스코어가 주가 예측 모델의 주요 입력변수가 될 수 있고, 기술 지표는 선택적으로 입력될 수 있다. According to an embodiment of the present invention, an emotion score may be a major input variable of a stock price prediction model, and a technical index may be selectively input.

이에 대해서는 실험을 통한 비교 과정에서 다시 상술될 것이다. This will be described in detail again in the process of comparison through experiments.

단계 106의 감성 스코어 및 단계 108의 기술 지표가 주가 예측 모델을 입력변수가 된다. The sentiment score in step 106 and the technical index in step 108 serve as input variables for the stock price prediction model.

다음으로 이벤트 기간 동안의 주가 데이터로 개별 기업의 초과 수익률을 계산하고 이를 주가 예측 모델의 결과변수로 설정한다(단계 110).Next, the excess return of individual companies is calculated using the stock price data during the event period, and this is set as an outcome variable of the stock price prediction model (step 110).

마지막으로 날짜 t의 감성 스코어(Event Sentiment Score)와 기술 지표(Event Technical Indicator)를 주가 예측 모델에 대입하여 개별 기업의 날짜 t로부터 t+α까지의 초과 수익률을 예측하여 주가 예측 모델을 학습한다(단계 112).Finally, by substituting the Event Sentiment Score and Event Technical Indicator of date t into the stock price prediction model, we learn the stock price prediction model by predicting the excess return rate from date t to t+α of individual companies ( Step 112).

여기서, 초과 수익률은 시장에서의 주가 상승분을 고려한 개별 기업의 주가 상승 또는 하락을 나타내는 지표이다. Here, the excess return is an index indicating an increase or decrease in the stock price of an individual company in consideration of the increase in the stock price in the market.

본 실시예에 따른 주가 예측 모델은 과거의 감성 스코어 및/또는 기술 지표를 입력변수로, 초과 수익률(Excess Return)을 결과변수로 알고리즘에 의해 학습시킨 모델이다.The stock price prediction model according to the present embodiment is a model that is trained by an algorithm using past sentiment scores and/or technical indicators as input variables and excess returns as result variables.

이전의 많은 연구에서 각 기업에 대한 market model을 측정하고 비정상 수익률(abnormal returns)을 계산하는 방식으로 예측되지 않은 이벤트가 주식에 미치는 영향을 측정하였다. 즉, 비정상 수익률을 주식 시장이 새로운 정보(이벤트)에 반응한 결과라고 보는 것이다. In many previous studies, we measured the impact of unforeseen events on stocks by measuring the market model for each company and calculating abnormal returns. In other words, the abnormal rate of return is viewed as the result of the stock market's reaction to new information (events).

비정상 수익률을 구하기 위해서는 예측 기간 동안 샘플 주식에 대한 기대 수익률(expected return for sample stock over an estimation period)을 구해야 한다. 예를 들어, 기대 수익률, E(Rit)에 대한 여러 모델 중 Market-model-adjust return 모형이 선택될 수 있다. In order to find an abnormal return, you need to find the expected return for sample stock over an estimation period. For example, the Market-model-adjust return model may be selected among several models for the expected return rate and E(R it ).

이는 여러 event studies 선행연구에서 가장 흔하게 사용되는 방식으로 (Bonnier and Bruner, 1989; Lummer and McConnell, 1989; Schipper and Thompson, 1983; Homan, 2006; Small et al., 2007) 다음과 같은 공식으로 날짜 t에서 기업 i의 주가에 대한 수익률(rate of return on the share price)을 구할 수 있다. This is the most commonly used method in previous studies of various event studies (Bonnier and Bruner, 1989; Lummer and McConnell, 1989; Schipper and Thompson, 1983; Homan, 2006; Small et al., 2007). You can find the rate of return on the share price of Entity i at.

Figure pat00002
Figure pat00002

여기서,

Figure pat00003
은 일별 회사 i의 주가에 대한 수익률(the rate of return on the share price of firm i on day t),
Figure pat00004
은 시장 포트폴리오의 주식 수익률(the rate of return on a market portfolio of stocks)로서 벤치마크 수익률이라고도 한다. 보통 대표적인 주가 지수를 사용한다. here,
Figure pat00003
Is the rate of return on the share price of firm i on day t,
Figure pat00004
Is the rate of return on a market portfolio of stocks, also known as the benchmark rate of return. Usually a representative stock price index is used.

Figure pat00005
는 절편(the intercept term),
Figure pat00006
는 주식 i의 구조적인 위험(the systematic risk of stock i)이다.
Figure pat00005
Is the intercept term,
Figure pat00006
Is the systematic risk of stock i.

Figure pat00007
Figure pat00008
Figure pat00009
의 측정 기간 동안의 회귀분석으로부터 얻을 수 있는 Ordinary Least Squares(OLS) parameter estimates이다.
Figure pat00007
and
Figure pat00008
Is
Figure pat00009
These are Ordinary Least Squares (OLS) parameter estimates that can be obtained from regression analysis over the measurement period of.

Figure pat00010
는 에러(the error term)을 의미한다.
Figure pat00010
Means the error term.

기대 수익률(Expected Return)을 구한 뒤에는 각 개별 주식의 비정상 수익률(또는 초과 수익률)을 구할 수 있다. 다음 공식과 같이 이벤트 기간 동안의 날짜 t의 실제 수익률과 개별 주식의 기대 수익률의 차이를 통해 구한다.After finding the Expected Return, you can find the abnormal return (or excess return) for each individual stock. It is obtained through the difference between the actual return on date t during the event period and the expected return on individual stocks, as shown in the following formula.

Figure pat00011
Figure pat00011

도 2는 본 발명의 바람직한 일 실시예에 따른 실제 주가 예측 과정을 도시한 도면이다. 2 is a diagram illustrating an actual stock price prediction process according to an embodiment of the present invention.

도 2는 학습된 주가 예측 모델을 이용하여 이벤트 발생 이후 주가를 예측하는 과정이다. 2 is a process of predicting a stock price after an event occurs using a learned stock price prediction model.

우선, 새로운 날짜 t의 각 기업별 뉴스 기사를 웹크롤링하고(단계 200), 날짜 t의 뉴스 기사 수가 미리 설정된 이벤트 식별 기준을 초과하는 기업이 존재하는지 여부를 판단한다(단계 202).First, web crawling of news articles for each company of the new date t (step 200), and it is determined whether or not there is a company whose number of news articles of the date t exceeds a preset event identification criterion (step 202).

이벤트 식별 기준을 초과하는 기업에 대해, 이벤트 발생한 기준날짜 t의 뉴스 기사 제목들을 다범주 감성 분석하여 감성 스코어를 계산한다(단계 204).For companies exceeding the event identification criterion, a sentiment score is calculated by analyzing the multi-category sentiment of news article titles of the reference date t of the event occurrence (step 204).

선택적으로 동일한 이벤트 기간 동안 과거의 주가 데이터를 날짜 t에 대해 기술 통계 분석한 결과인 기술 지표를 산출한다(단계 206).Optionally, a descriptive index, which is a result of descriptive statistical analysis on the date t, of the past stock price data during the same event period is calculated (step 206).

다음으로, 감성 스코어를 포함하는 입력변수를 주가 예측 모델에 대입하여 개별 기업의 이벤트 발생 기준날짜 t로부터 미래 시점의 주가를 예측한다(단계 208).Next, by substituting the input variable including the sentiment score into the stock price prediction model, the stock price at a future point in time is predicted from the reference date t of the occurrence of an event of an individual company (step 208).

바람직하게, 단계 208에서, 이벤트 발생 기준날짜 t로부터 t+α만큼 경과된 시점부터 주가가 예측될 수 있고, 보다 바람직하게, 이벤트 발생 기준날짜 t로부터 미리 설정된 기간 동안의 주가가 예측될 수 있다. Preferably, in step 208, the stock price may be predicted from the time point t+α has elapsed from the event occurrence reference date t, and more preferably, the stock price for a preset period from the event occurrence reference date t may be predicted.

본 실시예에 따른 주가 예측 모델은 전체 기간이 아닌 특정 기업에 관련된 이벤트가 발생한 기간 동안의 뉴스 기사 제목을 분석대상으로 한다는 점, 또한 개별 기업에 대한 감성을 극성이 아닌 다범주로 개별 분석하고 감성 분석 결과를 머신러닝 기법을 통해 분석하여 기업의 주가를 예측하고자 하는 모델이라는 점에서 이전의 선행 모델과는 차별점이 있다.The stock price prediction model according to the present embodiment targets the analysis of the news article title during the period when the event related to a specific company occurred, not the entire period, and also analyzes the emotions of individual companies in a multi-category, not polarity. It differs from previous models in that it is a model that tries to predict the stock price of a company by analyzing the analysis results through machine learning techniques.

본 실시예에 따르면, 주가 예측 모델의 알고리즘으로 머신러닝 기법인 로지스틱 회귀분석(Logistic Regression Model), 서포트 벡터 머신(Support Vector Machine), 나이브 베이지안 분류기(Naive Beysian Classifier) 및 랜덤포레스트 회귀분석(Random Forest Regression Model) 중 하나가 이용될 수 있다. According to the present embodiment, as an algorithm of a stock price prediction model, a logistic regression model, a support vector machine, a Naive Beysian Classifier, and a random forest regression analysis, which are machine learning techniques. Regression Model) can be used.

해당 알고리즘들은 분류기(classifier)의 특성을 가지기 때문에 본 실시예에 따른 모델은 이벤트가 발생했을 때 감성 스코어 및 기술 지표를 계산하고 입력하여 미래의 주가가 상승할 것인지 혹은 하락할 것인지 2가지로 분류하게 된다. Since the algorithms have the characteristics of a classifier, the model according to the present embodiment calculates and inputs a sentiment score and a technical index when an event occurs, and classifies whether the future stock price will rise or fall. .

알고리즘의 정확도는 직관적으로 모델의 성능을 나타내는 지표로서, 전체 예측 중 정답을 맞춘 예측의 비율을 의미한다. The accuracy of the algorithm is an indicator that intuitively indicates the performance of the model, and refers to the proportion of predictions with correct answers among all predictions.

정확도는 다음과 같은 식으로 나타낼 수 있고, 본 실시예에서, True(는 초과 수익률의 상승, False는 초과 수익률의 하락을 의미한다. The accuracy can be expressed in the following equation, and in this embodiment, True( means an increase in excess return, False means a decrease in excess return rate.

Figure pat00012
Figure pat00012

여기서, True Positive(TP) : 실제 True인 정답을 True라고 예측한 정답Here, True Positive (TP): The correct answer that predicts the true answer as true

False Positive(FP) : 실제 False인 정답을 True라고 예측한 오답False Positive (FP): Incorrect answer that predicts true false answer

False Negative(FN) : 실제 True인 정답을 False라고 예측한 오답False Negative (FN): Incorrect answer predicting that the correct answer that is true is false

True Negative(TN) : 실제 False인 정답을 False라고 예측한 정답이다. True Negative (TN): This is the correct answer that predicts the true answer that is false as false.

정확도는 테스트 셋에서의 데이터가 보통 균일하게 분포되어 있지 않기 때문에 모델의 성능 평가가 유효하게 이루어졌다고 확신할 수 없는 문제점이 발생한다.As for the accuracy, the data in the test set are not usually evenly distributed, so there is a problem that it is impossible to be sure that the performance evaluation of the model is valid.

따라서 본 실시예에서는 데이터의 도메인이 불균형하여 발생되는 데이터 도메인의 바이어스(bias)를 해결하고자 다음과 같은 보완적 지표를 사용하였다.Therefore, in the present embodiment, the following complementary indicators are used to solve the bias of the data domain caused by the unbalanced data domain.

특이도(Specificity)란 모델이 False라고 분류한 것 중에서 실제 False인 것의 비율로서 아래와 같은 식으로 표현된다. 본 실시예에서는 전체 초과 수익률의 하락 중 주가 예측 모델이 하락을 맞게 예측한 비율을 의미한다.The specificity is the ratio of the actual false among those classified as false by the model and is expressed in the following equation. In the present embodiment, it refers to the ratio of the decline in the total excess return on which the stock price prediction model predicts the decline.

Figure pat00013
Figure pat00013

민감도(Sensitivity)는 실제 True인 것 중에서 모델이 True라고 예측한 것의 비율로서, 전체 초과 수익률의 상승 중 주가 예측 모델이 상승을 맞게 예측한 비율을 의미하며, 아래의 식과 같다. Sensitivity is the ratio of what the model predicts to be true among those that are actually true, and refers to the ratio of the stock price prediction model's prediction for the rise among the rise of the total excess return, and is as follows.

Figure pat00014
Figure pat00014

민감도와 특이도는 일반적으로 한 쪽이 증가하면 다른 한 쪽이 감소하는 경향을 보인다. 이처럼 민감도와 특이도는 서로 반대로 움직이는 경향이 있기 때문에 이 둘을 모두 높이는 진단 방법을 찾는 것이 쉽지 않다. Sensitivity and specificity generally tend to decrease when one side increases. As such, since sensitivity and specificity tend to move in opposite directions, it is difficult to find a diagnostic method that increases both.

F1-Score는 정밀도(Precision)과 민감도의 조화평균으로서 데이터의 label이 불균형한 구조를 가지고 있을 때 모델의 성능을 정확하게 평가할 수 있도록 돕는 지표이며 숫자를 통해 표현할 수 있다. F1-Score is a harmonic average of precision and sensitivity, an index that helps to accurately evaluate the model's performance when the label of data has an unbalanced structure, and can be expressed through numbers.

정밀도란 모델이 True라고 분류한 것 중에서 실제 True인 것의 비율로서 아래와 같은 식으로 표현된다. PPV(Positive Predictive Value)라고 불리기도 한다.The precision is the ratio of what is actually true among those classified as true by the model, and is expressed in the following equation. It is also called PPV (Positive Predictive Value).

Figure pat00015
Figure pat00015

조화평균이란 개념을 통해 정밀도와 민감도 중 큰 비중의 요소가 끼치는 바이어스가 상당 부분 해결되며, 다음과 같은 식으로 표현된다.Through the concept of the harmonic average, the bias caused by the large proportion of precision and sensitivity is largely resolved, and is expressed in the following equation.

Figure pat00016
Figure pat00016

AUC(Area Under Curve)는 모델의 discrimination power을 숫자로 쉽게 평가하기 위한 metric으로 possible cut-off values의 전체 구간에서 모델의 분류 성능을 나타낸 것이다. AUC (Area Under Curve) is a metric for easily evaluating the discrimination power of a model numerically and shows the classification performance of the model in the entire range of possible cut-off values.

ROC(Receiver Operating Characteristic) Curve에서 그래프 아래의 면적값을 수치화한 것이 AUC(Area Under Curve)로서 최대값은 1이고 좋은 모델일수록 1에 가까운 값이 산출된다. In ROC (Receiver Operating Characteristic) Curve, AUC (Area Under Curve) is the numerical value of the area under the graph. The maximum value is 1, and the better the model, the closer to 1 is calculated.

여기서 ROC는 여러 임계값들을 기준으로 재현율(Recall)과 위양성율(Fallout)의 변화를 시각화한 결과이다. FPR(False Positive Rate)라고도 불리는 위양성율은 실제 False인 데이터 중 모델이 True라고 예측한 비율로서 아래의 식으로 나타낸다.Here, ROC is the result of visualizing changes in recall and false positive rates based on several threshold values. The false positive rate, also called FPR (False Positive Rate), is the ratio of the actual false data that the model predicted to be true, and is expressed by the following equation.

Figure pat00017
Figure pat00017

즉, AUC는 위양성율에 비해 재현율의 값이 클수록 1에 가까운 값은 나오며 성능이 좋은 모델이라고 할 수 있다. AUC는 데이터 마이닝의 영역에서 분류 모델의 성능을 평가할 때 흔히 허용되는 performance metric이다.In other words, the AUC is a model with good performance as a value closer to 1 comes out as the value of the recall rate increases compared to the false positive rate. AUC is a commonly accepted performance metric when evaluating the performance of a classification model in the area of data mining.

이하에서는 본 실시예에 따른 주가 예측 모델의 평가를 위한 실험 과정을 설명한다. Hereinafter, an experiment process for evaluating the stock price prediction model according to the present embodiment will be described.

특정 기업의 이벤트 식별 기준을 초과하는 이벤트가 발생한 경우, 이벤트 발생 기준날짜의 전날, 당일, 다음날, 이틀 후, 삼일 후로부터 테스트 기간은 1day, 2days, 3days, 4days, 5days, 6days, 7days, 10days, 15days, 20days, 25days, 30days로 설정된다. If an event exceeding the event identification criteria of a specific company occurs, the test period is 1day, 2days, 3days, 4days, 5days, 6days, 7days, 10days, from the day before, the day, the next day, two days, and three days after the event occurrence reference date. It is set as 15days, 20days, 25days, 30days.

입력변수를 기술통계변수(기술지표)로 한 모델(기술통계변수모델), 감성분석점수로 한 모델(감성분석모델), 기술통계변수와 감성분석점수를 모두 입력한 모델(mixed 모델) 세 모델의 정확도가 변수 및 조건을 변경할 때 어떻게 변화하는지를 살펴보았다. A model with input variables as descriptive statistical variables (technical indicators) (descriptive statistics variable model), a model with sentiment analysis scores (sensibility analysis model), and a model with both descriptive statistical variables and sentiment analysis scores (mixed model) We have seen how the accuracy of is changed when variables and conditions are changed.

각 머신러닝 알고리즘 기법별로 테스트 기간이 변할 때 정확도를 어떻게 변화하는지를 살펴보았다. We looked at how the accuracy of each machine learning algorithm changes when the test period changes.

테스트 기간은 가변변수로 두고 이벤트 발생 기준날짜별 정확도는 전체 날짜로 산술평균값을 구해 고정변수로 두었다.The test period was set as a variable variable, and the accuracy of each event occurrence reference date was set as a fixed variable by calculating the arithmetic mean value for the entire date.

도 3은 기술 지표(기술통계변수)만을 입력변수로 하는 주가 예측 모델의 정확도를 나타낸 것이다. 3 shows the accuracy of a stock price prediction model using only a technical index (technical statistical variable) as an input variable.

도 3을 참조하면, 기술통계변수만을 입력변수로 하는 주가 예측 모델에서, 로지스틱 회귀분석(Logistic Regression Model: LR), 서포트 벡터 머신(Support Vector Machine: SVM), 나이브 베이지안 분류기(Naive Beysian Classifier: NB), 랜덤포레스트 회귀분석(Random Forest Regression Model: RF) 모두 단기 테스트 기간(short test period)보다는 상대적으로 장기 테스트 기간(long test period)로 갈수록 예측 정확도가 높아지고, 10days 이후부터 유의미하게 높아지기 시작하여 15days와 20days에서 가장 높은 예측정확도를 보였다.3, in a stock price prediction model using only descriptive statistics as input variables, logistic regression model (LR), support vector machine (SVM), naive Bayesian classifier (NB) ) And Random Forest Regression Model (RF), the prediction accuracy increases with a relatively long test period rather than a short test period, and starts to increase significantly from 10 days to 15 days. And 20 days showed the highest prediction accuracy.

도 4는 감성 스코어만을 입력변수로 하는 주가 예측 모델의 정확도를 나타낸 것이다. 4 shows the accuracy of a stock price prediction model using only an emotion score as an input variable.

도 4를 참조하면, 감성 스코어만을 입력변수로 하는 주가 예측 모델도 이벤트 발생 기준날짜 10days 이후로 예측의 정확도가 크게 증가하였으며 15days, 20days에서 가장 정확하게 예측하였다. 또한 해당 테스트 기간에서 감성 스코어를 입력변수로 한 모델이 기술 지표를 입력변수로 한 모델보다 더 정확하게 주가를 예측하는 현상을 보였다.Referring to FIG. 4, even in the stock price prediction model using only the emotion score as an input variable, the accuracy of the prediction increased significantly after 10 days of the event occurrence reference date, and was most accurately predicted at 15 days and 20 days. In addition, during the test period, the model with the sentiment score as the input variable predicted the stock price more accurately than the model with the technical indicator as the input variable.

도 5는 감성 스코어 및 기술 지표를 입력변수로 하는 주가 예측 모델의 정확도를 나타낸 것이다. 5 shows the accuracy of a stock price prediction model using emotion scores and technical indicators as input variables.

도 5를 참조하면, Mixed 모델도 위 두 모델과 비슷한 양상을 보였으나 정확도가 기술통계변수모델과 감성분석모델보다 정확도가 높아지지는 않았으며 오히려 두 모델보다 떨어지는 현상을 발견할 수 있다.Referring to FIG. 5, the mixed model also showed a similar aspect to the above two models, but the accuracy was not higher than that of the descriptive statistical variable model and the sentiment analysis model, but rather, it can be found that it is inferior to the two models.

도 6은 테스트 기간에 따른 기술통계변수모델과 감성분석모델 및 Mixed 모델의 정확도를 나타낸 것이다. 6 shows the accuracy of the descriptive statistical variable model, the sentiment analysis model, and the mixed model according to the test period.

도 6을 참조하면, 단기 테스트 윈도우에 비해 상대적으로 장기 테스트 윈도우(Long test window, 7days ~ 30 days)에서 보았을 때 15days와 20days에서 감성변수모델이 다른 모델에 비해 높은 정확도를 가지는 것을 확인할 수 있다. .Referring to FIG. 6, it can be seen that the emotional variable model has a higher accuracy than other models in 15 days and 20 days when viewed in a long test window (7 days to 30 days) relative to the short test window. .

도 7은 감성 스코어만을 입력변수로 하는 주가 예측 모델에서 알고리즘별 정확도를 나타낸 것이다. 7 shows the accuracy of each algorithm in a stock price prediction model using only emotion scores as input variables.

도 7에서, 이벤트 발생 기준날짜는 가변변수이지만 테스트 기간 변수는 산술평균값으로 구해 고정변수로 두었다. In FIG. 7, the reference date of event occurrence is a variable variable, but the test period variable is calculated as an arithmetic mean value and set as a fixed variable.

모든 알고리즘 기법들이 예측 정확도가 이벤트 발생 이후 시간이 길어질수록 상승하는 추세를 보인다. 특히, 이벤트 발생 후 3일 후(t=+3)일 때 모든 알고리즘 기법에서 가장 정확하게 예측하는 것을 알 수 있다.All algorithmic techniques show a trend of increasing prediction accuracy as the time increases after the event occurs. In particular, it can be seen that all algorithmic techniques predict the most accurately when 3 days after the event occurs (t=+3).

도 7은 감성변수모델 중 각 알고리즘 기법별로 가장 높은 예측 정확도를 보이는 3개를 선정한 것이다.7 shows three selections of emotional variable models showing the highest prediction accuracy for each algorithm technique.

대부분의 모델들이 이벤트 발생 이틀 후(T=+2)나 삼일 후(T=+3)에, 이벤트 발생 기준날짜로부터 10days, 15days, 20 days가 경과하였을 때 가장 높은 예측 정확도를 보이는 것을 알 수 있다. 대부분의 모델들이 높은 sensitivity를 보여 주가의 상승을 잘 예측하는 경향이 있다는 것을 확인할 수 있다.It can be seen that most of the models show the highest prediction accuracy when the event occurs 2 days (T=+2) or 3 days (T=+3), and 10, 15, and 20 days have elapsed from the reference date of the event. . It can be seen that most of the models show high sensitivity and tend to predict the rise of the stock price well.

도 7에 도시된 바와 같이, 가장 높은 예측 정확도를 보이는 모델은 로지스틱 회귀분석(Logistic Regression Model) 기법을 활용하여 기준날짜를 이벤트 발생 후 삼일 후(T=+3)부터 15days가 지난 후의 주가를 예측하는 모델이다. As shown in FIG. 7, the model with the highest prediction accuracy predicts the stock price after 15 days from 3 days after the event occurs (T=+3) using a logistic regression model technique. It is a model.

따라서 이벤트 발생 기준날짜부터 15days 후의 초과 수익률 변동과 본 실시예에 따른 감성 변수 간에 회귀분석을 하여 어떤 감성이 주가와 높은 상관관계를 보이는지 살펴보았다. 도 8에 도시된 바와 같이, 혐오(disgust)와 슬픔(sadness)가 각각 0.007883, 0.057358의 유의한 F 값을 보여 통계적으로 유의한 변수라는 것을 알 수 있었고 초과 수익률 변동과는 -2.18886, -1.21878의 계수(coefficient)를 보여 부정적인 상관관계가 있음을 확인할 수 있다. 초과 수익률 변동과 감성 변수 간의 회귀식은 아래와 같으며, 식의 유의한 F값은 0.053723이다. 총 관측값 2660개 중 자유도는 2653개이며 잔차는 7개이다.Therefore, a regression analysis was performed between the fluctuation of the excess return 15 days after the event occurrence reference date and the sentiment variable according to the present embodiment to examine which sentiment showed a high correlation with the stock price. As shown in Figure 8, disgust and sadness showed significant F values of 0.007883 and 0.057358, respectively, indicating that they were statistically significant variables, and the excess return fluctuations were -2.18886 and -1.21878. By showing the coefficient, it can be confirmed that there is a negative correlation. The regression equation between the excess return fluctuation and the emotional variable is as follows, and the significant F value of the equation is 0.053723. Of the 2660 total observations, the degrees of freedom are 2653 and the residuals are 7.

Figure pat00018
Figure pat00018

도 9는 본 발명의 바람직한 일 실시예에 따른 주가 예측 장치의 구성을 도시한 도면이다. 9 is a diagram showing the configuration of a stock price prediction apparatus according to an embodiment of the present invention.

도 9에 도시된 바와 같이, 본 실시예에 따른 주가 예측 장치는 프로세서(900) 및 메모리(902)를 포함할 수 있다. As shown in FIG. 9, the stock price prediction apparatus according to the present embodiment may include a processor 900 and a memory 902.

프로세서(900)는 컴퓨터 프로그램을 실행할 수 있는 CPU(central processing unit)나 그밖에 가상 머신 등을 포함할 수 있다. The processor 900 may include a central processing unit (CPU) capable of executing a computer program or a virtual machine.

메모리(902)는 고정식 하드 드라이브나 착탈식 저장 장치와 같은 불휘발성 저장 장치를 포함할 수 있다. 착탈식 저장 장치는 컴팩트 플래시 유닛, USB 메모리 스틱 등을 포함할 수 있다. 메모리(902)는 각종 랜덤 액세스 메모리와 같은 휘발성 메모리도 포함할 수 있다.The memory 902 may include a nonvolatile storage device such as a fixed hard drive or a removable storage device. The removable storage device may include a compact flash unit, a USB memory stick, or the like. The memory 902 may also include volatile memories such as various random access memories.

이와 같은 메모리(902)에는 프로세서(900)에 의해 실행 가능한 프로그램 명령어들이 저장된다. Program instructions executable by the processor 900 are stored in the memory 902.

본 실시예에 따른 메모리(902)는 미리 설정된 과거 기간 동안 수집된 기업별 뉴스 기사의 수를 계산하여 각 기업의 이벤트 식별 기준을 생성하고, 제1 기업의 제1 이벤트 식별 기준을 초과하는 뉴스 기사가 존재하는 이벤트 기간 동안의 뉴스 기사를 미리 구축된 감성 사전을 참조하여 다범주 감성 분석하여 감성 스코어를 계산하고, 계산된 감성 스코어를 입력변수로 하고, 이벤트 기간 동안의 제1 기업의 초과 수익률을 결과변수로 하여 주가 예측 모델을 학습하고, 현재 제1 기업의 뉴스 기사가 제1 이벤트 식별 기준을 초과하는 경우, 학습된 주가 예측 모델을 이용하여 향후 주가를 예측하도록, 프로세서(902)에 의해 실행 가능한 프로그램 명령어들을 저장한다. The memory 902 according to the present embodiment generates an event identification criterion for each company by calculating the number of news articles for each company collected during a preset past period, and a news article that exceeds the first event identification criterion of the first company. Calculate the emotional score by analyzing the multi-category sentiment with reference to the sentiment dictionary built in advance for the news article during the event period in which there is, and the calculated sentiment score as an input variable, and the excess return of the first company during the event period. A stock price prediction model is trained as an outcome variable, and when the current news article of the first company exceeds the first event identification criterion, the learned stock price prediction model is used to predict the future stock price, and executed by the processor 902 Stores possible program instructions.

여기서, 다범주 감성은, 혐오, 공포, 분노, 놀람, 행복 및 슬픔 중 적어도 하나의 감성 변수를 포함하고, 이 중 혐오 및 슬픔이 다른 감성 변수에 비해 높은 가중치를 가질 수 있다. Here, the multi-category sensibility includes at least one emotional variable among hate, fear, anger, surprise, happiness, and sadness, and among them, hate and sadness may have a higher weight than other emotional variables.

또한, 뉴스 기사 중 스폰서 관련 기사 및 사진 기사는 제외될 수 있다. Also, among news articles, sponsor-related articles and photo articles may be excluded.

본 실시예에 따른 감성 스코어는 이벤트 기간 동안의 뉴스 제목의 수 및 상기 뉴스 제목에 포함된 개별 감성 범주에 속하는 감성 단어의 수를 이용하여 결정될 수 있다. The sentiment score according to the present embodiment may be determined using the number of news titles during the event period and the number of emotional words belonging to individual sentiment categories included in the news title.

상기한 본 발명의 실시예는 예시의 목적을 위해 개시된 것이고, 본 발명에 대한 통상의 지식을 가지는 당업자라면 본 발명의 사상과 범위 안에서 다양한 수정, 변경, 부가가 가능할 것이며, 이러한 수정, 변경 및 부가는 하기의 특허청구범위에 속하는 것으로 보아야 할 것이다.The above-described embodiments of the present invention have been disclosed for the purpose of illustration, and those skilled in the art who have ordinary knowledge of the present invention will be able to make various modifications, changes, and additions within the spirit and scope of the present invention, and such modifications, changes and additions It should be seen as belonging to the following claims.

Claims (10)

기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치로서,
프로세서; 및
상기 프로세서에 연결되는 메모리를 포함하되,
상기 메모리는,
미리 설정된 과거 기간 동안 수집된 기업별 뉴스 기사의 수를 계산하여 각 기업의 이벤트 식별 기준을 생성하고,
제1 기업의 제1 이벤트 식별 기준을 초과하는 뉴스 기사가 존재하는 이벤트 기간 동안의 뉴스 기사를 미리 구축된 감성 사전을 참조하여 다범주 감성 분석하여 감성 스코어를 계산하고,
상기 계산된 감성 스코어를 입력변수로 하고, 상기 이벤트 기간 동안의 상기 제1 기업의 초과 수익률을 결과변수로 하여 주가 예측 모델을 학습하고,
현재 상기 제1 기업의 뉴스 기사가 상기 제1 이벤트 식별 기준을 초과하는 경우, 상기 학습된 주가 예측 모델을 이용하여 미래 주가를 예측하도록,
상기 프로세서에 의해 실행 가능한 프로그램 명령어들을 저장하는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치.
As a stock price prediction device based on event identification and multi-category sentiment analysis by company,
Processor; And
Including a memory connected to the processor,
The memory,
By calculating the number of news articles for each company collected over a preset past period, an event identification criterion for each company is created,
Calculate a sentiment score by analyzing a multi-category sentiment by referring to a pre-built sentiment dictionary for news articles during an event in which news articles exceeding the first event identification criteria of the first company exist,
Using the calculated emotional score as an input variable, and using the excess return of the first company during the event period as a result variable, a stock price prediction model is learned,
When the current news article of the first company exceeds the first event identification criterion, to predict a future stock price using the learned stock price prediction model,
A stock price prediction device based on enterprise-specific event identification and multi-category sentiment analysis that stores program instructions executable by the processor.
제1항에 있어서,
상기 다범주 감성은,
혐오, 공포, 분노, 놀람, 행복 및 슬픔 중 적어도 하나의 감성 변수를 포함하는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치.
The method of claim 1,
The multi-category sensibility is,
Stock price prediction device based on enterprise-specific event identification and multi-category sentiment analysis including at least one emotional variable among hate, fear, anger, surprise, happiness, and sadness.
제2항에 있어서,
상기 혐오 및 슬픔이 다른 감성 변수에 비해 높은 가중치를 갖는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치.
The method of claim 2,
A stock price prediction device based on event identification and multi-category sentiment analysis in which the hate and sadness have a higher weight than other emotional variables.
제1항에 있어서,
상기 뉴스 기사 중 스폰서 관련 기사 및 사진 기사는 제외되는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치.
The method of claim 1,
A device for predicting stock prices based on event identification and multi-category sentiment analysis for each company that excludes sponsor-related articles and photo articles among the above news articles.
제2항에 있어서,
상기 감성 스코어는 상기 이벤트 기간 동안의 뉴스 제목의 수 및 상기 뉴스 제목에 포함된 개별 감성 범주에 속하는 감성 단어의 수를 이용하여 결정되는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치.
The method of claim 2,
The sentiment score is determined by using the number of news titles during the event period and the number of sentiment words belonging to individual sentiment categories included in the news title.
제1항에 있어서,
상기 주가 예측 모델은,
로지스틱 회귀분석(Logistic Regression Model), 서포트 벡터 머신(Support Vector Machine), 나이브 베이지안 분류기(Naive Beysian Classifier), 랜덤포레스트 회귀분석(Random Forest Regression Model) 중 적어도 하나를 포함하는 머신러닝 알고리즘으로 구축되는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치.
The method of claim 1,
The stock price prediction model,
A company built with machine learning algorithms including at least one of Logistic Regression Model, Support Vector Machine, Naive Beysian Classifier, and Random Forest Regression Model. Stock price prediction device based on event identification and multi-category sentiment analysis.
제1항에 있어서,
상기 미래 주가는 현재 이벤트 발생 기준날짜의 소정 시점 이후로부터 15일 내지 20일 기간의 주가인 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치.
The method of claim 1,
The future stock price is a stock price prediction device based on event identification and multi-category sentiment analysis, which is a stock price for a period of 15 to 20 days after a predetermined point of a reference date of a current event.
제1항에 있어서,
상기 초과 수익률은,
시장에서의 주가 상승분을 고려한 개별 기업의 주가 상승 또는 하락을 나타내는 지표인 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 장치.
The method of claim 1,
The excess return is,
A stock price forecasting device based on company-specific event identification and multi-category sentiment analysis, which is an index indicating the rise or fall of the stock price of an individual company in consideration of the share price increase in the market.
프로세서 및 메모리를 포함하는 장치에서 기업별 이벤트 식별 및 다범주 감성 분석 기반으로 주가를 예측하는 방법으로서,
미리 설정된 과거 기간 동안 수집된 기업별 뉴스 기사의 수를 계산하여 각 기업의 이벤트 식별 기준을 생성하는 단계;
제1 기업의 제1 이벤트 식별 기준을 초과하는 뉴스 기사가 존재하는 이벤트 기간 동안의 뉴스 기사를 미리 구축된 감성 사전을 참조하여 다범주 감성 분석하여 감성 스코어를 계산하는 단계;
상기 계산된 감성 스코어를 입력변수로 하고, 상기 이벤트 기간 동안의 상기 제1 기업의 초과 수익률을 결과변수로 하여 주가 예측 모델을 학습하는 단계; 및
현재 상기 제1 기업의 뉴스 기사가 상기 제1 이벤트 식별 기준을 초과하는 경우, 상기 학습된 주가 예측 모델을 이용하여 미래 주가를 예측하는 단계를 포함하는 기업별 이벤트 식별 및 다범주 감성 분석 기반 주가 예측 방법.
As a method of predicting stock prices based on event identification and multi-category sentiment analysis in a device including a processor and memory,
Generating an event identification criterion for each company by calculating the number of news articles for each company collected during a preset past period;
Calculating a sentiment score by analyzing a multi-category sentiment with reference to a preset sentiment dictionary for a news article during an event period in which a news article exceeding a first event identification criterion of the first company exists;
Learning a stock price prediction model using the calculated emotion score as an input variable and the excess return rate of the first company during the event period as a result variable; And
When the current news article of the first company exceeds the first event identification criterion, event identification and multi-category sentiment analysis-based stock price prediction for each company including predicting future stock prices using the learned stock price prediction model Way.
제9항에 따른 방법을 수행하는 기록매체에 저장되는 프로그램.

A program stored on a recording medium performing the method according to claim 9.

KR1020190074221A 2019-06-21 2019-06-21 Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis KR102214871B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190074221A KR102214871B1 (en) 2019-06-21 2019-06-21 Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190074221A KR102214871B1 (en) 2019-06-21 2019-06-21 Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis

Publications (2)

Publication Number Publication Date
KR20200145347A true KR20200145347A (en) 2020-12-30
KR102214871B1 KR102214871B1 (en) 2021-02-09

Family

ID=74087794

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190074221A KR102214871B1 (en) 2019-06-21 2019-06-21 Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis

Country Status (1)

Country Link
KR (1) KR102214871B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114119233A (en) * 2021-12-01 2022-03-01 北京航空航天大学 Method for constructing emotion index of investor of stock fund, method, device and equipment for predicting accumulated net income rate

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140133185A (en) * 2013-05-10 2014-11-19 주식회사 코스콤 Method of predicting a stock price through an analysis of a social data and system applying the same
KR101531970B1 (en) 2013-12-26 2015-06-26 주식회사 코스콤 Method of predicting a stock price through an analysis of a social data and webdata related the securities market and system applying the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140133185A (en) * 2013-05-10 2014-11-19 주식회사 코스콤 Method of predicting a stock price through an analysis of a social data and system applying the same
KR101531970B1 (en) 2013-12-26 2015-06-26 주식회사 코스콤 Method of predicting a stock price through an analysis of a social data and webdata related the securities market and system applying the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114119233A (en) * 2021-12-01 2022-03-01 北京航空航天大学 Method for constructing emotion index of investor of stock fund, method, device and equipment for predicting accumulated net income rate

Also Published As

Publication number Publication date
KR102214871B1 (en) 2021-02-09

Similar Documents

Publication Publication Date Title
Liu et al. Modeling and predicting the helpfulness of online reviews
Vukovic et al. A case-based reasoning model that uses preference theory functions for credit scoring
Zhang et al. Comparing data mining methods with logistic regression in childhood obesity prediction
Rosenbusch et al. Supervised machine learning methods in psychology: A practical introduction with annotated R code
Daltayanni et al. Workerrank: Using employer implicit judgements to infer worker reputation
Dahiya et al. Would your tweet invoke hate on the fly? forecasting hate intensity of reply threads on twitter
Rentsch et al. The elusive likely voter: Improving electoral predictions with more informed vote-propensity models
Alkhatib et al. Predictive Model for Cutting Customers Migration from banks: Based on machine learning classification algorithms
Bansak Can nonexperts really emulate statistical learning methods? A comment on “The accuracy, fairness, and limits of predicting recidivism”
Robnik-Šikonja Dataset comparison workflows
Yan et al. An integrated method based on hesitant fuzzy theory and RFM model to insurance customers’ segmentation and lifetime value determination
KR102214871B1 (en) Method and apparatus for predicting stock price based on case-by-company event identification and multi-category emotional analysis
Gibson et al. Distributions of fatigue damage from data-driven strain prediction using Gaussian process regression
Bo et al. An IRT forecasting model: Linking proper scoring rules to item response theory
Li et al. Probabilistic outlier detection for robust regression modeling of structural response for high-speed railway track monitoring
CN112733897A (en) Method and equipment for determining abnormal reason of multi-dimensional sample data
US20220156767A1 (en) Identifying and quantifying sentiment and promotion bias in social and content networks
Chen et al. Predicting repeat offenders with machine learning: A case study of Beijing theives and burglars
US20170116554A1 (en) Identifying patterns of learning content consumption across multiple entities and automatically determining and/or launching an engagement action based on the patterns
Azzeh et al. Software effort estimation based on weighted fuzzy grey relational analysis
Reetz et al. Expert system based fault diagnosis for railway point machines
Malhotra et al. A neuro-fuzzy classifier for website quality prediction
Liu et al. Detecting imprudence of'reliable'sellers in online auction sites
Babaei et al. How fair is machine learning in credit lending?
Basha et al. Predicting Graduate Admissions using Ensemble Machine Learning Techniques: A Comparative Study of Classifiers and Regressors

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant