Introduction

This project analyzes the impact of Covid measures on the return in stock market using a panel VAR model. The dependent vector includes log return of stock index and interest rate for several countries. The measures of Covid include the number of new daily confirmed case, 7-day moving average of new daily confirmed case and the log growth rate of confirmed case. The project also explores the impacts of covid for different types of countries, emerging and developed by including the interaction between covid and country type.

Data

We first load data from two excel spreadsheets and select the related variables, log_ret, interest rate, EconomicSupportIndex, StringecyIndex, new confirmed case, total confirmed cases.

Here are the The following steps are implemented to clean up the data.

  1. Remove duplicated records.

  2. Remove records after March 15, 2021 since there are no values.

  3. Create Covid measures.

    • log of raw daily new confirmed case. It is very volatile and presents weekly seasonality because many countries do not have data during weekend.

    • log of 7-day moving average. It is smooth without seasonality.

    • log growth rate of confirmed case.

  4. Merge (inner merge) two data sets by country and date. The records with common country and date are kept.

  5. Create dummy variable, ‘developed’ and its interactions between monetary policy and government response

  6. Remove missing values. The main reason that we do not use values in the previous time to fill the missing values

Here are the summary statistics of the data.

##    Country               Date                         Type          
##  Length:5350        Min.   :2020-01-22 00:00:00   Length:5350       
##  Class :character   1st Qu.:2020-05-06 00:00:00   Class :character  
##  Mode  :character   Median :2020-08-17 00:00:00   Mode  :character  
##                     Mean   :2020-08-16 10:09:38                     
##                     3rd Qu.:2020-11-26 00:00:00                     
##                     Max.   :2021-03-12 00:00:00                     
##                                                                     
##     log_ret          new confirmed      Confirmed        EconomicSupportIndex
##  Min.   :-4.602084   Min.   :-74347   Min.   :       0   Min.   :  0.00      
##  1st Qu.:-0.007343   1st Qu.:   109   1st Qu.:   27962   1st Qu.: 37.50      
##  Median : 0.000969   Median :  1561   Median :  206018   Median : 62.50      
##  Mean   :-0.000626   Mean   : 10557   Mean   : 1272867   Mean   : 55.81      
##  3rd Qu.: 0.009601   3rd Qu.:  7933   3rd Qu.:  785187   3rd Qu.: 75.00      
##  Max.   : 0.156060   Max.   :823225   Max.   :29347338   Max.   :100.00      
##                      NA's   :1                           NA's   :13          
##  StringencyIndex  new_confirmed_7day log_case_growth_rate    int_rate     
##  Min.   :  0.00   Min.   : -6223.0   Min.   :0.0000       Min.   :-0.828  
##  1st Qu.: 50.93   1st Qu.:   148.6   1st Qu.:1.0000       1st Qu.:-0.100  
##  Median : 67.13   Median :  1569.1   Median :1.0000       Median : 0.232  
##  Mean   : 60.72   Mean   : 10093.1   Mean   :0.9628       Mean   : 1.616  
##  3rd Qu.: 75.46   3rd Qu.:  8068.1   3rd Qu.:1.0000       3rd Qu.: 2.647  
##  Max.   :100.00   Max.   :250743.6   Max.   :1.0000       Max.   :15.065  
##  NA's   :12       NA's   :72                                              
##    developed      EconomicSupportIndex_developed StringencyIndex_developed
##  Min.   :0.0000   Min.   :  0.00                 Min.   : 0.00            
##  1st Qu.:0.0000   1st Qu.:  0.00                 1st Qu.: 0.00            
##  Median :1.0000   Median : 25.00                 Median :34.26            
##  Mean   :0.5813   Mean   : 38.24                 Mean   :33.75            
##  3rd Qu.:1.0000   3rd Qu.: 75.00                 3rd Qu.:67.13            
##  Max.   :1.0000   Max.   :100.00                 Max.   :94.44            
##                   NA's   :13                     NA's   :12

Unit Root Test

It is import to check whether the dependent vector time series are stable. Here we use plm package to implement. Both series are stable.

## 
##  Maddala-Wu Unit-Root Test (ex. var.: None)
## 
## data:  log_ret ~ 0
## chisq = 1909.8, df = 38, p-value < 2.2e-16
## alternative hypothesis: stationarity
## 
##  Maddala-Wu Unit-Root Test (ex. var.: None)
## 
## data:  int_rate ~ 0
## chisq = 125.9, df = 38, p-value = 2.398e-11
## alternative hypothesis: stationarity

