house_synch = get.neg.abs.diff(country_df[,c("Date","Country",
                                             "HousePrice_ret")]) %>% 
  rename(House_synch = HousePrice_ret) %>% 
  mutate(House_synch = House_synch * 100)


reg_list$house = plm(formula = formula(sub("Fin_synch","House_synch",
                                           reg_formula, fixed = TRUE)),
                     data = left_join(fin_reg_df, house_synch,
                                       by = c("Date","CountryPair")),
                     model = "within",effect = "twoways",
                     index = c("CountryPair","Date"))
star_house = stargazer(reg_list$house, header = FALSE,digits = 2,
          label = "house",table.placement = "H",
          title = paste0("House price synchronization and banking integration: ",
                         "panel specification"),
          dep.var.caption = "House cycles synch",
          model.numbers = FALSE,
          dep.var.labels.include = FALSE,
          notes = paste0("\\parbox[t]{8cm}{",
                         paste0("The table presents panel estimation that ",
                                "includes twoway fixed effects and country-pair ",
                                " specific linear time trend. ",
                               notes_str_ctrl %>% 
                                 sub(pattern = "Financial cycles",
                                     replacement = "House price",
                                     fixed = TRUE) %>% 
                                 sub(pattern = "financial cycle",
                                     replacement = "house price",
                                     fixed = TRUE),"}")),
          notes.align = "l",
          notes.append = FALSE,
          se = list(sqrt(diag(vcovHC(reg_list$house,cluster = "group")))),
          keep = paste0("^",temp_names,"$"),order = paste0("^",temp_names,"$"),
          covariate.labels = temp_labels,
          omit.stat = c("f","adj.rsq"))

star_house = sub("\\textit{Note:}  & \\multicolumn{1}{l}{\\parbox[t]{8cm}{",
                    "\\multicolumn{2}{l}{\\parbox[t]{10cm}{\\textit{Note:} ",
                    star_house,fixed = TRUE)
credit_synch = get.neg.abs.diff(country_df[,c("Date","Country",
                                              "Total_Credit_real_ret")]) %>% 
  rename(Credit_synch = Total_Credit_real_ret) %>% 
  mutate(Credit_synch = Credit_synch * 100)

reg_list$credit = plm(formula = formula(sub("Fin_synch","Credit_synch",
                                           reg_formula, fixed = TRUE)),
                      data = left_join(fin_reg_df, credit_synch,
                                       by = c("Date","CountryPair")),
                      model = "within",effect = "twoways",
                      index = c("CountryPair","Date"))
star_credit = stargazer(reg_list$credit, header = FALSE,digits = 2,
          label = "credit",table.placement = "H",
          title = paste0("Credit synchronization and banking integration: ",
                         "panel specification"),
          dep.var.caption = "Credit cycles synch",
          model.numbers = FALSE,
          dep.var.labels.include = FALSE,
          notes = paste0("\\parbox[t]{8cm}{",
                         paste0("The table presents panel estimation that ",
                                "includes twoway fixed effects and country-pair ",
                                " specific linear time trend. ",
                               notes_str_ctrl %>% 
                                 sub(pattern = "Financial cycles",
                                     replacement = "Credit price",
                                     fixed = TRUE) %>% 
                                 sub(pattern = "financial cycle",
                                     replacement = "credit",
                                     fixed = TRUE),"}")),
          notes.align = "l",
          notes.append = FALSE,
          se = list(sqrt(diag(vcovHC(reg_list$credit,cluster = "group")))),
          keep = paste0("^",temp_names,"$"),order = paste0("^",temp_names,"$"),
          covariate.labels = temp_labels,
          omit.stat = c("f","adj.rsq"))

star_credit = sub("\\textit{Note:}  & \\multicolumn{1}{l}{\\parbox[t]{8cm}{",
                    "\\multicolumn{2}{l}{\\parbox[t]{10cm}{\\textit{Note:} ",
                    star_credit,fixed = TRUE)
avg_synch = full_join(credit_synch, house_synch,
                      by = c("Date","CountryPair")) %>% 
  filter_at(.vars = vars(Credit_synch, House_synch),
            any_vars(!is.na(.))) %>% 
  rowwise() %>% 
  mutate(Avg_synch = mean(c(Credit_synch, House_synch), na.rm = TRUE)) %>% 
  ungroup() %>% 
  select(Date,CountryPair, Avg_synch)


reg_list$avg_synch = plm(formula = formula(sub("Fin_synch","Avg_synch",
                                           reg_formula, fixed = TRUE)),
                     data = left_join(fin_reg_df, avg_synch,
                                       by = c("Date","CountryPair")),
                     model = "within",effect = "twoways",
                     index = c("CountryPair","Date"))
