Journal of International Economics · 2022 · 10.1016/j.jinteco.2022.103583

Can sticky portfolios explain international capital flows and asset prices?

Philippe Bacchetta; Margaret Davenport; Eric van Wincoop

Review history

Received 20 Aug 2021 → revised → accepted 4.9 months later; online 0.9 months after acceptance.
Received: 20 Aug 2021Revised: 6 Jan 2022Accepted: 16 Jan 2022First online: 12 Feb 2022
Received → accepted. Journal of International Economics, papers printed 2020–2022: median 17.9 months (middle half 11.7–23.2), 267 papers measured. This paper: 4.9 months, shorter than the median.
Acceptance → first online. Journal of International Economics, papers printed 2020–2022: median 0.3 months (middle half 0.2–0.6), 266 papers with an online date. This paper: 0.9 months, longer than the median.
Dates as printed on the paper's first page; read from the paper's text, not from publisher metadata. Journal medians leave out: under 14 days, out of order, special issue / invited, implausible year — the same papers /review-times leaves out.

The research recipe, read from the replication code

mendeley · package · stata, matlab
1980–2018
sample period in the code
76
keep/drop statements
0
winsorizations
22
missing-data rules
0
de-duplications
3
distinct estimations
Sample period in the code: the window the code writes most often — assetreturn.do:117 and 3 other files; other windows in the code: 1969–2018, 1970–2018, 1979–2018, 1995–2018.
These tiles count distinct estimations (one per command, method, inference, fixed effects and file) and keep/drop statements. "How the code gets from data to results" below counts every estimating statement (8) and keep/drop statements plus winsorized variables (76).
1 · Data and structure
Databases read: none detected
Panel declared as: ifs × qdate (quarterly); ifs × year (annual); countrycode × qdate (quarterly); ifs × ydate (annual)
2 · How the sample is built
  • keep time period ×40
  • keep category value ×27
  • keep geography ×2
  • keep missing data ×2
  • drop category value ×1
  • drop missing data ×1
  • keep observation position ×1
Reshaping: reshape long/wide ×13; collapse to a coarser unit ×5; fill gaps in the panel ×4
3 · Design and validation
Identification: —
Standard measures: Log Total Assets
4 · What it estimates
CommandMethodFixed effects absorbedInferenceFile
reg
reg ExR l.ExR if inrange(qdate,tq(1980q1),tq(2018q4))
ols default assetreturn.do
reg
reg lnAt qdate
ols default theta_tfp_moments.do
reg
reg lnAROW qdate, r
ols robust theta_tfp_moments.do
5 · What it produces
0 table files and 1 figure files (? 1).
How the code gets from data to results own page
13
scripts
65
input files
8
file hand-offs
53
merges
76
sample steps
8
estimations