Panel VAR model

The general form of panel VAR model is as follow \[y_{i,t} = \sum_{l=1}^{p}A_{l}y_{i,t-l} + Bx_{i,t} + \mu_{i} + \epsilon_{i,t}\] where \(y_{i,t}\) is an \(m\times 1\) vector of endogenous variables for the \(i-\)th cross-sectional unit at time \(t\), \(m\) is equal to the number of variables in the vector, \(x_{i,t}\) is an \(n\times1\) vector of strictly exogenous variables, \(n\) is the number of exogenous variables, \(\mu_{i}\) is the fixed effect specific to the \(i-\)th cross-sectional unit. Here it is assumed that neither \(A\) and \(B\) depends on cross-sectional units. There are two ways to get rid of the fixed effect, first difference and forward orthogonal deviation. This paper discusses two methods using simulation and finds that in most cases forward orthogonal deviation works better. We will be using forward orthogonal deviation for our estimation. The model is estimated using R package panelvar, please refer to this paper for details. Three different models using three different Covid measures are estimated below followed by impulse response charts.

  1. Use log growth rate of confirmed case.

    Dynamic Panel VAR estimation, two-step GMM

    Transformation: Forward orthogonal deviations
    Group variable: Country
    Time variable: day
    Number of observations = 5279
    Number of groups = 19
    Obs per group: min = 221
    Obs per group: avg = 277.842105263158
    Obs per group: max = 290
    Number of instruments = 1172

     

    log_ret

    int_rate

    lag1_log_ret

    -0.0057***

    -0.0112***

     

    (0.0007)

    (0.0006)

    lag1_int_rate

    0.0928

    0.2086***

     

     

    (0.0076)

    lag2_log_ret

    0.0193

    -0.0062***

     

     

    (0.0002)

    lag2_int_rate

    0.0552

    0.1636***

     

     

    (0.0043)

    EconomicSupportIndex

    0.0006***

    -0.0027***

     

    (0.0001)

    (0.0002)

    StringencyIndex

    0.0045***

    -0.0075***

     

    (0.0004)

    (0.0003)

    log_case_growth_rate

    -0.3287***

    0.0522***

     

    (0.0156)

    (0.0119)

    EconomicSupportIndex_developed

    0.0003

    0.0002

     

    (0.0003)

    (0.0003)

    StringencyIndex_developed

    -0.0034***

    0.0061***

     

    (0.0003)

    (0.0003)

    log_case_growth_rate_developed

    -0.1207***

    0.0566***

     

    (0.0054)

    (0.0035)

    p < 0.001; p < 0.01; p < 0.05

    Instruments for equation

    Standard
    EconomicSupportIndex, StringencyIndex, log_case_growth_rate, EconomicSupportIndex_developed, StringencyIndex_developed, log_case_growth_rate_developed

    GMM-type
    Dependent vars: L(2,2))
    Collapse = FALSE

    Hansen test of overid. restrictions: chi2(1152) = 261.22 Prob > chi2 = 1
    (Robust, but weakened by many instruments.)

  2. use log of 7-day moving average of new confirmed case. The reason to use log version of 7-day moving average is because it reports singular matrix error when using 7-day moving average.

    Dynamic Panel VAR estimation, two-step GMM

    Transformation: Forward orthogonal deviations
    Group variable: Country
    Time variable: day
    Number of observations = 5197
    Number of groups = 19
    Obs per group: min = 218
    Obs per group: avg = 273.526315789474
    Obs per group: max = 284
    Number of instruments = 1156

     

    log_ret

    int_rate

    lag1_log_ret

    -0.0003***

    -0.0193***

     

    (0.0000)

    (0.0028)

    lag1_int_rate

    0.1544***

    0.0429***

     

    (0.0221)

    (0.0060)

    lag2_log_ret

    0.0004***

    -0.0003***

     

    (0.0001)

    (0.0000)

    lag2_int_rate

    0.1274***

    0.0419***

     

    (0.0182)

    (0.0058)

    EconomicSupportIndex

    0.0013***

    -0.0041***

     

    (0.0003)

    (0.0001)

    StringencyIndex

    0.0019**

    -0.0060***

     

    (0.0006)

    (0.0003)

    log_new_confirmed_7day

    0.0101**

    -0.0257***

     

    (0.0031)

    (0.0012)

    EconomicSupportIndex_developed

    -0.0001

    0.0010***

     

    (0.0002)

    (0.0002)

    StringencyIndex_developed

    -0.0011*

    0.0055***

     

    (0.0005)

    (0.0003)

    log_new_confirmed_7day_developed

    -0.0077***

    0.0114

     

    (0.0016)

     

    p < 0.001; p < 0.01; p < 0.05

    Instruments for equation

    Standard
    EconomicSupportIndex, StringencyIndex, log_new_confirmed_7day, EconomicSupportIndex_developed, StringencyIndex_developed, log_new_confirmed_7day_developed

    GMM-type
    Dependent vars: L(2,2))
    Collapse = FALSE

    Hansen test of overid. restrictions: chi2(1136) = 360.29 Prob > chi2 = 1
    (Robust, but weakened by many instruments.)

  3. use log of new confirmed case.

    Dynamic Panel VAR estimation, two-step GMM

    Transformation: Forward orthogonal deviations
    Group variable: Country
    Time variable: day
    Number of observations = 5255
    Number of groups = 19
    Obs per group: min = 219
    Obs per group: avg = 276.578947368421
    Obs per group: max = 287
    Number of instruments = 1172

     

    log_ret

    int_rate

    lag1_log_ret

    -0.0054*

    -0.0160*

     

    (0.0022)

    (0.0066)

    lag1_int_rate

    0.1229*

    0.0285*

     

    (0.0511)

    (0.0116)

    lag2_log_ret

    0.0037*

    -0.0002*

     

    (0.0015)

    (0.0001)

    lag2_int_rate

    0.0885*

    0.0243*

     

    (0.0368)

    (0.0098)

    EconomicSupportIndex

    0.0007**

    -0.0036***

     

    (0.0003)

    (0.0003)

    StringencyIndex

    0.0029*

    -0.0067***

     

    (0.0013)

    (0.0004)

    log_new_confirmed

    0.0001

    -0.0216***

     

     

    (0.0009)

    EconomicSupportIndex_developed

    0.0001

    0.0005*

     

    (0.0002)

    (0.0002)

    StringencyIndex_developed

    -0.0026*

    0.0058***

     

    (0.0011)

    (0.0003)

    log_new_confirmed_developed

    0.0028

    0.0087***

     

     

    (0.0009)

    p < 0.001; p < 0.01; p < 0.05

    Instruments for equation

    Standard
    EconomicSupportIndex, StringencyIndex, log_new_confirmed, EconomicSupportIndex_developed, StringencyIndex_developed, log_new_confirmed_developed

    GMM-type
    Dependent vars: L(2,2))
    Collapse = FALSE

    Hansen test of overid. restrictions: chi2(1152) = 288.54 Prob > chi2 = 1
    (Robust, but weakened by many instruments.)

