# A sentiment-based modeling and analysis of stock price during the COVID-19:
U- and Swoosh-shaped recovery

Anish Rai<EMAIL_ADDRESS>Department of Physics, National Institute of
Technology Sikkim, Sikkim, India-737139.  Ajit Mahata<EMAIL_ADDRESS>Department of Physics, National Institute of Technology Sikkim, Sikkim,
India-737139.  Md.Nurujjaman<EMAIL_ADDRESS>Department of
Physics, National Institute of Technology Sikkim, Sikkim, India-737139.
Sushovan Majhi<EMAIL_ADDRESS>School of Information, University of
California, Berkeley, USA  Kanish Debnath<EMAIL_ADDRESS>Department of Economics, Flame University, Pune, India-412115

###### Abstract

Recently, a stock price model is proposed by A. Mahata et al. [Physica A, 574,
126008 (2021)] to understand the effect of COVID-19 on stock market. It
describes V- and L-shaped recovery of the stocks and indices, but fails to
simulate the U- and Swoosh-shaped recovery that arises due to sharp crisis and
prolong drop followed by quick recovery (U-shaped) or slow recovery for longer
period (Swoosh-shaped recovery). We propose a modified model by introducing a
new variable $\theta$ that quantifies the sentiment of the investors.
$\theta=+1,~{}0,~{}-1$ for positive, neutral and negative sentiment,
respectively. The model explains the movement of sectoral indices with
positive $\phi$ showing U- and Swoosh-shaped recovery. The simulation using
synthetic fund-flow ($\Psi_{st}$) with different shock lengths ($T_{S}$),
$\phi$, negative sentiment period ($T_{N}$) and portion of fund-flow
($\lambda$) during recovery period show U- and Swoosh-shaped recovery. The
results show that the recovery of the indices with positive $\phi$ becomes
very weak with the extended $T_{S}$ and $T_{N}$. The stocks with higher $\phi$
and $\lambda$ recover quickly. The simulation of the Nifty Bank, Nifty
Financial and Nifty Realty show U-shaped recovery and Nifty IT shows Swoosh-
shaped recovery. The simulation result is consistent with the real stock price
movement. The time-scale ($\tau$) of the shock and recovery of these indices
during the COVID-19 are consistent with the time duration of the change of
negative sentiment from the onset of the COVID-19. This study may help the
investors to plan their investment during different crises.

> During the COVID-19 pandemic, the stock market experienced a massive crash
> in March 2020. All the indices and stocks witnessed a major fall, but their
> recoveries were not the same. Different types of recoveries are seen during
> the pandemic, such as V-, L-, U-, Swoosh-shaped recovery. The dynamics of
> stock market crashes can be investigated with the help of mathematical
> models. An existing model explains the V- and L-shaped recovery of stocks
> and indices during the COVID-19 panidemic. However, the model have
> limitations in explaining the U- and Swoosh-shaped recoveries. We have
> modified the existing model to understand the U- and Swoosh-shaped recovery
> of the stock price. The main parameter is the financial antifragility of the
> company. Fund-flow by the institutional investors and sentiment of the
> investors are the variables used in the model. The model simulation of the
> stock price during COVID like shock has been studied using different shock
> lengths, negative sentiment lengths, financial antifragility and fund-flow.
> The model simulation is also carried out to study the U- and Swoosh-shaped
> recovery of Indian sectoral indices during the COVID-19 pandemic. The time-
> scales of these sectors are calculated using the Hilbert-Huang transform.
> The analysis may help the investors plan their entry and exit positions
> during such crisis.

##  I Introduction

Modeling stock price dynamics is an important objective for the stock market,
and a reasonably accurate prediction can result in a good profit. Ballings
_et al._ (2015) Various models, algorithms and data mining techniques are
often developed and applied to predict the behaviour of stock prices. Ballings
_et al._ (2015); Naimzada and Pireddu (2015a, b); Barak and Modarres (2015);
Ou and Wang (2009); Oh and Kim (2002); Huang, Nakamori, and Wang (2005); Kim
(2003) While models have been developed with parameters like return and
dividend Ding, Granger, and Engle (1993); Marsh and Merton (1987, 1986),
others that adjust for seasonal stock trading are also available to create a
profitable trading strategy. Booth, Gerding, and McGroarty (2014) Due to the
complex nature of the stock markets, modeling the complete dynamics is very
difficult. Mantegna and Stanley (1999); Huang  _et al._ (2003); Nurujjaman and
Mahata (2020); Sornette and Cuypers (2004); Mahata, Bal, and Nurujjaman (2020)
However, modeling the stock market dynamics to study the effect of a crisis
like the COVID-19 may be possible and useful. Charles and Darné (2014)

The COVID-19 pandemic shook the stock market around the globe severely. Ashraf
(2020); Topcu and Gulal (2020); Baker  _et al._ (2020); Zhang, Hu, and Ji
(2020); bbc (2020); Rai  _et al._ (2021) The panic among the investors due to
the pandemic was so severe that the market crashed beyond justification within
few days. Rai  _et al._ (2021); Mahata  _et al._ (2021a); Mazur, Dang, and
Vega (2021) During the COVID-19 crisis, there were many quality stocks and
sectors, which were resilient to the crisis and outperformed the overall
market. Mahata  _et al._ (2021b); Mazur, Dang, and Vega (2021); Asness,
Frazzini, and Pedersen (2019); Bouchaud  _et al._ (2016); Novy-Marx (2013)
These quality stocks recovered very quickly from the crash, i.e., showing
V-shaped recovery. On the other hand, many stressed stocks did not show signs
of speedy recovery. Mahata  _et al._ (2021a, b)

Recently, the stock price dynamics during the COVID-19 pandemic is modeled by
A. Mahata et al. Mahata  _et al._ (2021b) They considered financial anti-
fragility of the company and fund-flow by the foreign and domestic
institutional investors as the main parameter and variable of the model,
respectively. The parameter financial anti-fragility shows the financial
strength of a company to fulfill its short term liabilities. It acts as a
survival indicator of a company during a crisis. Hence, investors look for
such financially antifragile stocks to get higher returns during a crisis.
Mahata  _et al._ (2021b); Asness, Frazzini, and Pedersen (2019); Bouchaud  _et
al._ (2016); Novy-Marx (2013); Castro and Chousa (2006); Lee and Faff (2009);
blo (2020) Institutional investors also play an important role in the price
movement as they are (a) responsible for huge fund inflow/outflow in the
market; (b) they influence the smaller investors significantly. Mahata  _et
al._ (2021b); Cao, Chang, and Wang (2008); Coval and Stafford (2007); Ülkü and
Weber (2014); Kling and Gao (2008); Edelen and Warner (2001); KP (2020);
Edelen and Warner (2001); Edelen (1999); Warther (1995) However, in the
sectors like banking, finance, realty and IT, the stocks and indices even with
positive financial antifragility took longer time to recover during the
COVID-19 pandemic, i.e., they displayed U-shaped and Swoosh-shaped recovery
during the prolonged COVID-19 pandemic. Mazur, Dang, and Vega (2021) The
reason for U-shaped recovery is that after the sharp crash, many factors like
Government strict measures, relaxation in loan payment, closure of
construction sites lead to a prolonged drop and late recovery. The IT sector
showed a Swoosh-shaped recovery as after the sharp crash, the recovery was
slow due to less inflow of funds. The study of the dynamics of these
recoveries are important. Hence, the model proposed by A. Mahata et al. Mahata
_et al._ (2021b) needs to be modified to describe such dynamics.

A study on investors’ expectations following the stock market crash in March
2020 revealed that the investors largely became pessimistic about stock market
returns in the short run (less than 1 year) even when their long run (10
years) expectations of the economy and stock markets remained largely
unaltered. Giglio  _et al._ (2021) A similar study on households’ stock market
outlook observed that individuals who have experienced loss during past stock
market crashes expect slower recovery. Hanspal, Weber, and Wohlfart (2020) In
response to the rapid spread of the COVID-19, strict lockdown measures were
implemented in different countries. These factors lead to negative sentiment
among the investors, that was reflected in the stock prices of various indices
and companies. Ashraf (2020); Alexakis, Eleftheriou, and Patsoulis (2021)
Generally, if the sentiment of the investors remain negative, recovery becomes
slow. However, announcements of certain measures by the Governments helped to
change the sentiment of the investors towards the stock market that lead to
the recovery. Narayan, Phan, and Liu (2021)