1 · Data in — files the code reads and no script of the package writes

  • $userpath/DATA/PWT/pwt100.xlsx Excel
    theta_tfp_setup.do:72
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 72 import excel "$userpath/DATA/PWT/pwt100.xlsx", clear firstrow sheet("Data")
Other input files 64 files
  • $userpath/DATA/_NA_QTR/QNA_ARCHIVE_gdp.csv CSV · read by 4 scripts
    assetreturn_setup.do:314
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 314 insheet using "$userpath/DATA/_NA_QTR/QNA_ARCHIVE_gdp.csv", clear
  • epsaA1.txt text · read by 3 scripts
    main.m:51
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 51 load('epsaA1.txt');
  • epsaD1.txt text · read by 3 scripts
    main.m:50
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 50 load('epsaD1.txt');
  • epsbetaA1.txt text · read by 3 scripts
    main.m:55
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 55 load('epsbetaA1.txt');
  • epsbetaD1.txt text · read by 3 scripts
    main.m:54
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 54 load('epsbetaD1.txt');
  • epsmA1.txt text · read by 3 scripts
    main.m:57
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 57 load('epsmA1.txt');
  • epsmD1.txt text · read by 3 scripts
    main.m:56
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 56 load('epsmD1.txt');
  • epstau1.txt text · read by 3 scripts
    main.m:49
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 49 load('epstau1.txt');
56 more
  • epsthetaA1.txt text · read by 3 scripts
    main.m:53
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 53 load('epsthetaA1.txt');
  • epsthetaD1.txt text · read by 3 scripts
    main.m:52
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 52 load('epsthetaD1.txt');
  • xxnew1b.txt text · read by 2 scripts
    maina.m:10
    fwhjm37ddn-1/BDvWreplication_final/matlab/maina.m, line 10 load('xxnew1b.txt');
  • xxnew1c.txt text · read by 2 scripts
    maina.m:11
    fwhjm37ddn-1/BDvWreplication_final/matlab/maina.m, line 11 load('xxnew1c.txt');
  • $userpath/DATA/_CPI/cpi_ifs.xlsx Excel
    assetreturn_setup.do:167
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 167 import excel "$userpath/DATA/_CPI/cpi_ifs.xlsx", cellrange(A2) clear firstrow
  • $userpath/DATA/_EXCHANGERATE/exchange_rates.csv CSV
    assetreturn_setup.do:370
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 370 import delimited "$userpath/DATA/_EXCHANGERATE/exchange_rates.csv", clear
  • $userpath/DATA/_IFS/ifs_iso.dta Stata
    assetreturn_setup.do:404
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 404 merge m:1 iso using "$userpath/DATA/_IFS/ifs_iso.dta"
  • $userpath/DATA/_IMF_CAPFLOWS/QNAgdp_expenditure_domestic.xlsx Excel
    macro_setup.do:3
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do, line 3 import excel "$userpath/DATA/_IMF_CAPFLOWS/QNAgdp_expenditure_domestic.xlsx", clear cellrange(A2) firstrow
  • $userpath/DATA/_MSCI/equity_indices.xlsx Excel
    assetreturn_setup.do:5
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 5 import excel "$userpath/DATA/_MSCI/equity_indices.xlsx", clear sheet("unitedstates") cellrange(A6) firstrow
  • $userpath/DATA/_NA_QTR/QNA_ARCHIVE_cab.csv CSV
    macro_setup.do:26
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do, line 26 insheet using "$userpath/DATA/_NA_QTR/QNA_ARCHIVE_cab.csv", clear
  • $userpath/DATA/_USFOF/BOGZ1LM154022005Q.csv CSV
    2calibration.do:98
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 98 insheet using "$userpath/DATA/_USFOF/BOGZ1LM154022005Q.csv", clear
  • $userpath/DATA/_USFOF/HNOCEA.csv CSV
    2calibration.do:116
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 116 insheet using "$userpath/DATA/_USFOF/HNOCEA.csv", clear
  • $userpath/DATA/_USFOF/HNOMFSA.csv CSV
    2calibration.do:134
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 134 insheet using "$userpath/DATA/_USFOF/HNOMFSA.csv", clear
  • $userpath/DATA/_USFOF/TFAABSHNO.csv CSV
    2calibration.do:63
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 63 insheet using "$userpath/DATA/_USFOF/TFAABSHNO.csv", clear
  • $userpath/DATA/_USFOF/TLBSHNO.csv CSV
    2calibration.do:80
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 80 insheet using "$userpath/DATA/_USFOF/TLBSHNO.csv", clear
  • $userpath/DATA/_USTFP/COFC.xls Excel
    theta_tfp_setup.do:247
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 247 import excel "$userpath/DATA/_USTFP/COFC.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDI.xls Excel
    theta_tfp_setup.do:132
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 132 import excel "$userpath/DATA/_USTFP/GDI.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDICOMP.xls Excel
    theta_tfp_setup.do:203
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 203 import excel "$userpath/DATA/_USTFP/GDICOMP.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDINOS_private.xls Excel
    theta_tfp_setup.do:177
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 177 import excel "$userpath/DATA/_USTFP/GDINOS_private.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDINOSMI.xls Excel
    theta_tfp_setup.do:154
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 154 import excel "$userpath/DATA/_USTFP/GDINOSMI.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDINOSMI_private.xls Excel
    theta_tfp_setup.do:165
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 165 import excel "$userpath/DATA/_USTFP/GDINOSMI_private.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDIOSGOV.xls Excel
    theta_tfp_setup.do:190
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 190 import excel "$userpath/DATA/_USTFP/GDIOSGOV.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDISUBS.xls Excel
    theta_tfp_setup.do:225
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 225 import excel "$userpath/DATA/_USTFP/GDISUBS.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDITAXES.xls Excel
    theta_tfp_setup.do:214
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 214 import excel "$userpath/DATA/_USTFP/GDITAXES.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/GDIWAGES.xls Excel
    theta_tfp_setup.do:143
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 143 import excel "$userpath/DATA/_USTFP/GDIWAGES.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/_USTFP/PROPINC.xls Excel
    theta_tfp_setup.do:236
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 236 import excel "$userpath/DATA/_USTFP/PROPINC.xls", clear cellrange(A11) firstrow
  • $userpath/DATA/BT/bertaut_tryon_claims_thru2011.csv CSV
    2calibration.do:6
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 6 insheet using "$userpath/DATA/BT/bertaut_tryon_claims_thru2011.csv", clear
  • $userpath/DATA/BT/MS_BT_extended.csv CSV
    2calibration.do:20
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 20 insheet using "$userpath/DATA/BT/MS_BT_extended.csv", clear
  • $userpath/DATA/Marketcap/corpbondmc.csv CSV
    assetreturn_setup.do:424
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 424 insheet using "$userpath/DATA/Marketcap/corpbondmc.csv", clear
  • $userpath/DATA/Marketcap/stkmarketgdp.csv CSV
    assetreturn_setup.do:454
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 454 insheet using "$userpath/DATA/Marketcap/stkmarketgdp.csv", names clear
  • $userpath/DATA/OECD_EMP/111_total.csv CSV
    theta_tfp_setup.do:464
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 464 insheet using "$userpath/DATA/OECD_EMP/111_total.csv", clear
  • $userpath/DATA/OECD_EMP/112_total.csv CSV
    theta_tfp_setup.do:478
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 478 insheet using "$userpath/DATA/OECD_EMP/112_total.csv", clear
  • $userpath/DATA/OECD_EMP/132_total.csv CSV
    theta_tfp_setup.do:492
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 492 insheet using "$userpath/DATA/OECD_EMP/132_total.csv", clear
  • $userpath/DATA/OECD_EMP/132_totalindex.csv CSV
    theta_tfp_setup.do:505
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 505 insheet using "$userpath/DATA/OECD_EMP/132_totalindex.csv", clear
  • $userpath/DATA/OECD_EMP/134_total.csv CSV
    theta_tfp_setup.do:525
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 525 insheet using "$userpath/DATA/OECD_EMP/134_total.csv", clear
  • $userpath/DATA/OECD_EMP/136_total.csv CSV
    theta_tfp_setup.do:539
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 539 insheet using "$userpath/DATA/OECD_EMP/136_total.csv", clear
  • $userpath/DATA/OECD_EMP/156_total.csv CSV
    theta_tfp_setup.do:553
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 553 insheet using "$userpath/DATA/OECD_EMP/156_total.csv", clear
  • $userpath/DATA/OECD_EMP/158_total.csv CSV
    theta_tfp_setup.do:566
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 566 insheet using "$userpath/DATA/OECD_EMP/158_total.csv", clear
  • $userpath/DATA/SNA/SNA_TABLE1gdp.csv CSV
    theta_tfp_setup.do:303
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 303 insheet using "$userpath/DATA/SNA/SNA_TABLE1gdp.csv", clear
  • $userpath/DATA/SNA/SNA_TABLE2_10032021161741311.csv CSV
    macro_moments.do:7
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_moments.do, line 7 insheet using "$userpath/DATA/SNA/SNA_TABLE2_10032021161741311.csv", clear
  • $userpath/DATA/SNA/SNA_TABLE13.csv CSV
    theta_tfp_setup.do:328
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 328 insheet using "$userpath/DATA/SNA/SNA_TABLE13.csv", clear
  • $userpath/DATA_ESTIM/corpbonds.dta Stata
    assetreturn.do:10
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 10 merge 1:1 ifs qdate using "$userpath/DATA_ESTIM/corpbonds.dta"
  • $userpath/DATA_ESTIM/currentaccountsa.dta Stata
    macro_setup.do:154
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do, line 154 use "$userpath/DATA_ESTIM/currentaccountsa.dta", replace
  • xxnew1a.txt text
    main.m:62
    fwhjm37ddn-1/BDvWreplication_final/matlab/main.m, line 62 load('xxnew1a.txt');
  • xxnew1bbb.txt text
    taushocks6.m:11
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 11 load('xxnew1bbb.txt');% Table 2, column (iv): psi=0
  • xxnew2a.txt text
    taushocks6.m:8
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 8 load('xxnew2a.txt'); % Table 2, psi=1, bh=1
  • xxnew2c.txt text
    taushocks6.m:10
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 10 load('xxnew2c.txt'); % Table 2, psi=3, bh=1
  • xxnew3a.txt text
    taushocks6.m:13
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 13 load('xxnew3a.txt'); % psi=1, bh=0, gam=100
  • xxnew3b.txt text
    taushocks6.m:14
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 14 load('xxnew3b.txt'); % psi=0, bh=0, gam=100
  • xxnew3c.txt text
    taushocks6.m:15
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 15 load('xxnew3c.txt'); % psi=3, bh=0, gam=100
  • xxnew4a.txt text
    taushocks6.m:16
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 16 load('xxnew4a.txt'); % psi=1, bh=0, rhotau=0.95
  • xxnew4b.txt text
    taushocks6.m:17
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 17 load('xxnew4b.txt'); % psi=0, bh=0, rhotau=0.95
  • xxnew4c.txt text
    taushocks6.m:18
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 18 load('xxnew4c.txt'); % psi=3, bh=0, rhotau=0.95
  • xxnew5a.txt text
    taushocks6.m:19
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 19 load('xxnew5a.txt'); % psi=1, bh=0, rhotau=0.995
  • xxnew5b.txt text
    taushocks6.m:20
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 20 load('xxnew5b.txt'); % psi=0, bh=0, rhotau=0.995
  • xxnew5c.txt text
    taushocks6.m:21
    fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 21 load('xxnew5c.txt'); % psi=3, bh=0, rhotau=0.995