star_avg_synch = stargazer(reg_list$avg_synch, header = FALSE,digits = 2,
          label = "avg_synch",table.placement = "H",
          title = paste0("Average synchronization and banking integration: ",
                         "panel specification"),
          dep.var.caption = "Average cycles synch",
          model.numbers = FALSE,
          dep.var.labels.include = FALSE,
          notes = paste0("\\parbox[t]{8cm}{",
                         paste0("The table presents panel estimation that ",
                                "includes twoway fixed effects and country-pair ",
                                " specific linear time trend. ",
                               notes_str_ctrl %>% 
                                 sub(pattern = "Financial cycles",
                                     replacement = "Average",
                                     fixed = TRUE) %>% 
                                 sub(pattern = "financial cycle",
                                     replacement = paste0("each component of",
                                                          " financial cycle"),
                                     fixed = TRUE),"}")),
          notes.align = "l",
          notes.append = FALSE,
          se = list(sqrt(diag(vcovHC(reg_list$house,cluster = "group")))),
          keep = paste0("^",temp_names,"$"),order = paste0("^",temp_names,"$"),
          covariate.labels = temp_labels,
          omit.stat = c("f","adj.rsq"))

star_avg_synch = sub("\\textit{Note:}  & \\multicolumn{1}{l}{\\parbox[t]{8cm}{",
                    "\\multicolumn{2}{l}{\\parbox[t]{10cm}{\\textit{Note:} ",
                    star_avg_synch,fixed = TRUE)
complete_ret = country_df %>% 
  select(Country, Date, Total_Credit_real_ret, HousePrice_ret) %>% 
  filter(complete.cases(.)) %>% 
  rowwise() %>% 
  mutate(Fin_ret = mean(c(Total_Credit_real_ret, HousePrice_ret))) %>% 
  select(Country, Date, Fin_ret) %>% 
  get.neg.abs.diff() %>%
  rename(Comp_synch = Fin_ret) %>% 
  mutate(Comp_synch = Comp_synch * 100)



reg_list$comp_synch = plm(formula = formula(sub("Fin_synch","Comp_synch",
                                           reg_formula, fixed = TRUE)),
                     data = left_join(fin_reg_df, complete_ret,
                                       by = c("Date","CountryPair")),
                     model = "within",effect = "twoways",
                     index = c("CountryPair","Date"))
star_comp_synch = stargazer(reg_list$comp_synch, header = FALSE,digits = 2,
          label = "comp_synch",table.placement = "H",
          title = paste0("Complete synchronization and banking integration: ",
                         "panel specification"),
          dep.var.caption = "Complete cycles synch",
          model.numbers = FALSE,
          dep.var.labels.include = FALSE,
          notes = paste0("\\parbox[t]{8cm}{",
                         paste0("The table presents panel estimation that ",
                                "includes twoway fixed effects and country-pair ",
                                " specific linear time trend. ",
                               notes_str_ctrl %>% 
                                 sub(pattern = "Financial cycles",
                                     replacement = "Average",
                                     fixed = TRUE) %>% 
                                 sub(pattern = "financial cycle",
                                     replacement = paste0("each component of",
                                                          " financial cycle"),
                                     fixed = TRUE),"}")),
          notes.align = "l",
          notes.append = FALSE,
          se = list(sqrt(diag(vcovHC(reg_list$comp_synch,cluster = "group")))),
          keep = paste0("^",temp_names,"$"),order = paste0("^",temp_names,"$"),
          covariate.labels = temp_labels,
          omit.stat = c("f","adj.rsq"))

star_comp_synch = sub("\\textit{Note:}  & \\multicolumn{1}{l}{\\parbox[t]{8cm}{",
                    "\\multicolumn{2}{l}{\\parbox[t]{10cm}{\\textit{Note:} ",
                    star_comp_synch,fixed = TRUE)
reg_list$lag = plm(
  formula = formula(paste("Fin_synch ~ lag(bank_gdp,1) * lag(Crises,1)",
                                  "lag(bank_gdp,1) * lag(FD_tot,1)",
                                  "lag(bank_gdp,1) * lag(EU_both,1)",
                                  # "lag(bank_gdp,1) * lag(Euro_both,1)",
                                  "lag(bank_gdp,1) * lag(Common_Lang,1)",
                                  paste(paste0("lag(",control_vars,",1)"),
                                        collapse = "+"),
                                  "CountryPair:Time_Trend",
                                  sep = "+")),data = fin_reg_df,
          model = "within",effect = "twoways",
          index = c("CountryPair","Date"))
