Junhui Cai, Dan Yang, Wu Zhu, Haipeng Shen, Linda Zhao
This file is produced by SuperCENT_README.Rmd and includes description
of the replication materials for “Network Regression and Supervised
Centrality Estimation”. All related materials are hosted in a GitHub
repository.
The folder structure is as follows.
-
code: contains code to reproduce the results for simulations and case study. The two main files are:
SuperCENT_case_study_trade_premium.Rmd: it contains descriptions and codes for the case study. The corresponding reportSuperCENT_case_study_trade_premium.pdfis generated bySuperCENT_case_study_trade_premium.Rmdusing RMarkdown.SuperCENT_empirical_network.Rmd: it contains descriptions and codes to reproduce the plots for the four empirical networks: (A) global trade network, (B) innovation network, (C) production network, and (D) equity network. The corresponding reportSuperCENT_empirical_network.pdfis generated bySuperCENT_empirical_network.Rmdusing RMarkdown.SuperCENT_simulation.Rmd: it contains descriptions and codes for the simulation results. The corresponding reportSuperCENT_simulation.pdfis generated bySuperCENT_simulation.Rmdusing RMarkdown.- Details instructions are within the files.
-
data_empirical_network:
trade_data_sub.csv: Trade networknaics3_uspc_naics3_W_matrix.csv: Innovation networkIO_naics3_1997_2018_naics07.xlsx: Production networkequity_network_svd.csv: Equity network is proprietary data but we provide the top 50 singular values
-
data_trade_premium:
FX.csv: risk premium constructed based on Richmond, R. J. (2019). “Trade network centrality and currency risk premia.” The Journal of Finance, 74(3), 1315-1361. See instructions here.real_gdp_long.csv: GDP data generated usingconstruct_gdp_data.R.trade_data_sub.csv: bilateral trade data generated byconstruct_trade_data.R.
-
output_simulation: contains the simulation results. Please download from Dropbox.
-
output_trade_premium: contains the results for the case study.
In order to replicate the results, one needs to use R and install all the relevant packages.
Install our SuperCENT package on github as follows.
if(!require("devtools")) install.packages("devtools")
if(!require("SuperCENT")) devtools::install_github("cccfran/SuperCENT")We use pacman package to manage packages. Run the following chunk to
install all the packages needed.
if (!require("pacman")) install.packages("pacman")
pacman::p_load(data.table, matrixStats, dplyr, ggplot2, igraph,
latex2exp, tidyverse,
irlba, xtable, stargazer, circlize, kableExtra,
ggpubr, grid, gridExtra, gtable, facetscales)The following table lists all the tables and figures of the simulations and case study.
- Figure 1
- Code SuperCENT_simulation.Rmd
- Output output_simulation/plot/1745349_epsy-2_small_exmaple.pdf
- Figures 2-9, S3-S22
- Code SuperCENT_simulation.Rmd
- Output output_simulation/plot/
- Figures 10-12
- Code SuperCENT_case_study_trade_premium.Rmd
- Output output_trade_premium/plot
- Figure S12
- Code SuperCENT_empirical_network.Rmd
- Table II
- Code SuperCENT_case_study_trade_premium.Rmd
- Output output_trade_premium/10_year_return_gap5.tex
- Table III
- Code SuperCENT_case_study_trade_premium.Rmd
- Output output_trade_premium/trade_premium_2008_gap10_miter1000.tex
Richmond, R. J. (2019). “Trade network centrality and currency risk premia.” The Journal of Finance, 74(3), 1315-1361.