2 · The file pipeline — which script writes which file that a later script reads

13 scripts, in run order for the master script 0main.do and the 8 scripts it runs (directly or through each other); the other 4 are not run by a master script and follow in file-name order; 8 hand-offs through 12 intermediate files; 7 files written and never read back (outputs).

fwhjm37ddn-1/BDvWreplication_final/matlab/main.m → fwhjm37ddn-1/BDvWreplication_final/matlab/maina.m: xxnew1a.txtfwhjm37ddn-1/BDvWreplication_final/matlab/main.m → fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m: xxnew1a.txtfwhjm37ddn-1/BDvWreplication_final/matlab/maina.m → fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m: xxnew1ccc.txtfwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do → fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do: MSCI.dta, b1gevpvobarsa.dta, cpi.dta, exchangerate.dta, mcbondshares.dtafwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do → fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do: exchangerate.dtafwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do → fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do: UStheta.dta, capitalstockpwt.dta, employment.dta, thetas.dtafwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do → fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do: assetprices.dtafwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do → fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do: exchangerate.dta fwhjm37ddn-1/BDvWreplication_final/matlab/solab.m 1. solab.m fwhjm37ddn-1/BDvWreplication_final/0main.do 2. 0main.do fwhjm37ddn-1/BDvWreplication_final/1moments.do 3. 1moments.do fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do · reads 7 input files 4. assetreturn_setup.do fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do · reads 1 input files · 1 estimation 5. assetreturn.do 1 est.fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_moments.do · reads 1 input files 6. macro_moments.do fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do · reads 23 input files 7. theta_tfp_setup.do fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do · reads 1 input files · 7 estimations 8. theta_tfp_moments.do 7 est.fwhjm37ddn-1/BDvWreplication_final/2calibration.do · reads 7 input files 9. 2calibration.do fwhjm37ddn-1/BDvWreplication_final/matlab/main.m · reads 10 input files 10. main.m fwhjm37ddn-1/BDvWreplication_final/matlab/maina.m · reads 11 input files 11. maina.m fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m · reads 23 input files 12. taushocks6.m fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do · reads 4 input files 13. macro_setup.do
  1. 1.fwhjm37ddn-1/BDvWreplication_final/matlab/solab.m setup file sourced by 3 scripts
  2. 2.fwhjm37ddn-1/BDvWreplication_final/0main.do master script
  3. 3.fwhjm37ddn-1/BDvWreplication_final/1moments.do run by fwhjm37ddn-1/BDvWreplication_final/0main.do line 21
  4. 4.fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do run by fwhjm37ddn-1/BDvWreplication_final/1moments.do line 6 reads 7 input files · 8 merges ·
    writes MSCI.dta → read by assetreturn.do
    writes b1gevpvobarsa.dta → read by assetreturn.do
    writes cpi.dta → read by assetreturn.do
    writes exchangerate.dta → read by assetreturn.do, theta_tfp_setup.do, macro_setup.do
    writes mcbondshares.dta → read by assetreturn.do
    writes (not read again): b1gecqrsa.dta
  5. 5.fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do run by fwhjm37ddn-1/BDvWreplication_final/1moments.do line 7 reads 1 input file · 6 merges · 1 estimation
    reads what assetreturn_setup.do wrote
    writes assetprices.dta → read by theta_tfp_moments.do
    writes (not read again): bondprices.dta, qtg7.dta, rts.dta
  6. 6.fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_moments.do run by fwhjm37ddn-1/BDvWreplication_final/1moments.do line 11 reads 1 input file ·
  7. 7.fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do run by fwhjm37ddn-1/BDvWreplication_final/1moments.do line 15 reads 23 input files · 21 merges ·
    reads what assetreturn_setup.do wrote
    writes UStheta.dta → read by theta_tfp_moments.do
    writes capitalstockpwt.dta → read by theta_tfp_moments.do
    writes employment.dta → read by theta_tfp_moments.do
    writes thetas.dta → read by theta_tfp_moments.do
  8. 8.fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do run by fwhjm37ddn-1/BDvWreplication_final/1moments.do line 16 reads 1 input file · 8 merges · 7 estimations
    reads what assetreturn.do, theta_tfp_setup.do wrote
    writes (not read again): divg7.dta
  9. 9.fwhjm37ddn-1/BDvWreplication_final/2calibration.do run by fwhjm37ddn-1/BDvWreplication_final/0main.do line 25 reads 7 input files · 6 merges ·
  10. 10.fwhjm37ddn-1/BDvWreplication_final/matlab/main.m reads 10 input files ·
    writes xxnew1a.txt → read by maina.m, taushocks6.m
  11. 11.fwhjm37ddn-1/BDvWreplication_final/matlab/maina.m reads 11 input files ·
    reads what main.m wrote
    writes xxnew1ccc.txt → read by taushocks6.m
  12. 12.fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m reads 23 input files ·
    reads what main.m, maina.m wrote
  13. 13.fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do reads 4 input files · 4 merges ·
    reads what assetreturn_setup.do wrote
    writes (not read again): IMFgdp.dta, macroaggregatesOECD.dta