Panel VAR with other options.

In this section we estimated the models using first difference for comparison.

  1. Use log growth rate of confirmed case.

Dynamic Panel VAR estimation, two-step GMM

Transformation: First-differences
Group variable: Country
Time variable: day
Number of observations = 5279
Number of groups = 19
Obs per group: min = 221
Obs per group: avg = 277.842105263158
Obs per group: max = 290
Number of instruments = 1172

  log_ret int_rate
lag1_log_ret -0.1152 -0.0514
  (0.1147) (0.1678)
lag1_int_rate 0.1253 0.7549***
  (0.0846) (0.1533)
lag2_log_ret -0.0358 -0.1752
  (0.1801) (0.2958)
lag2_int_rate -0.2742 0.0236
  (0.1535) (0.1507)
EconomicSupportIndex 0.0003 -0.0001
  (0.0005) (0.0006)
StringencyIndex 0.0006 -0.0047
  (0.0013) (0.0030)
log_case_growth_rate 0.0485 0.0276
  (0.1601) (0.1780)
EconomicSupportIndex_developed -0.0006 0.0004
  (0.0007) (0.0007)
StringencyIndex_developed -0.0013 0.0050
  (0.0015) (0.0029)
log_case_growth_rate_developed 0.0699 -0.1312
  (0.0795) (0.1287)
p < 0.001; p < 0.01; p < 0.05

Instruments for equation