In India, on 26th March 2020, the finance minister(FM) announced the Pradhan
Mantri Garib Kalyan Yojana of Rs. 1.7 trillion. may (2020); kpm (2021); Ghosh
(2020) On the following day, the Reserve Bank of India (RBI) reduced the repo
rate by 75 basis points to 4.40 percent, lowered the cash reserve ratio by 100
basis points to 3.00 percent, and announced other measures that together aimed
at injecting liquidity of Rs. 4.74 trillion into the system. On 12th May 2020,
the Prime Minister announced the comprehensive Atmanirbhar package for the
Indian economy that worked out to 10 percent of the Indian GDP, making it
among the largest in the world. pac (2020) The package, after including the
previous announcements by the FM and the RBI, promised for a economic stimulus
of Rs. 20 trillion in multiple tranches. Given the unabated spread of the
COVID-19, additional relief measures of Rs. 2.65 trillion was announced on
14th November 2020. In addition to these relief measures, the decrease in the
COVID cases and easing of the lockdown rules lead to the positive change in
the investors sentiment that resulted in the recovery of the stock price.
Hence, in order to simulate the stock price, the existing model needs to be
modified to include the investor’s sentiment.

The main aim of this paper is to propose an updated model incorporating
investors’ sentiment in the existing model formulated by A. Mahata et al.
Mahata  _et al._ (2021b) Our proposed model simulates the stock price movement
of the sectoral indices that showed U-shaped and Swoosh-shaped recovery during
the COVID-19 pandemic. We have considered the normalized net fund-flow due to
institutional investors, sentiment and financial antifragility as the
variables and parameter in the modified model, respectively. The simulation
have been done for the real normalized fund-flow data ($\Psi_{t}$) and also
for artificially generated fund-flow ($\Psi_{st}$). The simulation results are
consistent with the real stock price movement during the pandemic. We have
also identified the time-scale of shock and recovery of the sectoral indices.
$\Psi_{st}$ is used to analyze the effects of different shock lengths, anti-
fragility, negative sentiment lengths and fund-flow during recovery on the
stock price movement.

The rest of the paper is organized as follows: Sec. II describes the model
studied in this paper. Sec. III represents the technique used for the
estimation of the time-scale. Sec. IV represent the results obtained. Finally,
we have concluded the results in Sec. V.

##  II Model formulation

A modified model for the stock price has been developed for the shock and
recovery period during the COVID-19 pandemic. The Subsec. II.1 states the
existing model and Subsec. II.2 describes the formulation of the modified
model using the sentiment variable.

###  II.1 Existing Model

A stock price model developed by A. Mahata et al. Mahata  _et al._ (2021b) can
explain V-shaped and L-shaped recovery of the stock market during the COVID-19
crisis. $\Psi_{t}$ by the foreign institutional investors and domestic
institutional investors is considered as the main variable of the model. The
basis for consideration of $\Psi_{t}$ as a variable is due to the facts that
institutional investors are (a) responsible for huge fund inflow/outflow in
the market; (b) the influence of institutional investors on the retail
investors are significant. Mahata  _et al._ (2021b); Cao, Chang, and Wang
(2008); Coval and Stafford (2007); Ülkü and Weber (2014); Kling and Gao
(2008); Edelen and Warner (2001); KP (2020); Edelen and Warner (2001); Edelen
(1999); Warther (1995); Barber, Odean, and Zhu (2008) $\Psi_{t}$ is defined as
the difference between the fund inflow and fund outflow by the Foreign
Institutional Investor (FII) and Domestic Institutional Investor (DII). Let
$\Delta D_{t}$ be the net fund-flow (inflow or outflow) due to FII and DII
combined at time t.

$\Psi_{t}=\frac{\Delta D_{t}}{max(abs(\Delta D_{t}))}$ (1)

$\Psi_{t}$ is the normalized net fund-flow that is used for stock price
updation.

An important parameter of the model is the financial antifragility ($\phi$)
which is defined as the ratio of the difference between current assets
($\chi$) and current liabilities ($\zeta$) to operating expenses ($\xi$).
$\phi$ signifies the company’s ability to mitigate the current liabilities
with their current assets. Current assets are those assets that can be
converted in liquidity during the current operating cycle to meet up with the
current liabilities. $\phi$ of $i^{th}$ company is calculated as

$\displaystyle\phi_{i}=\frac{\chi_{i}-\zeta_{i}}{\xi_{i}}.$ (2)

The $\phi$ for a sectoral index can be written as

$\displaystyle\phi=\frac{\sum_{1}^{N}\phi_{i}}{N},$ (3)

where N is number of company in any sectoral index. $\phi$ acts as the control
parameter for the price movement.

Finally, the model is defined as

$\displaystyle P_{t+1}$ $\displaystyle=$ $\displaystyle
P_{t}\\{1+\lambda\Psi_{t}\\},~{}~{}~{}~{}~{}~{}during~{}shock$ (4)
$\displaystyle P_{t+1}$ $\displaystyle=$ $\displaystyle
P_{t}\\{1+\lambda\Psi_{t}\phi\\},~{}~{}~{}~{}~{}otherwise$ (5)

During the shock period, the model simulation is independent of $\phi$ as the
investors try to sell their holding irrespective of the fundamentals of the
company to increase the cash holding. For Indian stocks, the value of $\phi$
is usually in the range $-2<\phi<2.$

$\lambda$ is the coefficient of $\Psi_{t}$ which shows the portion of net
fund-flow towards a particular sector/company by the institutional investors.
$\lambda$ is different for different sectors. Though this model explains the
V- and L-shaped recoveries of stocks, it fails to explain the U- and Swoosh-
shaped recoveries that depends mainly on the sentiment. Sentiment-based
modification is discussed below.

###  II.2 Modification of the existing Model: Sentiment based analysis

There are many stocks with positive anti-fragility in sectors like banking,
finance, realty and IT that did not show V-shaped recovery during the COVID-19
pandemic. They rather remained in L-shaped for a long period. The main reason
is that the sentiment regarding these sectors remained negative or neutral for
a considerable period of time because of grim business outlook and strict
lockdown measures. However, the sentiment turned positive due to various
measures taken by the Government. In India, different measures like decrease
in repo rate and cash reserve ratio by the RBI, economic stimulus packages by
the Indian Government, decrease in the COVID cases and easing of lockdown
measures helped to change the sentiment positively towards the stock market.
The effect of such measures in stock market is observed during the second
financial quarter of 2020. After that, the above sectors rallied for a
prolonged period. Hence, sentiment of the investors is one important factor
that plays an important role in the stock price movement. Guo, Sun, and Qian
(2017); Baker and Wurgler (2006)

The sentiment variable ($\theta$) can be negative sentiment, neutral sentiment
and positive sentiment. When the investors are bearish towards the market or a
particular sector, we assign a negative sentiment in the model. In a similar
way, positive sentiment is assigned when the investors are bullish. A neutral
sentiment describes a situation where the investors have no interest in the
sector/company. Neutral sentiment is an ideal case as there will always be
buying and selling of stocks. Mathematically, $\theta$ is defined as

$\theta=\begin{cases}+1,&\textit{if sentiment is positive}\\\ ~{}0,&\textit{if
sentiment is neutral}\\\ -1,&\textit{if sentiment is negative}\end{cases}$

So, the modified model can be written as

$\displaystyle P_{t+1}$ $\displaystyle=$ $\displaystyle
P_{t}\\{1+\lambda\Psi_{t}\\},~{}~{}~{}~{}~{}~{}during~{}shock$ (6)
$\displaystyle P_{t+1}$ $\displaystyle=$ $\displaystyle
P_{t}\\{1+\lambda\Psi_{t}\phi\theta\\},~{}~{}~{}~{}~{}otherwise$ (7)

where $\Psi_{t}$, $\phi$, $\lambda$ are the net normalized fund-flow by the
institutional investors, financial anti-fragility and coefficient of
$\Psi_{t}$, respectively which is discussed in detail in Subsec II.1. The
value of $\lambda$ is guessed on the basis of the real normalized net fund-
flow due to mutual fund (MF) and foreign portfolio investor (FPI) which is
shown in Fig. 1. For Indian market, the time duration of negative $\theta$ is
from 3 months to 7 months.