star_lag = stargazer(reg_list$lag, header = FALSE,digits = 2,
          label = "lagged",table.placement = "H",
          title = "Panel specification with controls, lagged",
          dep.var.caption = "Fin cycles synch",
          model.numbers = FALSE,
          dep.var.labels.include = FALSE,
          notes = paste0("\\parbox[t]{8cm}{",
                         paste0("The table presents panel estimation that ",
                                "includes twoway fixed effects and country-pair ",
                                " specific linear time trend. ",
                                notes_str_ctrl),"}"),
          notes.align = "l",
          notes.append = FALSE,
          se = list(sqrt(diag(vcovHC(reg_list$lag,cluster = "group")))),
          column.sep.width = "1pt",
          keep = paste0("^",temp_names_lag,"$"),
          order = paste0("^",temp_names_lag,"$"),
          covariate.labels = temp_labels,
          omit.stat = c("f","adj.rsq"))

star_lag = sub("\\textit{Note:}  & \\multicolumn{1}{l}{\\parbox[t]{8cm}{",
                    "\\multicolumn{2}{l}{\\parbox[t]{10cm}{\\textit{Note:} ",
                    star_lag,fixed = TRUE)
reg_no_trend_formula = paste("Fin_synch ~ lag(bank_gdp,1) * Crises",
                             "lag(bank_gdp,1) * FD_tot",
                             "lag(bank_gdp,1) * Euro_both",
                             "lag(bank_gdp,1) * Common_Lang",
                             paste(control_vars, collapse = "+"),
                             sep = "+")


reg_list$no_trend = plm(formula = formula(reg_no_trend_formula),
                   data = fin_reg_df,
                   model = "within",effect = "twoways",
                   index = c("CountryPair","Date"))
star_no_trend = stargazer(reg_list$no_trend, header = FALSE,digits = 2,
          label = "no_trend",table.placement = "H",
          title = paste0("Financial synchronization and banking integration: ",
                         "specification with no trend"),
          dep.var.caption = "Fin cycles synch",
          model.numbers = FALSE,
          dep.var.labels.include = FALSE,
          notes = paste0("\\parbox[t]{8cm}{",
                         paste0("The table presents panel estimation that ",
                                "includes twoway fixed effects. ",
                                notes_str_ctrl),"}"),
          notes.align = "l",
          notes.append = FALSE,
          se = list(sqrt(diag(vcovHC(reg_list$no_trend,cluster = "group")))),
          keep = paste0("^",temp_names,"$"),order = paste0("^",temp_names,"$"),
          covariate.labels = temp_labels,
          omit.stat = c("f","adj.rsq"))

star_no_trend = sub("\\textit{Note:}  & \\multicolumn{1}{l}{\\parbox[t]{8cm}{",
                    "\\multicolumn{2}{l}{\\parbox[t]{10cm}{\\textit{Note:} ",
                    star_no_trend,fixed = TRUE)

\subsection{Structural breaks in timeseries}

The two main components of financial cycle are total credit and property prices. The financial cycle is then calculated as a simple average of the percentage changes of the two variables. Unfortunately both timeseries have missing values and are not available for all countries in all years. Due to this data availability constrain the simple average calculation takes both (credit and property price) data points where available and only one data point if the other is unavailable. This calculation can produce a "structural break" problem where part of the series is calculated based on say just credit changes while the other part averages credit and property price changes. From econometric point of view we can think of both series as measuring the financial cycle with some noise. If this is the case then this "structural break" leads to heteroscedasticity problem (part of the series is based on more accurate data relative to other part). To test for robustness I run two separate regression with only the credit (or the property price) synchronization as the depended variables. The results of credit or property price synchronization presented in tables \ref{credit} and \ref{house} respectively. The results are consistent with nosier estimation behavior. In both tables the signs of banking linkages and crises effect are aligned with the main results but the statistical significance is now parted : banking integration is significant in property price specification while the crises effect is significant in credit specification.

cat(star_comp_synch,sep = "\n")
cat(star_avg_synch,sep = "\n")
cat(star_house,sep = "\n")
cat(star_credit,sep = "\n")

\subsection{No trend}

In this section, I exclude the country-pair specific linear trend in order to test the robustness of my estimation. Table \ref{no_trend} presents the results.

cat(star_no_trend,sep = "\n")

\subsection{Lagged regression} To test for another specification issue I run a regression where every independend variable is lagged one period. This is done in order to align the lagged banking linkages (that were lagged to address endogeneity) and other variables. The results are presented in table \ref{lagged}, all the results are quantitatively similiar to the main results.

cat(star_lag,sep = "\n")


MichaelGurkov/FinSynch documentation built on Oct. 30, 2019, 9:27 p.m.