3 · Merges — 53 joins, 40 followed by a check of the merge result

JoinsHowOn keysCheck that followsWhere
equity_indices ← temp1 merge 1:1 qdate ifs drop _merge
assetreturn_setup.do:41
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 41 merge 1:1 qdate ifs using `temp1'
equity_indices ← temp1 merge 1:1 qdate ifs drop _merge
assetreturn_setup.do:63
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 63 merge 1:1 qdate ifs using `temp1'
equity_indices ← temp1 merge 1:1 qdate ifs drop _merge
assetreturn_setup.do:85
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 85 merge 1:1 qdate ifs using `temp1'
equity_indices ← temp1 merge 1:1 qdate ifs drop _merge
assetreturn_setup.do:107
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 107 merge 1:1 qdate ifs using `temp1'
equity_indices ← temp1 merge 1:1 qdate ifs drop _merge
assetreturn_setup.do:128
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 128 merge 1:1 qdate ifs using `temp1'
equity_indices ← temp1 merge 1:1 qdate ifs drop _merge
assetreturn_setup.do:149
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 149 merge 1:1 qdate ifs using `temp1'
exchange_rates ← ifs_iso merge m:1 iso drop _merge
assetreturn_setup.do:404
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 404 merge m:1 iso using "$userpath/DATA/_IFS/ifs_iso.dta"
stkmarketgdp ← temp1 merge 1:m ifs year drop _merge
assetreturn_setup.do:476
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 476 merge 1:m ifs year using `temp1'
msci ← cpi merge 1:1 ifs qdate drop _merge
assetreturn.do:7
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 7 merge 1:1 ifs qdate using "$userpath/DATA_ESTIM/cpi.dta"
msci ← corpbonds merge 1:1 ifs qdate drop if _merge!=3
assetreturn.do:10
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 10 merge 1:1 ifs qdate using "$userpath/DATA_ESTIM/corpbonds.dta"
msci ← b1gevpvobarsa merge 1:1 ifs qdate drop _merge
assetreturn.do:13
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 13 merge 1:1 ifs qdate using "$userpath/DATA_ESTIM/b1gevpvobarsa.dta"
msci ← exchangerate merge 1:1 ifs qdate drop _merge
assetreturn.do:15
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 15 merge 1:1 ifs qdate using "$userpath/DATA_ESTIM/exchangerate.dta"

4 · The sample — 76 keep/drop steps, 0 variables winsorized or trimmed

Filters, by kind
time period ×40
  • keep if inrange(qdate,tq(1969q1),tq(2018q4))
    assetreturn_setup.do:412
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 412 keep if inrange(qdate,tq(1969q1),tq(2018q4))
  • keep if inrange(year,1979,2018)
    assetreturn_setup.do:474
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 474 keep if inrange(year,1979,2018)
  • keep if inrange(qdate,tq(1979q1),tq(2018q4))
    assetreturn_setup.do:484
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 484 keep if inrange(qdate,tq(1979q1),tq(2018q4))
  • keep if inrange(qdate,tq(1979q1),tq(2018q4))
    assetreturn.do:19
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 19 keep if inrange(qdate,tq(1979q1),tq(2018q4))
  • keep if qdate>=tq(1979q1)
    assetreturn.do:23
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 23 keep if qdate>=tq(1979q1)
  • keep if inrange(qdate,tq(1980q1),tq(2018q3))
    assetreturn.do:117
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 117 keep if inrange(qdate,tq(1980q1),tq(2018q3))
  • keep if qdate>=tq(1980q1)
    assetreturn.do:155
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 155 keep if qdate>=tq(1980q1)
  • keep if inrange(ydate,1980,2018)
    macro_moments.do:42
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_moments.do, line 42 keep if inrange(ydate,1980,2018)
  • first 8 of 40
category values ×28
  • keep if inlist(m,3,6,9,12)
    assetreturn_setup.do:10
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 10 keep if inlist(m,3,6,9,12)
  • keep if inlist(m,3,6,9,12)
    assetreturn_setup.do:29
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 29 keep if inlist(m,3,6,9,12)
  • keep if inlist(m,3,6,9,12)
    assetreturn_setup.do:51
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 51 keep if inlist(m,3,6,9,12)
  • keep if inlist(m,3,6,9,12)
    assetreturn_setup.do:74
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 74 keep if inlist(m,3,6,9,12)
  • keep if inlist(m,3,6,9,12)
    assetreturn_setup.do:96
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 96 keep if inlist(m,3,6,9,12)
  • keep if inlist(m,3,6,9,12)
    assetreturn_setup.do:117
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 117 keep if inlist(m,3,6,9,12)
  • keep if inlist(m,3,6,9,12)
    assetreturn_setup.do:138
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 138 keep if inlist(m,3,6,9,12)
  • keep if subject=="B1_GE" & measure=="VPVOBARSA"
    assetreturn_setup.do:331
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 331 keep if subject=="B1_GE" & measure=="VPVOBARSA"
  • first 8 of 28
geography ×2
  • keep if inlist(countrycode,"CAN","FRA","DEU","ITA","USA","GBR","JPN")
    theta_tfp_setup.do:74
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 74 keep if inlist(countrycode,"CAN","FRA","DEU","ITA","USA","GBR","JPN")
  • keep if inlist(countrycode,10804,11002,11509,13005,29998,42609,79995,99996)
    2calibration.do:32
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 32 keep if inlist(countrycode,10804,11002,11509,13005,29998,42609,79995,99996)
row position (_n, first / last row) ×1
  • keep if _n>16
    assetreturn_setup.do:434
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 434 keep if _n>16
missing values ×3
  • drop if ifs ==.
    assetreturn_setup.do:406
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 406 drop if ifs ==.
  • keep if !mi(gdp)
    assetreturn_setup.do:471
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 471 keep if !mi(gdp)
  • keep if !mi(bnd_share)
    assetreturn.do:85
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 85 keep if !mi(bnd_share)
drops after a merge (_merge) ×2
  • drop if _merge!=3
    assetreturn.do:11
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 11 drop if _merge!=3
  • keep if _merge==3
    2calibration.do:151
    fwhjm37ddn-1/BDvWreplication_final/2calibration.do, line 151 keep if _merge==3
Outliers

No winsorizing or trimming recorded.

Missing values
filled with a value ×17
  • bnd_share → l.bnd_share
    assetreturn.do:26
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 26 replace bnd_share = l.bnd_share if mi(bnd_share)
  • bondshare → l.bondshare
    assetreturn_setup.do:487
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 487 replace bondshare=l.bondshare if mi(bondshare)
  • bondshare → temps
    assetreturn_setup.do:488
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 488 replace bondshare=temps if mi(bondshare)
  • dep → _K1S1_CQRSA
    macro_setup.do:92
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do, line 92 replace dep = _K1S1_CQRSA if mi(dep)
  • dep → _K1_CARSA/4
    macro_setup.do:93
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do, line 93 replace dep = _K1_CARSA/4 if mi(dep)
  • dep → _K1_CQRSA
    macro_setup.do:94
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do, line 94 replace dep = _K1_CQRSA if mi(dep)
interpolated / carried forward ×4
  • macro_setup.do:50
    fwhjm37ddn-1/BDvWreplication_final/subfiles/macro_setup.do, line 50 tsfill , full
  • theta_tfp_setup.do:324
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 324 tsfill , full
  • theta_tfp_setup.do:348
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 348 tsfill , full
  • theta_tfp_setup.do:451
    fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 451 tsfill
dropped ×1
  • assetreturn_setup.do:406
    fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 406 drop if ifs ==.

5 · Key variables — what enters the models, and where the code builds it

Standard measures computed here: Log Total Assets (lnAt
theta_tfp_moments.do:113
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 113 qui gen lnAt=ln(At)
)
VariableUsed in models asBuilt by
ExR outcome in 1, regressor in 1
ExR = ARUS-ARROW (gen)
assetreturn.do:177
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 177 g ExR = ARUS-ARROW
aF outcome in 1, regressor in 1
aF = predict(r) (predict)
theta_tfp_moments.do:247
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 247 predict aF, r
aH outcome in 1, regressor in 1
aH = predict(r) (predict)
theta_tfp_moments.do:117
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 117 predict aH,r
aH = predict(r) (predict)
theta_tfp_moments.do:245
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 245 predict aH, r
theta outcome in 1, regressor in 1
theta = (nos_nipa + (1-mt_nipa)*mi_nipa + cfc_nipa)/ynet_nipa (gen)
theta_tfp_setup.do:272
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_setup.do, line 272 qui gen theta = (nos_nipa + (1-mt_nipa)*mi_nipa + cfc_nipa)/ynet_nipa
theta = thetaUS (gen)
theta_tfp_moments.do:87
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 87 qui gen theta = thetaUS
theta = thetat (gen)
theta_tfp_moments.do:140
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 140 qui gen theta = thetat
thetaHnipa outcome in 1, regressor in 1
thetaHnipa = theta (rename)
theta_tfp_moments.do:122
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 122 rename theta thetaHnipa
lnAROW outcome in 1
lnAROW = ln(A_ROW) (gen)
theta_tfp_moments.do:242
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 242 qui gen lnAROW=ln(A_ROW)
lnAUS outcome in 1
lnAUS = ln(A_US) (gen)
theta_tfp_moments.do:241
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 241 qui gen lnAUS=ln(A_US)
lnAt outcome in 1
lnAt = ln(At) (gen)
theta_tfp_moments.do:113
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 113 qui gen lnAt=ln(At)
qdate regressor in 3
qdate = yq(y,q) (gen)
assetreturn_setup.do:11
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 11 qui gen qdate = yq(y,q)
qdate = yq(y,q) (gen)
assetreturn_setup.do:30
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 30 qui gen qdate = yq(y,q)
qdate = yq(y,q) (gen)
assetreturn_setup.do:52
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn_setup.do, line 52 qui gen qdate = yq(y,q)
+41 more statements set it

6 · Models, by the table or figure they feed — 8 estimations, 0 traced into 0 exhibits

Estimations not traced to a table or figure · 8
CommandOutcomeRegressors Fixed effectsStandard errorsWhere
reg
ols
ExR l.ExR — default
assetreturn.do:193
fwhjm37ddn-1/BDvWreplication_final/subfiles/assetreturn.do, line 193 reg ExR l.ExR if inrange(qdate,tq(1980q1),tq(2018q4))
reg
ols
lnAt qdate — default
theta_tfp_moments.do:116
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 116 reg lnAt qdate
reg
ols
theta l.theta — default
theta_tfp_moments.do:119
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 119 reg theta l.theta
reg
ols
lnAUS qdate — default
theta_tfp_moments.do:244
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 244 reg lnAUS qdate
reg
ols
lnAROW qdate — robust
theta_tfp_moments.do:246
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 246 reg lnAROW qdate, r
reg
ols
aH l.aH — default
theta_tfp_moments.do:253
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 253 reg aH l.aH
reg
ols
aF l.aF — default
theta_tfp_moments.do:254
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 254 reg aF l.aF
reg
ols
thetaHnipa l.thetaHnipa — default
theta_tfp_moments.do:270
fwhjm37ddn-1/BDvWreplication_final/subfiles/theta_tfp_moments.do, line 270 reg thetaHnipa l.thetaHnipa
Tables and figures the code writes:

7 · Figures: how each is drawn — 6 figures in the code (command, layers, options, the file it is saved to)

line 6
commandlayersvariables optionssaved aswhere
plot
line
line y adjust1 x x(1:40) legend 'shock', 'return', 'rebalancing', 'growth', 'I', 'S' not saved
taushocks6.m:609
fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 609 figure
–611
plot
line
line + line + line + line + line + line + line + line y qD(1:hor,1)*stantau, zA(1:hor,1)*stantau, er(2:hor+1,1)*stantau, ca(1:hor,1)*stantau, sH(1:hor,1)*stantau, iH(1:hor,1)*stantau, +2 more x x title qD (tauD shock) | zA | E(er) | CA/Y | S/Y | I/Y | S/Y investors | S/Y households · xtitle quarters | quarters | quarters | quarters | quarters | quarters | quarters | quarters · panels 2×4 not saved
taushocks6.m:698
fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 698 figure;
–730
plot
line
line + line + line + line + line + line + line + line y qD(1:hor,2)*stanthetaD, zA(1:hor,2)*stanthetaD, er(2:hor+1,2)*stanthetaD, ca(1:hor,2)*stanthetaD, sH(1:hor,2)*stanthetaD, iH(1:hor,2)*stanthetaD, +2 more x x title qD (thetaD shock) | zA | E(er) | CA/Y | S/Y | I/Y | S/Y investors | S/Y households · xtitle quarters | quarters | quarters | quarters | quarters | quarters | quarters | quarters · panels 2×4 not saved
taushocks6.m:734
fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 734 figure;
–766
plot
line
line + line + line + line + line + line + line + line y qD(1:hor,3)*stanaD, zA(1:hor,3)*stanaD, er(2:hor+1,3)*stanaD, ca(1:hor,3)*stanaD, sH(1:hor,3)*stanaD, iH(1:hor,3)*stanaD, +2 more x x title qD (aD shock) | zA | E(er) | CA/Y | S/Y | I/Y | S/Y investors | S/Y households · xtitle quarters | quarters | quarters | quarters | quarters | quarters | quarters | quarters · panels 2×4 not saved
taushocks6.m:770
fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 770 figure;
–802
plot
line
line + line + line + line + line + line + line + line y qD(1:hor,4)*stanbetaD, zA(1:hor,4)*stanbetaD, er(2:hor+1,4)*stanbetaD, [ca(1:hor,4)*stanbetaD 0.5*ky*(1/beta)*betaD(1:hor,4)*stanbetaD], sH(1:hor,4)*stanbetaD, iH(1:hor,4)*stanbetaD, +2 more x x title qD (betaD shock) | zA | E(er) | CA/Y | S/Y | I/Y | S/Y investors | S/Y households · xtitle quarters | quarters | quarters | quarters | quarters | quarters | quarters | quarters · panels 2×4 not saved
taushocks6.m:806
fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 806 figure;
–838
plot
line
line + line + line + line + line + line + line + line y qD(1:hor,5)*stanmD, zA(1:hor,5)*stanmD, er(2:hor+1,5)*stanmD, [ca(1:hor,5)*stanmD 0.5*ky*(1/zeta)*mD(1:hor,5)*stanmD], sH(1:hor,5)*stanmD, [iH(1:hor,5)*stanmD -0.5*ky*(1/zeta)*mD(1:hor,5)*stanmD], +2 more x x title qD (mD shock) | zA | E(er) | CA/Y | S/Y | I/Y | S/Y investors | S/Y households · xtitle quarters | quarters | quarters | quarters | quarters | quarters | quarters | quarters · panels 2×4 not saved
taushocks6.m:843
fwhjm37ddn-1/BDvWreplication_final/matlab/taushocks6.m, line 843 figure;
–875