In Subsec. II.2.1, we have simulated the stock price movement from Eqn. 6\- 7
using $\Psi_{st}$ to study the dynamics of stock price during COVID like
shocks. Further, in Subsec. II.2.2, we have studied the stock price dynamics
using the $\Psi_{t}$ and $\phi$ of the sectoral indices in Eqn. 6\- 7.

####  II.2.1 COVID-like shock

In order to understand the effect of COVID like crisis on the stock price, we
need to study the model under different shock lengths ($T_{S}$), negative
sentiment lengths ($T_{N}$), financial anti-fragility ($\phi$) and fund-flow
during the recovery period. We have divided the fund-flow distribution into
five segments, i.e., normal, shock, negative sentiment, recovery and post
recovery periods. We have taken the distribution of $\Psi_{st}$ for those
periods as $\mathcal{N}(0,0.28)$, $\mathcal{N}(-0.237,0.56)$,
$\mathcal{N}(0.009,0.41)$, $\mathcal{N}(0.17,0.53)$, and
$\mathcal{N}(0.051,0.43)$, respectively. The distribution is similar to the
distribution of real fund-flow data. The values of $\lambda$ are chosen from
Fig. 1 in ad-hoc basis depending on the portion of fund-flow in various
sectors. In the present study, the values of $\lambda$ during normal, shock,
negative sentiment, recovery and post recovery period are
$\lambda=0.3,~{}0.4,~{}0.2,~{}0.6,~{}0.3$, respectively.

In order to understand the U-shaped and Swoosh-shaped recovery of stocks
during different crisis, we have carried out the simulation considering
different possibilities. Firstly, we have fixed $\phi=0.9$ and period of
negative sentiment, $T_{N}=50$ day (D), and varied $T_{S}=15$ D, 30 D, 45 D,
and 60 D, respectively. Secondly, for fix $T_{S}=25$ D and $T_{N}=130$ D,
$\phi$’s are varied as $\phi=0.6,~{}0.8,~{}1.0$ and $1.2$. Thirdly, we have
varied the negative sentiment periods as $T_{N}=25$ D, 50 D, 75 D, and
$100~{}D$ keeping $\phi=0.9$ and $T_{S}=25$ D. Finally, we have varied the
fund-flow during the recovery period by changing the $\lambda$ value as
$\lambda=0.05,0.15,0.25,0.35$ keeping $\phi$, $T_{S}$ and $T_{N}$ at 0.9, 25 D
and 0 D, respectively. The detailed analyses results are discussed in Subsec.
IV.1.

####  II.2.2 COVID-19 shock

The model simulation of stock price during the COVID-19 has been done
considering $\Psi_{t}$, $\phi$ and $\theta$ for the Indian stock market.
$\theta$ represents the sentiment of the investors. $\Psi_{t}$ is the real net
normalized fund-flow due to the institutional investors. The daily fund-flow
data is available in the Moneycontrol website. mon (2020) $\phi$ of a company
is estimated using Eqn. 2. The current assets, current liabilities and
operating expenses are taken from the financial report of a company that is
available in Bombay Stock Exchange Ltd. bse (2020)

The coefficient $\lambda$ is estimated from the fund-flow to a particular
sector due to the DIIs and Foreign portfolio investors (FPIs). In this study,
the sectoral fund-flow data due to Mutual fund investor (MFI) is taken as DII
data. Fig. 1(a) represents the MFI normalized monthly fund-flow in Realty
(Green), Information Technology (Black), Finance (Red) and Bank (Blue). These
sectoral fund-flow data are obtained from Securities and Exchange Board of
India (SEBI). seb (2020) Fig. 1(b) represents the FPI normalized fortnightly
fund-flow in Realty (Green), Information Technology (Black), Finance (Red) and
Bank (Blue). The data are taken from National Securities Depository Ltd.
(NSDL), India. nsd (2020) The plots clearly show that the fund-flow decreased
drastically during the onset of the COVID-19 pandemic. It shows that after the
crash, the infusion of funds was not rapid in the above sectors. This
indicates that the investors are cautious to invest in these sectors. Further,
the plots show that the fund-flow in the IT sector increased gradually
compared to the other sectors. The inflow of funds may be due to the change in
sentiment from bearish to bullish as compared to other sectors. The sectors
like Bank, Finance and Realty took longer time to recover due to less inflow
of funds. The main reason of less fund-flow in these sectors is negative
sentiment. Considering the proportionality of fund-flow in various sectors, we
have chosen the value of $\lambda$ as
$\lambda=0.4,~{}0.9,~{}0.05,~{}0.4,~{}0.3$ for the Nifty Bank,
$\lambda=0.4,~{}0.8,~{}0.05,~{}0.5,~{}0.4$ for the Nifty Financial and
$\lambda=0.5,~{}0.9,~{}0.05,~{}0.4,~{}0.5$ for the Nifty Realty during pre-
covid, shock, negative sentiment, recovery and post recovery period,
respectively. As there was no negative sentiment towards the Nifty IT, we have
chosen $\lambda=0.5,~{}0.6,~{}0.2,~{}0.8$ for pre-covid, shock, recovery and
post recovery period, respectively. The results of the analysis is given in
Subsec. IV.2.

The negative sentiment in banking, finance, realty sectors during the COVID-19
pandemic can be confirmed by estimating the time scales of shock and recovery
of these sectors. The time scale of shock and recovery of the IT sector is
also calculated to confirm that it did not have a negative sentiment, but its
recovery was not swift. Sec. III describes the technique used in the
calculation of the time-scale of the above sectoral indices. The results of
the time-scale analysis is given in Subsec. IV.3.

Figure 1: Plot (a) represents the monthly data of the normalized fund-flow due
to mutual fund in the Bank, Finance, Realty and Information Technology (IT)
sectors. Plot (b) represents the fortnightly data of the normalized fund-flow
due to FPI in the Bank, Finance, Realty and Information Technology (IT)
sectors.

##  III Techniques for time-scale analysis

In order to identify and analyze the different relevant time-scales ($\tau$)
that our data-set inherits, we employ the Hilbert-Huang transform (HHT). Huang
_et al._ (1998) HHT consists of two parts; (a) Empirical mode decomposition
(EMD) and (b) Hilbert spectrum. For a time-series that is either stationary or
linear, its intrinsic time-scale can easily be computed. In the face of non-
stationary and nonlinear behavior presented by the data, such an inference
becomes non-trivial. It is evident that our stock-market data is far from
being adherent to the assumptions of linearity and weak-stationarity; see
Huang  _et al._ (2003, 1998) for the assumptions. Empirical mode decomposition
is one of the handful of successful data analysis tools available for such
time-series data. In this subsection, we give a very brief overview of how the
method has been designed to work, along with a statistical treatment to
discern which intrinsic time-scales are particularly relevant and
statistically significant.

###  III.1  EMPIRICAL MODE DECOMPOSITION (EMD)

As discussed in Huang  _et al._ (1998), the EMD method uses the _sifting
process_ to decompose an empirical time-series $X_{t}$ into simple oscillatory
modes, each of them is called an _intrinsic mode function_ (IMF).

More specifically, one can write

$X_{t}=\sum_{n=1}^{k}C_{n}(t)+r(t),$

where $C_{n}(t)$ is the $n$-th IMF and $r(t)$ is the residue which is usually
a monotone function capturing the average trend of the data. Each IMF
satisfies to following properties:

  1. 1.

In the entire data-set, the number of extrema (maxima and minima) and zero
crossings should be equal or differ by one, and

  2. 2.

At any point, the mean value of the envelope defined by the local maxima and
the envelope defined by the local minima should be zero.

For more details on the sifting process and the mathematical properties of
IMFs, the reader is encouraged to consult. Huang  _et al._ (1998)

Despite the analogy with simple oscillations, an IMF can have time-varying
amplitude and frequency. The instantaneous frequency of any IMF, $C_{n}$, can
be computed using its Hilbert transform:

$D_{n}(t)=\frac{1}{\pi}PV\left(\int_{-\infty}^{+\infty}\frac{C_{n}(s)}{t-s}ds\right),$

where $PV$ denotes the Cauchy principal value of the integral. By the nature
of Hilbert transform, we can have an analytic signal,

$Z_{n}(t)=C_{n}(t)+iD_{n}(t)=a_{n}(t)e^{i\theta_{n}(t)},$

where

$a_{n}(t)=\sqrt{C_{n}^{2}(t)+D_{n}^{2}(t)}\mbox{ and
}\tan{\theta(t)}=\frac{D_{n}(t)}{C_{n}(t)}.$