Standard
EconomicSupportIndex, StringencyIndex, log_case_growth_rate, EconomicSupportIndex_developed, StringencyIndex_developed, log_case_growth_rate_developed

GMM-type
Dependent vars: L(2,2))
Collapse = FALSE

Hansen test of overid. restrictions: chi2(1152) = 8.27 Prob > chi2 = 1
(Robust, but weakened by many instruments.)

  1. use log of 7-day moving average of new confirmed case. The reason to use log version of 7-day moving average is because it reports singular matrix error when using 7-day moving average.

    Dynamic Panel VAR estimation, two-step GMM

    Transformation: First-differences
    Group variable: Country
    Time variable: day
    Number of observations = 5197
    Number of groups = 19
    Obs per group: min = 218
    Obs per group: avg = 273.526315789474
    Obs per group: max = 284
    Number of instruments = 1156

     

    log_ret

    int_rate

    lag1_log_ret

    -0.0457

    0.0809

     

    (0.0554)

    (0.0565)

    lag1_int_rate

    -0.0980

    0.4615

     

    (0.1540)

    (0.2388)

    lag2_log_ret

    -0.0580

    -0.0810

     

    (0.0761)

    (0.0709)

    lag2_int_rate

    0.0037

    -0.1582

     

    (0.1302)

    (0.0996)

    EconomicSupportIndex

    0.0014

    -0.0009

     

    (0.0008)

    (0.0006)

    StringencyIndex

    0.0011

    -0.0036

     

    (0.0019)

    (0.0028)

    log_new_confirmed_7day

    -0.0749

    0.0525

     

    (0.0967)

    (0.0709)

    EconomicSupportIndex_developed

    -0.0020*

    0.0014*

     

    (0.0009)

    (0.0006)

    StringencyIndex_developed

    -0.0019

    0.0039

     

    (0.0023)

    (0.0029)

    log_new_confirmed_7day_developed

    0.0915

    -0.0676

     

    (0.1157)

    (0.0855)

    p < 0.001; p < 0.01; p < 0.05

    Instruments for equation

    Standard
    EconomicSupportIndex, StringencyIndex, log_new_confirmed_7day, EconomicSupportIndex_developed, StringencyIndex_developed, log_new_confirmed_7day_developed

    GMM-type
    Dependent vars: L(2,2))
    Collapse = FALSE

    Hansen test of overid. restrictions: chi2(1136) = 3.72 Prob > chi2 = 1
    (Robust, but weakened by many instruments.)

  2. use log of new confirmed case.

    Dynamic Panel VAR estimation, two-step GMM

    Transformation: First-differences
    Group variable: Country
    Time variable: day
    Number of observations = 5255
    Number of groups = 19
    Obs per group: min = 219
    Obs per group: avg = 276.578947368421
    Obs per group: max = 287
    Number of instruments = 1172

     

    log_ret

    int_rate

    lag1_log_ret

    -0.3872**

    -0.1362

     

    (0.1367)

    (0.1338)

    lag1_int_rate

    -0.1393

    0.6858**

     

    (0.0949)

    (0.2413)

    lag2_log_ret

    0.4300**

    0.1300

     

    (0.1551)

    (0.0702)

    lag2_int_rate

    -0.0212

    0.5866

     

    (0.0528)

    (0.3542)

    EconomicSupportIndex

    0.0003

    0.0004

     

    (0.0003)

    (0.0004)

    StringencyIndex

    0.0004

    -0.0025

     

    (0.0006)

    (0.0026)

    log_new_confirmed

    -0.0004

    -0.0024

     

    (0.0027)

    (0.0019)

    EconomicSupportIndex_developed

    -0.0004

    0.0003

     

    (0.0005)

    (0.0004)

    StringencyIndex_developed

    -0.0008

    0.0029

     

    (0.0008)

    (0.0025)

    log_new_confirmed_developed

    0.0015

    0.0021

     

    (0.0030)

    (0.0021)

    p < 0.001; p < 0.01; p < 0.05

    Instruments for equation

    Standard
    EconomicSupportIndex, StringencyIndex, log_new_confirmed, EconomicSupportIndex_developed, StringencyIndex_developed, log_new_confirmed_developed

    GMM-type
    Dependent vars: L(2,2))
    Collapse = FALSE

    Hansen test of overid. restrictions: chi2(1152) = 3.47 Prob > chi2 = 1
    (Robust, but weakened by many instruments.)