<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>IDENTIFICATION OF NEWS TEXT CORPORA INFLUENCING THE VOLATILITY OF FINANCIAL INSTRUMENTS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexey Stankus</string-name>
          <email>alexey@stankus.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Saint Petersburg State University</institution>
          ,
          <addr-line>7-9 Universitetskaya emb., Saint Petersburg, 199034</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>5</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>Using neural networks to predict changes in financial markets is a promising task. For more accurate forecasting, it is necessary to determine the tone of the texts of the articles, whether the news carries positive or negative information for the market. Standard approaches to using pretrained neural networks aimed at analyzing user reviews are not successful due to the fact that professional reporters try to present their articles in a neutral way, which leads to incorrect conclusions. In this article, we will talk about the possibilities of training neural networks to analyze the sentiments of articles based on volatility data in the volatility of financial markets.</p>
      </abstract>
      <kwd-group>
        <kwd>Neural networks</kwd>
        <kwd>attention-based</kwd>
        <kwd>transformer</kwd>
        <kwd>BI-LSTM</kwd>
        <kwd>sentiments of articles</kwd>
        <kwd>financial market</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Statement of the problem</title>
      <p>
        Let's take the news collected from Reuters for a certain period and the oil price for the same
period. Using one of the most advanced architectures of the BERT transformer [
        <xref ref-type="bibr" rid="ref1 ref2">1-2</xref>
        ], we get the
following definition of tonalities [tab. 1]:
      </p>
      <p>From the obtained distribution of results, it is obvious that the model is carries most articles to
the "neutral" class. This fact can be expected - news articles rarely contain a emotional component. In
most cases, the authors adhere to a strict style, which is designed to present the dry facts. Standard
models of news sentiment recognition are usually trained on short and emotional messages such as
social networks posts or customers reviews. Nevertheless, it is considered how the labels relate to the
price movement [tab.2]:</p>
      <p>As a result of calculating p-value = 0.07, we can conclude that there is no statistical
significance of the obtained news breakdown. Thus, the use of the transformed model is not justified
it is trained to find the wrong relationships that are necessary to solve the problem posed within the
framework of this work. Overfitting under the given conditions may also not lead to a positive result
due to strong differences in both the training set and the predicted feature. The use of the
abovementioned models requires a complete learning process from scratch, which can be realized only in the
presence of an extremely voluminous and correctly labeled training data array.</p>
      <p>From this, it is necessary to make conclusions about the creating your own data markup with
subsequent training of the neural network.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Selecting news and texts pre-processing</title>
      <p>By the reaction of the course, it is possible to determine the presence of relevant information
that carries a positive or negative value for asset owners. To do so we must proceed the following
steps:
●
●
●
●
●</p>
      <p>
        Relying on volatility as an indicator of market expectations [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ];
Select the news preceding the event;
Pre-processing texts;
Train the neural network;
      </p>
      <p>Checking the result on predictions.</p>
      <p>The first thing to consider is the average volatility that is characteristic of the market and
associated with the opening and closing of exchanges around the world. [fig. 1].</p>
      <p>97152
60206</p>
      <p>496
30604
272</p>
      <p>To identify the moments of the market reaction to the information received, the deviation of
the volatility in the time interval from the value obtained at the last step can be used. After obtaining
the values of the volatility deviations, you can build an approximation of the first and second
derivatives (v′, v′′). Further, as the moments of anomalous market reaction, sharp jumps in the V′′,
accompanied by long-term preservation of the positivity of the V′, are considered. [fig. 2].</p>
      <p>Next, we have to do text pre-processing. As part of the ongoing work, a large number of
regular expressions and NLP packages have been applied to improve the quality of the input data. In
particular, the following operations were performed on the texts of articles:
● replacement of html-mnemonics and special characters;
● censoring swear words;
● correction of obvious typos;
● removal of redundant punctuation marks;
● defining the language of publication and separating different languages from each other;
● addition of description texts with the text of the article, if necessary.</p>
      <p>To speed up and improve the efficiency of training, the corpus of texts is filtered by keywords
presumably relevant to the asset under study. We got 53 000 text news for each class.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Sentiment analysis model</title>
      <p>
        In order to prevent overfitting [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], dropout layers have been added to the used neural network
architecture, which randomly change the values of the previous layer (dropout) or disable some
variables of the embedding layer (spatial-dropout). Neural network has following structure [tab. 3]:
      </p>
      <p>Due to the use of a more complex three-class markup function, it should be noted that in this
case the problem was solved not of a binary, but of a multiclass classification. When setting the
problem of multiclass classification, the “basic” accuracy of the random number generator, which is
the boundary of the meaningfulness of the result, is 1/3, and not 1/2, as in the case of binary
classification, respectively.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Results</title>
      <p>After training, we get the following results for texts assessment:
●
«Russia committed holding round talks week the Belarussian capital Minsk ending violence
eastern Ukraine, senior Kremlin aide said Monday»</p>
      <p>Layer
Embedding</p>
      <p>Dropout
B-LSTM
B-LSTM
Dropout
Dense
Dropout
Dense
Dense</p>
      <p>Parameters
2560000
0
0
0
164352
98816
16512
4128</p>
      <p>65
Sample
Training</p>
      <p>Test
categorical accuracy
0.8657
« Two people died at least 13 injured an explosion a factory belonging to Gulf Oil Corporation
Ltd the southern Indian city Hyderabad, police said Monday »
●
●
«Former world number Maria Sharapova cruised past Kazakhstan’s Zarina Diyas into
semifinals the Shenzhen Open China Thursday»</p>
      <p>In all these examples, the model classification results correspond to the real expected market
reaction - the increase in oil exports by Saudi Arabia is assessed as negative news for the oil price,
progress in resolving world tension in Ukraine is assessed as positive, and irrelevant news is assessed
neutrally. However, such a review of the results cannot serve as a basis for drawing conclusions about
the quality of the model. It is necessary to determine the effectiveness by additional verification.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>[1] BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding</article-title>
          . Available at: https://arxiv.org/abs/
          <year>1810</year>
          .04805
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Vaswani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Shazeer</surname>
          </string-name>
          , Niki Parmar et al.
          <source>Attention Is All You Need</source>
          .
          <year>2017</year>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Atkins</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Niranjan</surname>
          </string-name>
          ,
          <string-name>
            <surname>E.Gerding.</surname>
          </string-name>
          <article-title>Financial news predicts stock market volatility better than close price //</article-title>
          <source>The Journal of Finance and Data Science</source>
          .
          <year>2018</year>
          . Vol.
          <volume>4</volume>
          , pp.
          <fpage>120</fpage>
          -
          <lpage>137</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Pascanu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Mikolov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bengio</surname>
          </string-name>
          .
          <article-title>On the difficulty of training Recurrent Neural Networks</article-title>
          .
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>