The instantaneous frequency of the IMF is then calculated by:
$\omega(t)=\frac{d\theta(t)}{dt}$. To each IMF, we can also associate its
time-scale $\tau$ by averaging $\frac{1}{\omega}$ over the entire data length.
The time-scale of IMFs are particularly important to identify relevant events,
such as shock, recovery, etc., and their persistence. It is worth noting that
the sifting process picks out the IMFs in the increasing order of their time-
scale.

###  III.2  STATISTICAL SIGNIFICANCE TEST (SST)

Our analysis also entails a statistical treatment of the data-set, assuming
that our data might be erroneous. As with any physical signal, the true stock-
price data is also inevitably mixed with different types of noise. The non-
linear and non-stationary nature of the data makes it difficult to filter the
noise from the true signal. However, we can assign statistical significance to
the computed IMFs to decide whether they are just white noise, or they really
carry some information/trend. Wu and Huang (2004, 2005) To build context for
comparison, we follow Wu and Huang (2004) to briefly discuss the probability
distribution of the IMFs and their energy density, when computed from white
noise.

The energy density $E_{n}$ of the $n$-th IMF, $C_{n}$, is defined by

$E_{n}=\frac{1}{N}\sum_{j=1}^{N}C_{n}^{2}(j),$

where $N$ denotes the number of data points. We also define the notion of mean
period $T_{n}$ of $C_{n}$ to be the number of local maxima and diving it by
$T$, the total length. As empirically observed in Wu and Huang (2004), the
IMFs (except for $n=1$) from a normalized Gaussian white noise data-set have
the identical spectral shape in terms of the $\ln{T}$-axis. The observation
leads to the the following relation for the $n$-th IMF ($n\neq 1$) of a
Gaussian white noise series:

$\ln{\overline{E}_{n}}+\ln{\overline{T}_{n}}=0,$ (8)

where

$\overline{T}_{n}=\frac{\int S_{\ln{T},n}d[\ln{T}]}{\int
S_{\ln{T},n}d[\ln{T}]/T}$

is the spectrum-weighted mean period and $\overline{E}_{n}$ is the mean energy
density. For very large $N$, the $E_{n}$ and $T_{n}$ are good estimators of
$\overline{E}_{n}$ and $\overline{T}_{n}$, respectively.

Using the equation 8, the probability distribution of the energy density of
the IMFs of a Gaussian white noise data-set is also established. The the
distribution of $y=\ln{E_{n}}$ has been shown to approximately follow
$\mathcal{N}(-x,\frac{2}{N}e^{x})$, where $x=\ln{\overline{T}_{n}}$. As a
consequence, one can derive the energy spread lines at different level of
significance using the following formula:

$y=-x\pm k\sqrt{\frac{2}{N}}e^{\frac{x}{2}},$

where $k=2.326$ a for $99\%$ confidence interval as an example. The
$(T_{n},E_{n})$ pair for the $n$-th IMF $C_{n}$ that contains information is
expected to lie outside the spread lines at $99\%$ confidence level. Wu and
Huang (2004)

##  IV Results and discussion

We have presented the simulation result of COVID-like shock using $\Psi_{st}$
in Subsec. IV.1. In Subsec. IV.2, we analyze the simulated stock price
obtained using $\Psi_{t}$ during the COVID-19 pandemic for the (1) Nifty Bank,
(2) Nifty Financial, (3) Nifty Realty and (4) Nifty IT. The result of time-
scale analysis of these indices is presented in Subsec. IV.3. The daily stock
price data are downloaded for the period of $1^{st}$ July 2019 to $31^{st}$
May 2021 from NSE website. nse (2020)

###  IV.1 Simulation of COVID-like shock

Figure 2: Plot (a) shows the U-shaped recovery using synthetic data for fixed
$T_{S}=25~{}D$ and $\phi=0.6,~{}0.8,~{}1.0$ and 1.2. Plot (b) represents the
Swoosh-shaped recovery for fixed $\phi=0.9$, $T_{S}=25~{}D$ and
$\lambda=0.05,0.15,0.25,0.35$ during the recovery period. $D$ represents day
and $\phi$ represents the financial antifragility. For the simulation, initial
condition is taken as 0.5

Fig. 2(a) represents the plot of U-shaped recovery of stock price for
different $\phi$ using $\Psi_{st}$ for a fix $T_{S}$=25 D and $T_{N}$=130 D.
The plots show the simulated stock price for $\phi=0.6,0.8,1.0,1.2$ in red,
green, blue and black color, respectively. During the negative sentiment
period, they did not show any signs of recovery even though $\phi>0$. When the
sentiment becomes positive, the stocks with positive $\phi$ starts recovering.
The figure shows that the stocks with the highest $\phi$ recovers rapidly and
outperforms its peer. The rate of recovery decreases with decrease in the
value of $\phi$. These analyses show that the recovery rate directly depends
on the $\phi$ when the sentiment is positive.

In order to understand the Swoosh-shaped recovery, we have considered
$T_{N}=0~{}D$, $T_{S}=25~{}D$ and $\phi=0.9$. Fig. 2(b) represents the Swoosh-
shaped recovery for different portion of fund allocated ($\lambda$) during the
recovery period. The plots in red, green, blue and black represent the stock
price for $\lambda$ as 0.05, 0.15, 0.25 and 0.35 during the recovery period,
respectively. The figure shows that when there is no negative sentiment, price
starts recovering after the shock period is over. The recovery depends only on
the fund-flow by the investors. Fig. 2(b) shows that the stock with highest
$\lambda$, i.e., 0.35 recovers rapidly. The recovery of stocks with
$\lambda=0.05,0.15$ is slow. The rate of recovery is directly proportional to
the fund-flow. Hence, the recovery not only depends on the sentiment but is
also dependent on the portion of fund allocated.

Fig. 3(a) represents the U-shaped recovery for different $T_{S}$ with
$\phi=0.9$ and $T_{N}=50~{}D$. The plots show the simulated stock price for
$T_{S}=15~{}D,30~{}D,45~{}D,60~{}D$ in red, green, blue and black,
respectively. The figure shows that the stocks with shortest shock length,
i.e., $T_{S}=~{}15~{}D$ recovers quickly to its initial level after the
sentiment turns positive. An extended $T_{S}$ will also affect the recovery
period. The stock with the least $T_{S}$ will have maximum recovery period.
The recovery period will decrease as the $T_{S}$ increases. This is clearly
seen in Fig. 3(a) for stocks with $T_{S}=45~{}D,60~{}D.$ Hence, the recovery
of positive $\phi$ stocks also gets affected with the increase in $T_{S}.$

Fig. 3(b) represents the U-shaped recovery for different $T_{N}$ with
$\phi=0.9$ and $T_{S}=25~{}D$. The plots show the simulated stock price for
$T_{N}=25~{}D,50~{}D,75~{}D,100~{}D$ in red, green, blue and black,
respectively. The figure shows that for a fix $\phi$, the recovery of stocks
depend on the $T_{N}$. Fig. 3(b) shows that the stocks with $T_{N}=25~{}D$
shows faster recovery than the stocks with $T_{N}=50~{}D,75~{}D,100~{}D$. The
recovery starts only after the sentiment becomes positive. A long $T_{N}$
affects the recovery period which can be seen in Fig. 3(b). The recovery
period decreases with an increase in $T_{N}$. It clearly shows that the
sentiment of the investors is very important for the stocks to recover. Until
the sentiment becomes positive, no fundamentally strong company can recover
and performs well.

###  IV.2 Simulation of the COVID-19 shock

Figure 3: Plot (a) represents the U-shaped recovery using the synthetic data
for fixed $\phi=0.9$ and $T_{S}=15~{}D,~{}30~{}D,~{}45~{}D$ and $60~{}D$. Plot
(b) represents the U-shaped recovery using synthetic fund-flow data for fixed
$\phi=0.9$ and $T_{S}=25~{}D$ with $T_{N}=25~{}D,~{}50~{}D,~{}75~{}D$ and
$100~{}D$. For the simulation, initial condition is taken as 0.5. $D$ and
$\phi$ represent day and financial antifragility.

