<!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>Parallelization of the VAR Algorithm Family to Increase the Efficiency of Forecasting Market Indicators During Social Disaster</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Artem Khovrat</string-name>
          <email>artem.khovrat@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Volodymyr Kobziev</string-name>
          <email>volodymyr.kobziev@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexei Nazarov</string-name>
          <email>oleksii.nazarov1@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergiy Yakovlev</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kharkiv National University of Radio Electronics</institution>
          ,
          <addr-line>14, Nauky, Ave., Kharkiv, 61166</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Lodz University of Technology</institution>
          ,
          <addr-line>90-924 Lodz</addr-line>
          ,
          <country country="PL">Poland</country>
        </aff>
      </contrib-group>
      <fpage>222</fpage>
      <lpage>233</lpage>
      <abstract>
        <p>Social unrest caused by the crisis makes it difficult to forecast the market performance for the company, and, accordingly, the decision-making process. Today's situation creates the basis for food, migration, political, and energy crises. The complexity of the representation of the situation, and the generally chaotic nature of changes necessitates the use of a more comprehensive approach to forecasting market indicators. The dimensionality reduction and parallelism principles are traditional approaches to reduce the impact of data volumes on the execution time of an algorithm. For the current study, it was decided to choose a MapReduce technology to implement a parallelization approach. Based on the results of this study, the main approaches to forecasting economic indicators were defined within the current framework. The chronological non-determinism of the target data was declared, and their co-integration was considered accordingly. The obtained data made it possible to define a family of VAR models as the basis for forecasting these indicators. A set of factors as exogenous variables and related parameters were defined. The accuracy of forecasting the specified algorithm family was checked using the e-commerce market data during recent social disasters. The obtained indicator of parallelization efficiency of these algorithms using the MapReduce technology allows us to state the expediency of a similar parallelism form for vector autoregressive forecasting models in practical application.</p>
      </abstract>
      <kwd-group>
        <kwd>E-commerce</kwd>
        <kwd>forecasting</kwd>
        <kwd>parallelization</kwd>
        <kwd>social disaster</kwd>
        <kwd>VAR</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        by the SARS-Cov-2 coronavirus [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. According to the latest data, the total mortality has decreased by
90% and it’s already possible to state a general decline in morbidity [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], however, the pandemic
managed to cause the world economy losses, which, according to the ILO, amount to more than 3.5
trillion US dollars [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        On February 24, 2022, the situation worsened as a result of the full-scale invasion of the Russian
Federation on the territory of Ukraine. According to various analytical agencies, the war provoked
various types of crisis phenomena at the global level: energy, food, migration, etc. [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ]. It, in turn,
caused social unrest in different parts of the world [
        <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
        ]. This state led to the market situation
transformation and market relations in general. As an example, it can be noted that in 2020, the
demand for online entertainment increased several times [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. In order to generalize the definition of
the specified problems, we will use the concept of social vulnerability – it’s the inability of people,
organizations, or society to resist the influence of a stressful situation [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. A phenomenon that causes
social vulnerability will be called a social disaster. The duration of this is determined separately for
EMAIL:
(A. 1);
(A. 2);
(A. 3);
      </p>
      <p>
        2022 Copyright for this paper by its authors.
each case and without significant reference to the event that caused it. For example, the tragedy of
September 11, according to some scientific sources, still has a social impact on the USA [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>
        During a social disaster, forecasting market activity becomes a complex and atypical task, which
without the use of modern information technologies and/or appropriate education is an almost
insoluble task. This causes the prevalence of risk forecasting related to consumer behaviour and
means of automating these processes. One such tool that is currently gaining popularity is forecasting
indicators using autoregression algorithms [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. They guarantee a relatively accurate forecasting
result, but with large amounts of data available, their performance is quite limited. To solve this
problem, we can use the principles of parallelism, but their classical forms do not guarantee a
significant gain in speed [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. MapReduce technology is used as a basic alternative to these
principles. As part of the current paper, a review of models for forecasting economic indicators based
on autoregression, the possibility of modifying these algorithms, and the means of their parallelization
will be carried out. The purpose is to determine the effectiveness of using MapReduce technology to
parallelize autoregressive models for e-commerce market indicators during social disasters. To
achieve this purpose, the following tasks can be distinguished:
 analyze the subject domain;
 carry out a mathematical representation overview of the selected algorithm family;
 develop a modification of the models to take into account the impact of a social disaster on
the industry, the economy and the audience;
 build an experimental environment that would allow checking the feasibility of applying the
MapReduce technology to modified algorithms;
 сonduct an experiment and analyze the results.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Domain analysis</title>
      <p>
        The concept of social vulnerability is most often considered in terms of risk analysis, which has
three key stages: definition, assessment, and management. In the 20th century, to optimize this
process, decision support systems (DSS) were created [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Nowadays, these systems are actively
implemented in various business environments, where they are divided according to [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] by the
following criteria:
 method of support: knowledge-based, document-based, data-based, communication-based,
and model-based;
 interaction with the user: cooperative, active, passive.
      </p>
      <p>
        The current paper will consider passive data-oriented systems because it was decided to
concentrate on autoregressive models. An example of such systems can be [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]: Hyperproof;
Soterion; Whistic. It is notable that some systems, in addition to the autoregressive approach,
implement the Bayesian approach and/or artificial intelligence methods [
        <xref ref-type="bibr" rid="ref16 ref17">16, 17</xref>
        ]. However, in the
framework of the current work, these approaches are not considered, because, because of the available
studies, their working time is much higher than autoregression models [
        <xref ref-type="bibr" rid="ref18 ref19">18, 19</xref>
        ]. During social
disasters, which can include both military actions and natural catastrophes, the time of
decisionmaking is the critical indicator.
      </p>
      <p>Not all autoregressive models will be considered either. This is explained by the fact that, in most
cases, market indicators, such as the level of demand, prices, and investments, are time series and
should be considered complex. The reason for this can be considered the possibility of classical
paradoxical situations (Giffen’s paradox, Veblen’s paradox, etc.) and impossibility of their reflection
by a single indicator. Therefore, the current study will consider only vector autoregressive models
(abbreviated VAR), in particular:
 vector autoregression of the moving average;
 vector autoregression of the distributed lag;
 vector seasonal autoregression.</p>
      <p>Such a choice can be explained by the general volatility of economic indicators and the
aggravation of this process during social disasters. In addition, it was decided to slightly modify the
input data to take into account qualitative indicators that would describe the state of the disaster.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Mathematical representation</title>
      <p>Carry out a step-by-step review of the selected models for research, their modifications, and the
technology for their parallelization.
3.1.</p>
    </sec>
    <sec id="sec-4">
      <title>Models overview</title>
      <p>Before proceeding to the modification of the basic VAR family algorithms, we will consider their
mathematical represantation:
where
.– K-dimensional time series;
– matrices K×K,
dimensional vector of white noise with zero mean and nondegenerate covariance matrix
. and – nondegenerate matrices.</p>
      <p>It follows from the given formula (1) that the classic models predicts only static variables. To
exogenous indicators consider, it was decided to use a modification of error correction (EC). Such an
adjustment is necessary if several endogenous variables have a common stochastic trend, which is
typical for indicators of the market activity.</p>
      <p>The general formula for the modified EC-VAR family of algorithms will have the following form:
(2)
,
,
(1)</p>
      <p>–
K;
,
.
where
,
,</p>
      <p>In the selected case, an important place is occupied by exogenous variables, in fact, they will serve
as the basis for taking into account the social disasters in the quantitatively presented.
3.2.</p>
    </sec>
    <sec id="sec-5">
      <title>Models modification</title>
      <p>In general, it’s accepted that a social disaster affects all market subjects, from individuals to the
state. The business management theory indicates that the nature of the impact on individuals is
reflected in the behavior of the target audience, changes in the company’s work and market regulation
e (which is a representation of the state) are combined into the microeconomic profile of the market
situation. Given the fact that for each indicator it is necessary to consider the disaster itself, we will
begin the modification by analyzing the possibilities of converting its description into a quantitative
form. For qualitative indicators to reflect an objective view of the disaster, it was decided to conduct
an expert assessment among 5 risk managers of different companies in Kharkiv and Novomoskovsk,
5 sociologists from Kharkiv and Dnipro. The following four indicators were mentioned the largest
number of times:
 a general textual description of a social disaster;
 the news is related to a catalyzing phenomenon;
 assessment of the company’s employees regarding readiness for unforeseen circumstances;
 the duration of the disaster (from the moment the catalyst begins to act).</p>
      <p>
        The last indicator has a quantitative representation, and the subjective assessment of employees
can easily be converted into a quantitative form if a survey is using a scale from 0 to 100, where 0 is
“the company is not prepared for unforeseen circumstances”. and 100 – "the company is fully
prepared for unforeseen circumstances." After the survey, the result will be normalized to 1. For
conversion into quantitative form, we will use the principles of content analysis. In general, the
algorithm should be as follows:
1. remove non-letter expressions from the text, in particular numbers and punctuation marks;
2. divide the cleaned text into sentences and words;
3. apply the stemming operation – shortening the word to its base;
4. to prevent stemming errors, we carry out lemmatization – bringing the word form to the
lemma;
5. unify the created dictionary;
6. remove words with minimal linguistic load, for example, conjunctions;
7. find the TF-IDF frequency response [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ];
8. find the polarity indicator of each word using the available word corpora;
9. multiply TF-IDF to polarity to find the frequency-polarity indicator (hereinafter referred to as
the FPI);
10. find the amount of the received FPI for each received text (or its part);
11. normalize the value of the sum in the range from 0 to 1, where 0 is the absence of a disaster,
and 1 is a significant negative impact.
      </p>
      <p>We can formally describe the social disaster as follows:
,
where SDS – content analysis result for disaster description provided by the company; SDO –
content analysis result for disaster description provided by news; t – disaster duration; R – readiness
for unforeseen circumstances.</p>
      <p>Now let’s move on to the main indicators of the profile of the market situation and the target
audience. For the target audience, by analogy with the social disaster indicator, it was decided to
conduct an expert assessment, during which it was found that the following factors are the most
important for this indicator:
 general text description of the target audience;
 audience size;
 volume of income divided by total income.</p>
      <p>
        The last two indicators are quantitative, so it is enough to normalize them from 0 to 1. To convert
the text description, we will use the principle of cluster analysis. The first 5 steps of the algorithm are
similar to those noted in the description of the disaster. The final steps are slightly modified:
6. summarize the audience’s description using a set of features proposed by Robert Plutchik:
expectation, anger, disgust, sadness, fear, surprise, hope, and trust [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ];
      </p>
      <p>7. form the emotional colour of each word from the audience description, giving the value of
each feature in the range from 0 to 100;
8. summarize the obtained values, taking into account the sign of the emotion;
9. normalize the values in the range from 0 to 1;
10. consider the general market paradoxical situations mentioned earlier (Veblen, Giffen, snob
effects) by introducing the appropriate indicator, which is calculated as the module of the difference
between the normalized number indicator and the income share indicator.</p>
      <p>We can formally describe the social disaster as follows:
(3)
where – coefficient of market paradoxes normalization, TAD – content analysis result for target
audience description provided by the company, CD – normalized number indicator, RD – income
share indicator.</p>
      <p>It is worth noting that formula (4) does not consider the impact of a social disaster as such, so we
introduce the following formula for the problem under consideration:
,</p>
      <p>Each modified algorithms of vector autoregression treat external variables as numerical series, not
scalars, so the indicator obtained as a result of calculation according to formula (5) must be
vectorized. To achieve this, we’ll use the obtained result as the centre of the normal distribution,
which will serve as an exogenous variable for the selected algorithms of the modified EC-VAR
family. Let’s move on to the next indicator that needs to consider – the profile of the market situation.
According to microeconomic theory, it can include a large number of different indicators. After
surveying experts, the following characteristics were identified, which will be taken into account in
the current paper:
 volumes of innovative activity;
 financial stability;
(5)
,
(4)
 market monopolization;
 the state of the target industry and the world economy;
 social disaster.</p>
      <p>To measure market monopolization, we will use the Herfindahl-Hirschman Index:
where N – number of companies in the selected market, s – market share owned by each company.</p>
      <p>Considering the fact that the e-commerce market has the characteristics of monopolistic
competition with some regional manifestations of oligopoly, to find the approximate value of the
index, it is enough to know the value of the market shares for the 5 largest companies on it.
Innovative activity expressed by the relevant indicator is as follows:
,</p>
      <p>,
where IR – share of income from innovations, MT – total monetary mass of the company.</p>
      <p>
        The resulting social catastrophe is characterized by the previously mentioned SSD indicator. The
financial stability of the company is a classic economic indicator (FSI) that reflects the company’s
ability to meet its obligations in the long- and medium-term perspectives [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. In general, we can
write down the following formalized presentation of the above indicators of the company’s activity:
,
      </p>
      <p>As in the case of the TAOI indicator, a scalar value will be obtained during the calculation
according to the formula (8). To vectorize it, we will use the result as the centre of the normal
distribution. The obtained numerical series does not consider the state of the target industry and the
world economy. To take into account the state of the economy, we will choose several classic
indicators:
 world GDP level;
 prices for energy resources level;
 the S&amp;P 500 index.</p>
      <p>
        The indicated data are already numerical series, so to be able to use them as exogenous variables,
it is enough to normalize them. We will determine the state of the industry based on the portfolio of
shares of the five biggest companies in the e-commerce market. According to [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] the latest data:
 Jingdong Mall (ticker JD);
 Amazon (ticker AMZN);
 Meituan (ticker 3690.HK);
 Alibaba (ticker BABA);
 Pinduoduo (ticker PDD).
      </p>
      <p>As in the previous case, the data are already numerical series, but they need to be normalized for
the algorithms to work correctly. Finally, the following series will be considered as external variables
for the family of modified EC-VAR models:
 target audience characteristics;
 company’s activities on the market characteristics t;
 world economy state;
 industry state.</p>
      <p>Let’s move on to consider the theoretical basis of MapReduce technology, which will be used to
parallelize the selected algorithms.
3.3.</p>
    </sec>
    <sec id="sec-6">
      <title>MapReduce technology</title>
      <p>
        The essence of the approach, which is embedded in MapReduce technology, is to distribute the
total data set to individual nodes. According to [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ] the procedure is performed using mapping
(6)
(7)
(8)
functions, followed by the application of selected algorithms, and a reducer that collects data from all
nodes and unifies them. In general, this technology is implemented in several frameworks, but within
the framework of the current study, it was decided to use MapReduce, which is offered by Hadoop.
Each implementation has its own features, so the architecture of this approach can be depicted as
shown in Figure 1:
      </p>
      <p>As we can see, in this case, in addition to the actual mapping and reduction functions, there are
distribution and combination functions, which are necessary for the response from each node to arrive
in a combined form. The results are sorted before the reduction. Among the advantages of the chosen
approach, it is possible to single out scalability, relative cheapness, ease of use (although the
technology is complicated by the need for configuration settings), and the possibility of monitoring
execution. On the other hand, among the disadvantages, it is worth highlighting the need to create a
large volume of programme code and the stealth of processing. There is also a need for a lengthy
configuration setup.</p>
    </sec>
    <sec id="sec-7">
      <title>4. Experimental environment</title>
      <p>By the experimental environment we mean the following set of characteristics:
 general conditions;
 efficiency function;
 rule for comparing the efficiency of two models;
 errors and uncertainties.</p>
      <p>We will gradually determine each of the specified characteristics of the environment.
4.1.</p>
    </sec>
    <sec id="sec-8">
      <title>General conditions</title>
      <p>Given the peculiarities of the algorithms, it was decided to use the method of a controlled
experiment. This became the basis for choosing a permanent and stable execution environment – a
physical device based on Ubuntu with the following technical characteristics:
 CPU: Intel Core i5-1135G7;
 RAM: 16 Gb;
 SSD: 512 Gb;
 OS: Ubuntu 21.04.</p>
      <p>
        To determine the execution speed, it was decided to use the Python 3 with libraries for natural
language processing (nltk, re, etc.) and working with data (pandas, numpy, etc.). For MapReduce
implementation, as mentioned above, it was decided to use Hadoop technology with 3 cores. Two test
samples provided by Amazon [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] and Walmart [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ] are used to determine accuracy. We will
distribute the data according to the Pareto principle in a ratio of 80/20. Figure 2 present fragments of
data from Walmart dataset:
      </p>
      <p>In Figure 3, the data for Amazon is slightly different from the previous one and contains
information about fluctuations in the stock market, unlike the sales levels for Walmart:</p>
      <p>where – speed of forecasting execution; MSE – mean square error of the forecast; – data
preparation speed.</p>
      <p>All performance metrics will be determined using the time module of the Python 3. We will
calculate the MSE indicator using the following formula:
where N – number of predicted values;
– real value;
– predicted value.
4.3.</p>
    </sec>
    <sec id="sec-9">
      <title>Efficiency comparison rule</title>
      <p>To compare the efficiency of two models, we will use the following formula:
,
,
where
– metric value for model А;
– metric value for model В.</p>
      <p>(9)
(10)
(11)
: model A is more efficient than В;
: model А is less efficient than B;</p>
      <p>The determined parameter C is fuzzy, so we will use the following set of rules to determine the
most efficient model:</p>
      <p>: it’s impossible to determine the most efficient model.
4.4.</p>
    </sec>
    <sec id="sec-10">
      <title>Errors and uncertainties</title>
      <p>Within the framework of the proposed task and the described experiment, we can outline the
following uncertainties and errors:
 during speed testing: human factor and instrumental error;
 during accuracy check: data problem.</p>
      <p>To mitigate the impact of these problems, we set the number of measurements for the performance
of parallelized and sequential modified autoregressive models equal to 10. The number of
measurements for determining accuracy is equal to 5, and for the speed of preparation also 5.</p>
    </sec>
    <sec id="sec-11">
      <title>5. Models implementation</title>
      <p>The first step in implementation is to programming modified autoregressive models. To avoid
errors in the implementation of successive versions, it was decided to use a library of the Python 3 –
statsmodel. To create a MapReduce version, develop two script files for the reducer and the mapper.
To simplify the perception, we show in Figure 4 the pseudocode for the mapping function:</p>
      <p>
        The next stage of implementation is the content analysis algorithm. As already mentioned, for this
it was decided to use the nltk library, which contains a large number of different corpora of words.
The Porter stemmer will be used as a base for stemming, and the WordNet lemmatizer will be used
for lemmatization. The TF-IDF frequency characteristic will be obtained using the sklearn library.
Part of the code that performs content analysis is shown in Figure 5. Data related to stock prices were
chosen to be taken from the Alpha Vantage API. They will be combined into special data frames
using pandas, a library that makes it easy to work with large amounts of data. Their aggregation and
subsequent transformation for transmission as exogenous variables will be carried out at the expense
of the already mentioned sklearn library. It was decided to take information related to the world
economy as a whole in csv format from the database of the World Bank [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ].
      </p>
    </sec>
    <sec id="sec-12">
      <title>6. Experiment results</title>
      <p>We present Figure 6 as a confirmation that the EC-modification of the algorithms by adding the
processing of the previously given data was necessary. Figure 6 (actual value in orange and predicted
value in dashed blue) showing a modified implementation of the moving average vector
autoregression algorithm indicates that the data in the basic algorithm “a” doesn’t consider the
fluctuations, but the improved algorithm “b” provides fairly accurate results. Now we can proceed to
the obtained results. Let's start with the execution time of the forecasting algorithms, information on
10 measurements is given in Table 1 (VARS – seasonal autoregression, VARL – distributed lag
autoregression, VARMA – moving average autoregression).</p>
      <p>Let’s find the average value for each case. We have 0.163 s for the serial VARL, and 0.064 s for
the MapReduce version, we will get a speed gain of ~2.55. For VARS sequential we have 0.179 s,
based on MapReduce technology – 0.062 s, we get a speed gain of ~ 2.89. For serial VARMA we
have ~0.205 s, for the parallelized version – 0.078 s, we get a speed gain of ~ 2.63. So, the average
speed gain is 2.69. The obtained value already allows us to state the expediency of using the
technology for forecasting algorithms of the VAR family. To additional confirmation, the number of
cores was increased to 4, as a result, the average speed gain for the set of models was 3.74. Now let’s
consider to comparing algorithms of the VAR family with each other.</p>
      <p>The first step of this is to check the accuracy of the forecast for the above samples. The obtained
aggregated result of 5 measurements is shown in Table 2 (the result is rounded to a whole value).</p>
      <p>As we can see from the Table, in both cases, the moving average algorithm is the most accurate,
which explains its wide applicability in econometric analysis. The resulting accuracy is based on the
fact that the moving average algorithm uses neighbouring values of the numerical series, this
somewhat smoothest the overall forecast, making it more natural.
b
Figure 6: Forecasting results for Walmart’s dataset</p>
      <p>Regarding the time of data preparation, it is about 291 s for all algorithms. To reduce the impact of
this time, it is necessary to parallelize the quality indicators processing. As part of the experiment, this
was done using MapReduce technology (3 cores were used). As a result, the average preparation time
was 104 s, i.e., the gain in speed is ~2.8. With an increase in the number of cores, the time was 78 s,
that is, the gain in speed increased to ~3.73. In the case of comparing successive algorithms with each
other using formula (11), it was determined that the VARMA algorithm is the most effective when
considering the e-commerce market during social disasters (in both cases, the indicator exceeded 3).
However, the use of parallelization, especially with 4 cores, indicates a significant time advantage of
the parallelized versions, while the prediction accuracy remains unchanged. This allows us to state the
expediency of implementing this version within the framework of the proposed task.</p>
    </sec>
    <sec id="sec-13">
      <title>7. Conclusion</title>
      <p>The purpose of this work was to determine the effectiveness of using MapReduce technology to
parallelize autoregressive models for e-commerce market indicators during social disasters. For this
purpose, an analysis of the subject area was carried out and the main methods of forecasting market
indicators were classified, the reason for choosing vector autoregression models as the basis for
further research was indicated. It was found that the nature of the input data requires modification of
these models, considering the non-determinism of external factors.</p>
      <p>During the theoretical examination of these models, their features were clarified and parallelization
possibilities were outlined.</p>
      <p>The choice of MapReduce, based on Hadoop technology is justified for the next three algorithms:
 vector autoregression of the moving average;
 vector autoregression of the distributed lag;
 vector seasonal autoregression.</p>
      <p>The need for additional modification was determined to take into account exogenous variable
indicators characterizing the microeconomic profile of the market situation and the characteristics of
the target audience during social upheavals. In accordance with the tasks set, an experimental
environment was constructed to test the feasibility of using the MapReduce technology and the
created modification.</p>
      <p>Based on all the above modifications and using the MapReduce technology, a series of
experiments was conducted with the data of the companies Walmart regarding the level of sales, and
Amazon regarding indicators of stock market activity. In the course of the experiments, it was found
that the highest accuracy (in both cases more than 93%) is guaranteed by the use of vector
autoregression of the moving average. At the same time, it was found that the gain in the speed of the
algorithms during parallelization can reach 3.73, and in data preparation – 3.73.</p>
      <p>Therefore, we can state that the use of MapReduce technology in combination with additional
modifications of the basic algorithms, related to taking into account the non-determinism and high
volatility of the indicators of the external environment, is expedient.</p>
    </sec>
    <sec id="sec-14">
      <title>8. Acknowledgements</title>
      <p>The authors would like to thank the Armed Forces of Ukraine for the opportunity to write a valid
work during the full-scale invasion of the Russian Federation on the territory of Ukraine.</p>
    </sec>
    <sec id="sec-15">
      <title>9. References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>N. J.</given-names>
            <surname>Beeching</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. E.</given-names>
            <surname>Fletcher</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Fowler</surname>
          </string-name>
          .
          <article-title>"COVID-19. BMJ best practices." BMJ Publishing Group</article-title>
          . https://bestpractice.bmj.com/topics/ru-ru/3000201 (accessed Oct.
          <volume>18</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>[2] "COVID Data Tracker Weekly Review." Center for Disease Control and Prevention</article-title>
          . https://www.cdc.gov/coronavirus/2019-ncov/covid-data/covidview/index.html (accessed
          <year>Nov</year>
          .
          <volume>11</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>[3] Impact of the COVID-19 pandemic on trade and development</article-title>
          . New York: United Nations Publications,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Tollefson</surname>
          </string-name>
          .
          <article-title>"What the war in Ukraine means for energy, climate and food." Nature</article-title>
          . https://www.nature.com/articles/d41586-022-00969-9 (accessed Oct.
          <volume>30</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Ratha</surname>
          </string-name>
          .
          <article-title>"A war in a pandemic - Implications of the Ukraine crisis and COVID-19 on global governance of migration and remittance flows." World Bank Blogs</article-title>
          . https://blogs.worldbank.org/peoplemove/war
          <article-title>-pandemic-implications-ukraine-crisis-and-covid19-global-governance-migration-and (accessed Oct</article-title>
          .
          <volume>31</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>K. van der Zwet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. I.</given-names>
            <surname>Barros</surname>
          </string-name>
          ,
          <string-name>
            <surname>T. M. van Engers</surname>
            , and
            <given-names>P. M. A.</given-names>
          </string-name>
          <string-name>
            <surname>Sloot</surname>
          </string-name>
          ,
          <article-title>"Emergence of protests during the COVID-19 pandemic: quantitative models to explore the contributions of societal conditions,"</article-title>
          <source>Humanities &amp; Social Sciences Communications</source>
          , vol.
          <volume>9</volume>
          ,
          <issue>2022</issue>
          , Art.
          <source>no. 68. Accessed: Nov. 1</source>
          ,
          <year>2022</year>
          . [Online]. Available: https://doi.org/10.1057/s41599-022-01082-y.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Tardzenyuy Thomas</surname>
          </string-name>
          ,
          <article-title>"Protests during the 2020 COVID-19 lockdown in South Africa,"</article-title>
          <source>MoLab Inventory of Mobilities and Socioeconomic Changes</source>
          ,
          <year>2021</year>
          .
          <source>Accessed: Nov. 1</source>
          ,
          <year>2022</year>
          . [Online]. Available: https://doi.org/10.48509/MoLab.8077.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Clement</surname>
          </string-name>
          .
          <article-title>"COVID-19: Steam user increase</article-title>
          <year>2020</year>
          .
          <article-title>" Statista</article-title>
          . https://www.statista.com/statistics/1108322/covid-steam-users/ (accessed Oct.
          <volume>31</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>C. G.</given-names>
            <surname>Burton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rufat</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Tate</surname>
          </string-name>
          ,
          <article-title>"Social vulnerability: conceptual foundations and geospatial modeling</article-title>
          ," Cambridge University Press, pp.
          <fpage>53</fpage>
          -
          <lpage>81</lpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <article-title>Analyzing the social impacts of disasters</article-title>
          , vol.
          <volume>1</volume>
          ,
          <string-name>
            <surname>Methodology</surname>
          </string-name>
          . Washington D. C.: GFDRR,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>R. B.</given-names>
            <surname>Khodaparasti</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Moslehi</surname>
          </string-name>
          ,
          <article-title>"Application of the varma model for sales forecast: case of urmia gray cement factory,"</article-title>
          <source>Timisoara Journal of Economics and Business</source>
          , vol.
          <volume>7</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>89</fpage>
          -
          <lpage>101</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>A.</given-names>
            <surname>Sinha and P. K. Jana</surname>
          </string-name>
          ,
          <article-title>"MRF: MapReduce based Forecasting Algorithm for Time Series Data,"</article-title>
          <source>Procedia Computer Science</source>
          , vol.
          <volume>132</volume>
          , pp.
          <fpage>92</fpage>
          -
          <lpage>102</lpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Marakas</surname>
          </string-name>
          ,
          <article-title>Decision Support Systems: In the 21st Century</article-title>
          , 2nd ed. Hoboken: Prentice Hall,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>K.</given-names>
            <surname>Srinivas</surname>
          </string-name>
          , Process of Risk Management.
          <source>IntechOpen</source>
          ,
          <year>2019</year>
          .
          <source>Accessed: Nov. 2</source>
          ,
          <year>2022</year>
          . [Online]. Available: https://doi.org/10.5772/intechopen.80804.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <article-title>"Best IT risk management software." G2</article-title>
          . https://www.g2.
          <article-title>com/categories/it-risk-management (accessed Oct</article-title>
          .
          <volume>28</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Zhan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Sha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Jiang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <article-title>"E-commerce Sales Forecast Based on Ensemble Learning,"</article-title>
          <source>IEEE International Symposium on Product Compliance Engineering-Asia</source>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>W.-L.</given-names>
            <surname>Chang</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.-T.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <article-title>"A synthesized model of Markov chain and erg theory for behavior forecast in collaborative prototyping,"</article-title>
          <source>Journal of Information Technology Theory and Application</source>
          , vol.
          <volume>9</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>45</fpage>
          -
          <lpage>63</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>F.</given-names>
            <surname>Engström</surname>
          </string-name>
          and
          <string-name>
            <given-names>D. N.</given-names>
            <surname>Rojas</surname>
          </string-name>
          ,
          <article-title>Prediction of the future trend of e-commerce</article-title>
          . Stockholm: KTH,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>A.</given-names>
            <surname>Faehnle</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Guidolin</surname>
          </string-name>
          ,
          <article-title>"Dynamic Pricing Recognition on E-Commerce Platforms with VAR Processes,"</article-title>
          <source>Forecasting</source>
          , vol.
          <volume>3</volume>
          , pp.
          <fpage>166</fpage>
          -
          <lpage>180</lpage>
          ,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>S.</given-names>
            <surname>Qaiser</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Ali</surname>
          </string-name>
          ,
          <article-title>"Text Mining: Use of TF-IDF to Examine the Relevance of Words to Documents,"</article-title>
          <source>International Journal of Computer Applications</source>
          , vol.
          <volume>181</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>25</fpage>
          -
          <lpage>29</lpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>H.</given-names>
            <surname>Karimova</surname>
          </string-name>
          .
          <article-title>"The Emotion Wheel: What It Is</article-title>
          and How to Use It." PositivePsychology. https://positivepsychology.com/emotion-wheel
          <source>/ (accessed Nov. 1</source>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>W. R.</given-names>
            <surname>Nelson</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Perli</surname>
          </string-name>
          , Selected Indicators of Financial Stability.
          <source>Division of Monetary Affairs</source>
          ,
          <year>2020</year>
          .
          <source>Accessed: Jun. 1</source>
          ,
          <year>2022</year>
          . [Online]. Available: https://www.ecb.europa.eu/pub/conferences/shared/pdf/jcbrconf4/Perli.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <article-title>"Largest e-commerce companies by market cap." Global ranking</article-title>
          . https://companiesmarketcap.com/e-commerce/largest-e
          <article-title>-commerce-companies-by-market-cap/ (accessed Nov</article-title>
          .
          <volume>10</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>J.</given-names>
            <surname>Lin</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Dyer</surname>
          </string-name>
          ,
          <article-title>Data-Intensive Text Processing with MapReduce</article-title>
          . College Park: University of Maryland,
          <year>2010</year>
          . Accessed: Nov.
          <volume>10</volume>
          ,
          <year>2022</year>
          . [Online]. Available: https://lintool.github.io/MapReduceAlgorithms/MapReduce-book-final.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>J. H.</given-names>
            <surname>Roveda</surname>
          </string-name>
          .
          <article-title>"Historical Amazon stock prices." kaggle</article-title>
          . https://www.kaggle.com/datasets/josehenriqueroveda/historical-amazon
          <article-title>-stock-prices (accessed Oct</article-title>
          .
          <volume>19</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ahmedov</surname>
          </string-name>
          .
          <article-title>"Walmart Sales Forecast." kaggle</article-title>
          . https://www.kaggle.com/datasets/aslanahmedov/walmart-sales-forecast (accessed Oct.
          <volume>19</volume>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          <source>[27] "World Bank Open Data." WorldBank Data</source>
          . https://data.worldbank.
          <source>org/ (accessed Nov. 1</source>
          ,
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>