Figs. 4(a) and 4(b) represent the model simulated stock price ($--$ line)
using $\Psi_{t}$ and original stock price (solid line) of the Nifty Bank and
Nifty Financial, respectively during the COVID-19 pandemic. The simulation
results show that the stock price crash started from the $1^{st}$ week of
March 2020 and fell for around 20-25 D till $1^{st}$ week of April 2020. After
a severe crash, they did not show the signs of recovery for a considerable
period as the investors had a very bearish/negative sentiment towards these
sectors. Hence, these stocks could not recover though they were financially
anti-fragile. In order the give a boost to reviving the economy, the Indian
government announced a COVID relief package of Rs. 20 trillion on May 12, 2020
(may, 2020) This amount was to be invested in different sectors in different
tranches including a special liquidity facility for Mutual Funds for Rs.
50,000 crore. The stock market’s sentiment turned bullish, however, this
sentiment did not last for long in the banking and financial sectors. Though,
a slight recovery during the month of May is seen in these sectors due to the
change of sentiment of the investors which is captured in both Original and
Simulated stock price as shown in Fig. 4(a) and 4(b). From the $4^{th}$ week
of September 2020, strong recoveries in these sectors were seen due to the
positive sentiment of the investors. During this period, the fund inflow
towards these sectors was increased significantly as shown in Fig. 1. The
inflow of funds may also be due to the expectation of the investors that the
government might announce some stimulus package for the recovery of economy.
The government’s announcement of a stimulus package of Rs. 2.65 lakh crore
during the $2^{nd}$ week of November 2020 (kpm, 2021) and the decrease in the
number of COVID cases made the investors even more bullish. As a result, there
was regular inflow of funds which lead to the recovery of these sectors. The
model simulation shows a U-shaped recovery which is consistent with the
original stock price movement of the Nifty Bank and Nifty Financial. It may be
due to the negative sentiment of the investors that led to these financially
strong sectors for U-shaped recovery.

Figure 4: Plot (a) represents the original stock price movement of the Nifty Bank ($-OD$) and its corresponding model simulated stock price movement ($--SD$) with $\phi=1.04$ and $T_{S}=21~{}D$. Plot (b) represents the original stock price movement of Nifty Financials ($-OD$) and its corresponding model simulated stock price movement ($--SD$) with $\phi=0.80$ and $T_{S}=21~{}D$ Table 1:  The table shows the correlation coefficient ($\nu$) and the p-value between the Original data (OD) and the simulated data (SD). | Nifty Bank | Nifty Financial | Nifty Realty | Nifty IT
---|---|---|---|---
P-val | $9.86\times 10^{-120}$ | $1.41\times 10^{-105}$ | $1.81\times 10^{-76}$ | $1.44\times 10^{-136}$
$\nu$ | 0.930 | 0.911 | 0.848 | 0.948
Figure 5: Plot (a) shows the original stock price movement of the Nifty
IT($-OD$) and its corresponding model simulated stock price movement ($--SD$)
with $\phi=0.45$ and $T_{S}=21~{}D$. Similarly, plot (b) shows the original
stock price movement of Nifty Realty ($-OD$) and its corresponding model
simulated stock price movement ($--SD$) with $\phi=0.71$ and $T_{S}=21~{}D$.

Figs. 5(a) and 5(b) represent the original stock price (solid line) and
simulated price ($--$line) for the Nifty IT and Nifty Realty, respectively.
Fig. 5(a) shows that after the shock period, the IT sector recovers slowly
showing Swoosh-shaped recovery. Though there was no negative sentiment towards
IT sectors, the fund-flow in this sector was less compared to the Pharma and
FMCG sectors. Mahata  _et al._ (2021b) As a result, we have seen slow recovery
in the IT sector. Fig. 5(a) shows that there is some deviation between
simulated and original stock price during the months of August-September 2020.
During this period, $\psi_{t}$ was negative though the fund-flow towards the
IT sector was positive [Fig. 1]. Simulation using $\Psi_{t}$ may have created
such deviation. Similar to the Nifty Bank and Nifty Financial, the Nifty
Realty also shows U-shaped recovery as seen in Fig. 5(b). Though the stocks
with U-shaped showed some initial recovery during the month of May 2020 due to
the announcement of COVID relief package, the sentiment of investors did not
last long. Hence, their recovery did not last long as seen in Fig. 5(b). A
steady recovery was seen from the month of November 2020 due to the stimulus
package announcement by the Indian government and decrease in the COVID cases
in India. These reasons lead to the change of the sentiment which resulted in
the steady recovery of stock price.

We have also calculated the correlation coefficient ($\nu$) between original
stock price and the simulated stock price which is shown in Table 1. $\nu$
values show that there is a high correlation between the real data and our
model simulated data for all the four sectors. The p-value is also calculated
for the same which is within a 95% confidence level, i.e., less than 0.05.

Table 2: Measure of events correlation coefficient ($\nu$) between original data (OD) and its IMFs. Significance test of the correlation coefficient of all the IMFs with the OD have been performed. $IMF_{6}$ shows the maximum correlation with the OD for Nifty Bank, Nifty Financial and Nifty Realty, whereas, in case of Nifty IT $IMF_{5}$ gives maximum correlation. The p-value of the $IMFs$ are also calculated for all the four indices. $\tau$ represents the time-scale of the shock and recovery in days (D) IMF | NIFTY BANK | NIFTY FINANCIAL | NIFTY REALTY | NIFTY IT
---|---|---|---|---
| $\tau$ | P-val | $\nu~{}~{}~{}$ | $\tau$ | P-val | $\nu~{}~{}~{}$ | $\tau$ | P-val | $\nu~{}~{}~{}$ | $\tau$ | P-val | $\nu~{}~{}~{}$
IMF1 | 4 | 0.095 | 0.102 | 4 | 0.189 | 0.079 | 4 | 0.503 | 0.040 | 4 | 0.462 | 0.057
IMF2 | 10 | $1.71\times 10^{-07}$ | 0.311 | 9 | 0.253 | 0.0696 | 6 | 0.712 | 0.023 | 8 | 0.525 | 0.0488
IMF3 | 20 | 0.011 | 0.153 | 18 | 0.159 | 0.086 | 14 | 0.741 | 0.020 | 20 | 0.990 | -0.001
IMF4 | 48 | 0.020 | 0.141 | 43 | $3.45\times 10^{-04}$ | 0.215 | 32 | 0.086 | 0.104 | 46 | 0.041 | 0.156
IMF5 | 94 | 0.012 | 0.152 | 121 | 0.003 | 0.177 | 80 | 0.166 | 0.084 | 142 | $3.60\times 10^{-40}$ | 0.804
IMF6 | 245 | $1.01\times 10^{-106}$ | 0.912 | 245 | $9.64\times 10^{-112}$ | 0.919 | 241 | $5.43\times 10^{-67}$ | 0.819 |  |  |
Figure 6: Plot represents the original data (OD) of the Nifty Bank and its
$IMF_{1}$-$IMF_{6}$. Residue represents the overall trend of the original
data. Figure 7: Plot represents the significance test of the IMFs of the Nifty
Bank, Nifty Financials, Nifty Realty and Nifty IT sectoral indices with 99%
significance level. Figure 8: Plot (a), (b), (c) and (d) represent the
original data (Solid line) and its dominant IMF ($--$ line) of the Nifty IT,
Nifty Bank, Nifty Financials and Nifty Realty, respectively.

###  IV.3 Time-scale Analysis

HHT technique is applied to calculate the time-scale ($\tau$) of shock and
recovery of sectoral indices during the COVID-19 pandemic. Fig. 6 represents
the original data (OD) of the Nifty Bank, its six IMFs and residue obtained
from the EMD technique. The residue represents the overall trend of the OD. A
statistical significance test (SST) of the decomposed IMFs of all the indices
are carried out and are represented in Fig. 7. The plot shows the SST at 99%
significance level. IMFs which lie within the significance level may contain
noise. In case of Nifty Bank and Nifty Financial all the IMFs contain
information except IMF4 and IMF5, i.e., IMF4 and IMF5 are inside the
significance level. For Nifty IT, IMF4 lies within the significance level and
for Nifty Realty, IMF5 is within the confidence level.

We have calculated the $\tau$, i.e., time-scale from shock till recovery, of
U-shaped and Swoosh-shaped sectoral indices during the COVID-19 by identifying
the dominant IMF. For this, we have calculated the correlation coefficient
($\nu$) and p-value between the original stock price and all the IMFs. Table 2
contains the $\tau$, $\nu$ and p-value of all the IMFs. Considering this, and
the result of the SST we have identified the dominant IMF. Figs. 8(a)- 8(d)
represent the original data (solid line) and their dominant IMF ($--$ line) of
Nifty IT, Nifty Bank, Nifty Financial and Nifty Realty, respectively. In case
of the Nifty Bank, Nifty Financial and Nifty Realty, IMF6 is the dominant IMF
and for the Nifty IT, IMF5 is dominant. The estimated $\tau$ for Nifty IT,
Nifty Bank, Nifty Financial and Nifty Realty are 142 D, 244 D, 244 D and 241
D, respectively. The obtained $\tau$’s are consistent with the real time taken
by the indices to recover during the COVID-19 pandemic.

##  V conclusion

In this paper, we have modified an existing model of stock price dynamics to
explain the U-shaped and Swoosh-shaped recovery during the COVID-19 pandemic.
In our simulation, we have considered net fund-flow by the institutional
investors ($\Psi_{t}$) as the main variable, and financially anti-fragility
($\phi$) and sentiment of the investors ($\theta$) as the main parameters. In
our simulation, we have considered that stock price crash is totally governed
by $\Psi_{t}$. Whereas, $\theta$ and $\phi$ are important parameters during
the recovery of stock price. The model simulates the stock price considering
different $T_{S}$, $T_{N}$, $\phi$ and $\lambda$ during the recovery period.
The model simulated result and the real stock price are also consistent during
the COVID-19 pandemic. We have also identified the $\tau$ from the original
data using the HHT technique.

We have obtained U-shaped recovery of stocks for $\phi=0.6,0.8,1.0,1.2$ using
the synthetic fund-flow data ($\Psi_{st}$) with $T_{N}=130~{}D$ and
$T_{S}=25~{}D$. After the sentiment of the investor changes to positive, the
stock with a higher $\phi$ outperforms the others. We have also obtained
U-shaped recovery of stocks with $\phi>0$ for different $T_{S}$. When
$T_{S}=15~{}D$ and $30~{}D$, the stock price recovers to its pre-shock value
after the $T_{N}$ is over. However, with an extended $T_{S}$ the recovery of
positive $\phi$ stocks also becomes difficult. The recovery of stock under
different $T_{N}$ is also studied. We have obtained U-shaped recovery for
different $T_{N}$ with $T_{S}=25~{}D$ and $\phi=0.9$. The stock price recovers
for $T_{N}=25~{}D$ and $50~{}D$ showing U-shaped recovery. When the $T_{N}$ is
extended beyond 50 D the recovery of positive $\phi$ stocks also becomes
difficult. Lastly, we have obtained Swoosh-shaped recovery of stocks for
different $\lambda$ values during the recovery period with $T_{N}=0~{}D$,
$T_{S}=25~{}D$ and $\phi=0.9$. When $\lambda=0.25~{}\&~{}0.35$ the stock price
recovers to its pre-COVID price showing Swoosh-shaped recovery. However, for
$\lambda=0.05~{}\&~{}0.15$ the recovery is very slow. With the decrease in
$\lambda$ value during recovery, the rate of recovery also decreases.

We have obtained U-shaped and Swoosh-shaped recovery of stock price from the
model simulation using the real normalized net fund-flow data ($\Psi_{t}$). We
have calculated the $\phi$ for Bank, Financial, Realty and IT sectoral
indices. The Nifty Realty, Nifty Bank, Nifty Financial show U-shaped recovery
from our simulation result and Nifty IT shows a Swoosh-shaped recovery. We
observe that the model simulation results are consistent with the real stock
price movement. Finally, we have estimated the $\tau$ for the above indices
and they are consistent with the real time taken by these indices to recover
during the COVID-19 pandemic. The identification of U- and Swoosh-shaped
stocks will help the investors plan their entry and exit positions during a
crisis.

## Acknowledgment

We would like to thank Salam Rabindrajit Luwang, Sandeep Parajuli and Om
Prakash for their valuable comments during the preparation of the manuscript.
NIT Sikkim is appreciated for allocating doctoral research fellowships to A.R.
and A.M.

## Data availability

The data used in this study are openly available in moneycontrol mon (2020),
NSDL nsd (2020), SEBI seb (2020) and NSE India nse (2020).

## References

  * Ballings  _et al._ (2015) M. Ballings, D. Van den Poel, N. Hespeels, and R. Gryp, “Evaluating multiple classifiers for stock price direction prediction,” Expert Systems with Applications 42, 7046–7056 (2015).
  * Naimzada and Pireddu (2015a) A. Naimzada and M. Pireddu, “A financial market model with endogenous fundamental values through imitative behavior,” Chaos: An Interdisciplinary Journal of Nonlinear Science 25, 073110 (2015a).
  * Naimzada and Pireddu (2015b) A. Naimzada and M. Pireddu, “Introducing a price variation limiter mechanism into a behavioral financial market model,” Chaos: An Interdisciplinary Journal of Nonlinear Science 25, 083112 (2015b).
  * Barak and Modarres (2015) S. Barak and M. Modarres, “Developing an approach to evaluate stocks by forecasting effective features with data mining methods,” Expert Systems with Applications 42, 1325–1339 (2015).
  * Ou and Wang (2009) P. Ou and H. Wang, “Prediction of stock market index movement by ten data mining techniques,” Modern Applied Science 3, 28–42 (2009).
  * Oh and Kim (2002) K. J. Oh and K.-j. Kim, “Analyzing stock market tick data using piecewise nonlinear model,” Expert Systems with Applications 22, 249–255 (2002).
  * Huang, Nakamori, and Wang (2005) W. Huang, Y. Nakamori, and S.-Y. Wang, “Forecasting stock market movement direction with support vector machine,” Computers & operations research 32, 2513–2522 (2005).
  * Kim (2003) K.-j. Kim, “Financial time series forecasting using support vector machines,” Neurocomputing 55, 307–319 (2003).
  * Ding, Granger, and Engle (1993) Z. Ding, C. W. Granger, and R. F. Engle, “A long memory property of stock market returns and a new model,” Journal of empirical finance 1, 83–106 (1993).
  * Marsh and Merton (1987) T. A. Marsh and R. C. Merton, “Dividend behavior for the aggregate stock market,” Journal of Business 60, 1–40 (1987).
  * Marsh and Merton (1986) T. A. Marsh and R. C. Merton, “Dividend variability and variance bounds tests for the rationality of stock market prices,” The American Economic Review 76, 483–498 (1986).
  * Booth, Gerding, and McGroarty (2014) A. Booth, E. Gerding, and F. McGroarty, “Automated trading with performance weighted random forests and seasonality,” Expert Systems with Applications 41, 3651–3661 (2014).
  * Mantegna and Stanley (1999) R. N. Mantegna and H. E. Stanley,  _Introduction to econophysics: correlations and complexity in finance_ (Cambridge university press, 1999).
  * Huang  _et al._ (2003) N. E. Huang, M.-L. Wu, W. Qu, S. R. Long, and S. S. Shen, “Applications of hilbert–huang transform to non-stationary financial time series analysis,” Applied stochastic models in business and industry 19, 245–268 (2003).
  * Nurujjaman and Mahata (2020) M. Nurujjaman and A. Mahata, “Time scales and characteristics of stock markets in different investment horizons,” Frontiers in Physics 8, 498 (2020).
  * Sornette and Cuypers (2004) D. Sornette and F. Cuypers, “Why stock markets crash: Critical events in complex financial systems,” Physics Today 57, 78–79 (2004).
  * Mahata, Bal, and Nurujjaman (2020) A. Mahata, D. P. Bal, and M. Nurujjaman, “Identification of short-term and long-term time scales in stock markets and effect of structural break,” Physica A: Statistical Mechanics and its Applications 545, 123612 (2020).
  * Charles and Darné (2014) A. Charles and O. Darné, “Large shocks in the volatility of the dow jones industrial average index: 1928–2013,” Journal of Banking & Finance 43, 188–199 (2014).
  * Ashraf (2020) B. N. Ashraf, “Economic impact of government interventions during the covid-19 pandemic: International evidence from financial markets,” Journal of Behavioral and Experimental Finance 27, 100371 (2020).
  * Topcu and Gulal (2020) M. Topcu and O. S. Gulal, “The impact of covid-19 on emerging stock markets,” Finance Research Letters 36, 101691 (2020).
  * Baker  _et al._ (2020) S. R. Baker, N. Bloom, S. J. Davis, K. Kost, M. Sammon, and T. Viratyosin, “The unprecedented stock market reaction to covid-19,” The review of asset pricing studies 10, 742–758 (2020).
  * Zhang, Hu, and Ji (2020) D. Zhang, M. Hu, and Q. Ji, “Financial markets under the global pandemic of covid-19,” Finance Research Letters 36, 101528 (2020).
  * bbc (2020) https://www.bbc.com/news/business-51796806 (2020).
  * Rai  _et al._ (2021) A. Rai, A. Mahata, M. Nurujjaman, and O. Prakash, “Statistical properties of the aftershocks of stock market crashes revisited: Analysis based on the 1987 crash, financial-crisis-2008 and covid-19 pandemic,” International Journal of Modern Physics C , 2250019 (2021).
  * Mahata  _et al._ (2021a) A. Mahata, A. Rai, M. Nurujjaman, O. Prakash, and D. Prasad Bal, “Characteristics of 2020 stock market crash: The covid-19 induced extreme event,” Chaos: An Interdisciplinary Journal of Nonlinear Science 31, 053115 (2021a).
  * Mazur, Dang, and Vega (2021) M. Mazur, M. Dang, and M. Vega, “Covid-19 and the march 2020 stock market crash. evidence from s&p1500,” Finance Research Letters 38, 101690 (2021).
  * Mahata  _et al._ (2021b) A. Mahata, A. Rai, M. Nurujjaman, and O. Prakash, “Modeling and analysis of the effect of covid-19 on the stock price: V and l-shape recovery,” Physica A: Statistical Mechanics and its Applications 574, 126008 (2021b).
  * Asness, Frazzini, and Pedersen (2019) C. S. Asness, A. Frazzini, and L. H. Pedersen, “Quality minus junk,” Review of Accounting Studies 24, 34–112 (2019).
  * Bouchaud  _et al._ (2016) J.-P. Bouchaud, S. Ciliberti, A. Landier, G. Simon, and D. Thesmar, “The excess returns of” quality” stocks: a behavioral anomaly,” arXiv preprint arXiv:1601.04478 (2016).
  * Novy-Marx (2013) R. Novy-Marx, “The other side of value: The gross profitability premium,” Journal of Financial Economics 108, 1–28 (2013).
  * Castro and Chousa (2006) N. R. Castro and J. P. Chousa, “An integrated framework for the financial analysis of sustainability,” Business Strategy and the Environment 15, 322–333 (2006).
  * Lee and Faff (2009) D. D. Lee and R. W. Faff, “Corporate sustainability performance and idiosyncratic risk: A global perspective,” Financial Review 44, 213–237 (2009).
  * blo (2020) https://www.wsj.com/articles/investors-rush-into-quality
-stocks-11570413961 (2020).
  * Cao, Chang, and Wang (2008) C. Cao, E. C. Chang, and Y. Wang, “An empirical analysis of the dynamic relationship between mutual fund flow and market return volatility,” Journal of Banking & Finance 32, 2111–2123 (2008).
  * Coval and Stafford (2007) J. Coval and E. Stafford, “Asset fire sales (and purchases) in equity markets,” Journal of Financial Economics 86, 479–512 (2007).
  * Ülkü and Weber (2014) N. Ülkü and E. Weber, “Identifying the interaction between foreign investor flows and emerging stock market returns,” Review of Finance 18, 1541–1581 (2014).
  * Kling and Gao (2008) G. Kling and L. Gao, “Chinese institutional investors’ sentiment,” Journal of International Financial Markets, Institutions and Money 18, 374–387 (2008).
  * Edelen and Warner (2001) R. M. Edelen and J. B. Warner, “Aggregate price effects of institutional trading: a study of mutual fund flow and market returns,” Journal of Financial Economics 59, 195–220 (2001).
  * KP (2020) P. KP, “Dynamics of foreign portfolio investment and stock market returns during the covid-19 pandemic: Evidence from india,” Asian Economics Letters 1 (2020), 10.46557/001c.17658.
  * Edelen (1999) R. M. Edelen, “Investor flows and the assessed performance of open-end mutual funds,” Journal of Financial Economics 53, 439–466 (1999).
  * Warther (1995) V. A. Warther, “Aggregate mutual fund flows and security returns,” Journal of financial economics 39, 209–235 (1995).
  * Giglio  _et al._ (2021) S. Giglio, M. Maggiori, J. Stroebel, and S. Utkus, “The joint dynamics of investor beliefs and trading during the covid-19 crash,” Proceedings of the National Academy of Sciences 118 (2021).
  * Hanspal, Weber, and Wohlfart (2020) T. Hanspal, A. Weber, and J. Wohlfart, “Exposure to the covid-19 stock market crash and its effect on household expectations,” Review of Economics and Statistics , 1–45 (2020).
  * Alexakis, Eleftheriou, and Patsoulis (2021) C. Alexakis, K. Eleftheriou, and P. Patsoulis, “Covid-19 containment measures and stock market returns: An international spatial econometrics investigation,” Journal of Behavioral and Experimental Finance 29, 100428 (2021).
  * Narayan, Phan, and Liu (2021) P. K. Narayan, D. H. B. Phan, and G. Liu, “Covid-19 lockdowns, stimulus packages, travel bans, and stock returns,” Finance research letters 38, 101732 (2021).
  * may (2020) https://indianexpress.com/article/explained/atmanirbhar-package-full-
break-up-of-rs-20-lakh-crore-nirmala-
sitharaman-lockdown-6414044/ (2020).

  * kpm (2021) https://home.kpmg/xx/en/home/insights/2020/04/india-government-and-institution-
measures-in-response-to-covid.html (2021).

  * Ghosh (2020) J. Ghosh, “A critique of the indian government’s response to the covid-19 pandemic,” Journal of Industrial and Business Economics 47, 519–530 (2020).
  * pac (2020) https://economictimes.indiatimes.com/news/economy/finance/latest-stimulus-package-among-largest-in-the-world/articleshow/75701976.cms (2020).
  * Barber, Odean, and Zhu (2008) B. M. Barber, T. Odean, and N. Zhu, “Do retail trades move markets?” The Review of Financial Studies 22, 151–186 (2008).
  * Guo, Sun, and Qian (2017) K. Guo, Y. Sun, and X. Qian, “Can investor sentiment be used to predict the stock price? dynamic analysis based on china stock market,” Physica A: Statistical Mechanics and its Applications 469, 390–396 (2017).
  * Baker and Wurgler (2006) M. Baker and J. Wurgler, “Investor sentiment and the cross-section of stock returns,” The journal of Finance 61, 1645–1680 (2006).
  * mon (2020) https://www.moneycontrol.com/ (2020).
  * bse (2020) https://www.bseindia.com/ (2020).
  * seb (2020) https://www.sebi.gov.in/ (2020).
  * nsd (2020) https://nsdl.co.in/ (2020).
  * Huang  _et al._ (1998) N. E. Huang, Z. Shen, S. R. Long, M. C. Wu, H. H. Shih, Q. Zheng, N.-C. Yen, C. C. Tung, and H. H. Liu, “The empirical mode decomposition and the hilbert spectrum for nonlinear and non-stationary time series analysis,” Proceedings of the Royal Society of London. Series A: mathematical, physical and engineering sciences 454, 903–995 (1998).
  * Wu and Huang (2004) Z. Wu and N. E. Huang, “A study of the characteristics of white noise using the empirical mode decomposition method,” Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences 460, 1597–1611 (2004).
  * Wu and Huang (2005) Z. Wu and N. E. Huang, “Statistical significance test of intrinsic mode functions,” in  _Hilbert-Huang Transform and its applications_ (World Scientific, 2005) pp. 107–127.
  * nse (2020) https://www1.nseindia.com/ (2020).


my hack/.style= late after line=
, late after last line= ,

Performance evaluation of approximation algorithms for the minimum size
2-vertex strongly connected subgraph problem

Azzam Habib

Faculty of Informatics Engineering, Tishreen University, Syria

###### Abstract

Jaberi [7] presented approximation algorithms for the problem of computing a
minimum size 2-vertex strongly biconnected subgraph in directed graphs. We
have implemented approximation algorithms presented in [7] and we have tested
the implementation on some graphs. The experimental results show that these
algorithms work well in practice.

keywords
Graph algorithms, Approximation algorithms, Connectivity

##  1 Introduction

If we ignore the directions of edges in a directed graph $G$, we obtain an
undirected graph, called the underlying graph of $G$. A directed graph
$G=(V,E)$ is strongly biconnected if for any two vertices $s,t\in V$, the
directed graph $G$ contains a path from $s$ to $t$ and a path from $t$ to $s$
and the underlying graph of $G$ is biconnected. This concept was introduced by
Wu and Grumbach [12]. A strongly biconnected graph $G=(V,E)$ is 2-vertex
strongly biconnected if the removal of any vertex $v\in G$ leaves a strongly
biconnected graph.

It is well known that the minimum $k$-vertex-connected spanning subgraph
problem in directed graphs is NP-hard for $k\geq 1$ [4, 1]. The edges set of
each minimal $k$-vertex-connected directed graph contains at most $2kn$ edges
[1, 2, 10]. Cheriyan and Thurimella [1] gave approximation algorithms with an
approximation factor of $(1+1/k)$ for the minimum $k$-vertex-connected
spanning subgraph problem. Georgiadis et al. [5, 3] gave improved versions of
these algorithms for the case $k=2$. The 2-vertex connected directed graphs
have the property that they do not have any strong articulation point. Strong
articulation points can be found using linear time algorithms presented by
Italiano et al. [6]. Jaberi [7] presented approximation algorithms for the
problem of computing a minimum size 2-vertex strongly biconnected subgraph in
directed graphs. We have implemented approximation algorithms presented in [7]
and we have tested the implementation on some graphs. The experimental results
show that these approximation algorithms work well in practice.

##  2 Approximation algorithms presented in [7]

In this section we review the approximation algorithms presented in [7].
Algorithm 1 shows the pseoducode of the first algorithm presented by Jaberi
[7] which is based on b-articulation points and minimal 2-vertex connected
directed graphs.

Algorithm 1 [7]

Input: a 2-vertex strongly biconnected directed graph $G=(V,E)$
Output: a directed subgraph of $G$ which is $2$-vertex strongly biconnected
1.identify a minimal 2-vertex connected spanning subgraph $G^{+}=(V,E^{+})$
2\. if $G^{+}$ has no b-articulation points then
3\. output $G^{+}$
4\. else
5\. Let $K$ be set of the b-articulation points in $G^{+}$
6\. for each vertex $v\in K$ do
7\.  while $v$ is b-articulation point in $G^{+}$ do
8\. find and edge $(w.x)\in E\setminus E^{+}$ such that the strongly
biconnected
9\. component of $w$ does not contain the vertex $x$
10\. add the edge $(w.x)$ to $G^{+}$
11\. output $G^{+}$

Jaberi [7] proved that Algorithm 1 has an approximation factor of $(l/2+2)$,
where $l$ is the number of the b-articulation points in the directed subgraph
identified in line 1 of Algorithm 1 and Algorithm 1 runs in $O(n^{2}m)$ time.

Let $G=(V,E)$ be a 2-vertex strongly biconnected graph, we say that $G$ is
minimal if $G\setminus\\{e\\}$ is not 2-vertex strongly connected for any edge
$e\in E$. Jaberi [7] also proved that each minimal 2-vertex strongly
biconnected directed graph has at most $7n$ edges. His proof is based on the
results of Mader and [9, 8, 10] and Edmonds [2]. This imply a 7/2
approximation algorithm for the problem of computing a minimum size 2-vertex
strongly biconnected subgraph in directed graphs.

In order to implement this algorithm, we used the simplest approach, just by
removing edges one by one and check if the remaining graph is strongly
biconnected. Algorithm 2 shows the pseudocode of this simple approach which
runs in $O(nm(n+m))$ time.

Algorithm 2

Input: A 2-vertex strongly biconnected directed graph $G=(V,E)$
Output: A minimal $2$-vertex strongly biconnected spanning subgraph of $G$
1\. for each edge $e\in E$ do
2\. if $G\setminus\\{e\\}$ is 2-vertex strongly connected then
3\. remove $e$ from $G$
4.Output $G$

Cheriyan and Thurimella [1] gave approximation algorithms with an
approximation factor of $(1+1/k)$ for the minimum $k$-vertex-connected
spanning subgraph problem. The output of this algorithm is not necessarily
$2$-vertex strongly biconnected when $k=2$. Jaberi [7] described a modified
version of this algorithm which is able to obtain a $2$-vertex-strongly
biconnected subgraph. We have not implemented this version but we have
implemented a modified version which finds a matching in the first phase using
a greedy algorithm instead of finding a $\geq 1$ matching. We refer to the
simple version that finds a matching using a greedy algorithm as Algorithm 3.

##  3 The results of our experiments

Here we report the results of the experiments that we conducted.

Input | Algorithm2 | Algorithm2 | Algorithm3 | Algorithm3 | Algorithm1 | Algorithm1
---|---|---|---|---|---|---
( V , E ) | Time | Edges | Time | Edges | Time | Edges
( 10 , 54 ) | 1 s | 21 | 1 s | 22 | 1s | 21
( 50 , 387 ) | 8 s | 113 | 8s | 111 | 1s | 113
( 100 , 1000 ) | 18 s | 226 | 16s | 226 | 2s | 227
( 200 , 2000 ) | 2 m | 450 | 1 m 38 s | 457 | 18s | 451
( 300 , 2724 ) | 14 m 26 s | 679 | 8 m 4 s | 676 | 57 s | 679
( 500 , 4914 ) | 36 m 31 s | 1145 | 34 m 7 s | 1134 | 5 m 41 s | 1145

We implemented all our algorithms in Java without the use of any external
graph library. The experiments were conducted on a 64-bit Intel(R)/Windows
machine running Windows 21H1, with a 1.99 GHz Intel i7- 8550U, 12 GB of RAM, 8
MB of L3 cache, and each core has a 256 KB private L2 cache. All experiments
were executed on a single core without using any parallelization. We report
CPU times measured with the nanoTime function. For our experimental study, we
used a collection of random generated graphs, we constructed 2-vertex strongly
biconnected graphs as follows. We generated random graphs with n node and 3n
random edges, then we keep adding edges one by one until the graph become
2-vertex strongly biconnected. For these graphs, notice that the output of the
algorithms presented in [7] has less than $3n$ edges.

## References

  * [1] Joseph Cheriyan, Ramakrishna Thurimella: Approximating Minimum-Size k-Connected Spanning Subgraphs via Matching. SIAM J. Comput. 30(2): 528-560 (2000)
  * [2] J. Edmonds: Edge-Disjoint Branchings, In Rustin, R., editor, Combinatorial Algorithms, pp. 91-96, Academic Press (1973)
  * [3] Loukas Georgiadis: Approximating the Smallest 2-Vertex Connected Spanning Subgraph of a Directed Graph. ESA 2011: 13-24
  * [4] M. R. Garey, David S. Johnson: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman 1979, ISBN 0-7167-1044-7
  * [5] Loukas Georgiadis, Giuseppe F. Italiano, Aikaterini Karanasiou: Approximating the smallest 2-vertex connected spanning subgraph of a directed graph. Theor. Comput. Sci. 807: 185-200 (2020)
  * [6] Giuseppe F. Italiano, Luigi Laura, Federico Santaroni: Finding strong bridges and strong articulation points in linear time. Theoretical Computer Science 447: 74-84 (2012)
  * [7] Raed Jaberi: Minimum 2-vertex strongly biconnected spanning directed subgraph problem, Discrete Mathematics Letters, Discrete Math. Lett. 7 (2021) 40–43 DOI: 10.47443/dml.2021.0024
  * [8] W. Mader: Ecken vom Grad n in minimalen n-fach zusammenhängenden Graphen. Archiv der Mathematik, 23:219-224,(1972)
  * [9] W. Mader, Minimale n-fach kantenzusammenhängende Graphen. Mathematische Annalen Volume: 191, page 21-28(1971)
  * [10] W. Mader, Minimal $n$-fach zusammenhängende Digraphen. Journal of Combinatorial Theory, Series B Volume 38, Issue 2, April 1985, Pages 102-117
  * [11] Robert Endre Tarjan: Depth-First Search and Linear Graph Algorithms. SIAM Journal on Computing, 1(2): 146-160 (1972)
  * [12] Zhilin Wu, Stéphane Grumbach: Feasibility of motion planning on acyclic and strongly connected directed graphs. Discrete Applied Mathematics 158(9): 1017-1028 (2010)