Replication package 199 · dataverse · 2025 · open the deposit

How the code gets from data to results

Replication Code and Data for Bank Debt, Mutual Fund Equity, and Swing Pricing in Liquidity Provision

Code for: Bank Debt, Mutual Fund Equity, and Swing Pricing in Liquidity Provision Review of Financial Studies 2025

10
scripts
23
input files
6
file hand-offs
17
merges
37
sample steps
13
estimations

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

Other input files 23 files
  • data_input/bankassetsliab.dta Stata · read by 2 scripts
    code_2_crosssectionbank.do:8
    code_2_crosssectionbank.do, line 8 use "data_input/bankassetsliab.dta", clear
  • $folder/data_input/aggbondfundasset.dta Stata
    code_6_aggregate_trend.do:8
    code_6_aggregate_trend.do, line 8 use "$folder/data_input/aggbondfundasset.dta", clear
  • $folder/data_input/bank_deposits Stata
    code_6_aggregate_trend.do:14
    code_6_aggregate_trend.do, line 14 merge 1:1 tm using "$folder/data_input/bank_deposits"
  • $folder/data_input/bank_flow.dta Stata
    code_0_bank_lpi.do:83
    code_0_bank_lpi.do, line 83 merge 1:1 tq rssd using "$folder/data_input/bank_flow.dta"
  • $folder/data_input/corpbond_IRC_HY Stata
    code_0_fund_lpi.do:19
    code_0_fund_lpi.do, line 19 merge m:1 yq using "$folder/data_input/corpbond_IRC_HY"
  • $folder/data_input/haircut_others_plot_data.dta Stata
    code_7_haircut_plot.do:44
    code_7_haircut_plot.do, line 44 use "$folder/data_input/haircut_others_plot_data.dta", clear
  • $folder/data_input/haircut_plot_data.dta Stata
    code_7_haircut_plot.do:9
    code_7_haircut_plot.do, line 9 use "$folder/data_input/haircut_plot_data.dta", clear
  • $folder/data_input/mf_prelmi_cleaned_2011_2017.dta Stata
    code_0_fund_lpi.do:13
    code_0_fund_lpi.do, line 13 use "$folder/data_input/mf_prelmi_cleaned_2011_2017.dta", clear
15 more
  • $folder/data_input/mkt_IRC_HY_vol.dta Stata
    code_0_bank_lpi.do:35
    code_0_bank_lpi.do, line 35 merge m:1 yq using "$folder/data_input/mkt_IRC_HY_vol.dta"
  • $folder/data_input/VIX Stata
    code_0_fund_lpi.do:105
    code_0_fund_lpi.do, line 105 merge m:1 year quarter using "$folder/data_input/VIX"
  • ../data_input/data_bank.dta Stata
    code_0_bank_lpi.do:13
    code_0_bank_lpi.do, line 13 use "../data_input/data_bank.dta", clear
  • ../data_input/data_mmf.dta Stata
    code_0_mmf_lpi.do:14
    code_0_mmf_lpi.do, line 14 use "../data_input/data_mmf.dta", clear
  • data_input/fund_characteristics.dta Stata
    code_3_crosssectionfund.do:10
    code_3_crosssectionfund.do, line 10 merge 1:1 year quarter crsp_portno using "data_input/fund_characteristics.dta"
  • data_input/lcrid.dta Stata
    code_4_bankregulation.do:14
    code_4_bankregulation.do, line 14 merge m:1 rssd using "data_input/lcrid.dta"
  • data_input/reserves.dta Stata
    code_4_bankregulation.do:71
    code_4_bankregulation.do, line 71 merge m:1 year quarter using "data_input/reserves.dta"
  • data_intermediate/bank_ltisample_haircutrobust_1.dta Stata
    code_2_crosssectionbank.do:170
    code_2_crosssectionbank.do, line 170 use "data_intermediate/bank_ltisample_haircutrobust_1.dta", clear
  • data_intermediate/bank_ltisample_haircutrobust_2.dta Stata
    code_2_crosssectionbank.do:174
    code_2_crosssectionbank.do, line 174 merge 1:1 rssd tq using "data_intermediate/bank_ltisample_haircutrobust_2.dta"
  • data_intermediate/bank_ltisample_haircutrobust_3.dta Stata
    code_2_crosssectionbank.do:179
    code_2_crosssectionbank.do, line 179 merge 1:1 rssd tq using "data_intermediate/bank_ltisample_haircutrobust_3.dta"
  • data_intermediate/bank_ltisample_haircutrobust_4.dta Stata
    code_2_crosssectionbank.do:184
    code_2_crosssectionbank.do, line 184 merge 1:1 rssd tq using "data_intermediate/bank_ltisample_haircutrobust_4.dta"
  • data_intermediate/fund_ltisample_haircutrobust_1.dta Stata
    code_3_crosssectionfund.do:155
    code_3_crosssectionfund.do, line 155 use "data_intermediate/fund_ltisample_haircutrobust_1.dta", clear
  • data_intermediate/fund_ltisample_haircutrobust_2.dta Stata
    code_3_crosssectionfund.do:159
    code_3_crosssectionfund.do, line 159 merge 1:1 crsp_portno year quarter using "data_intermediate/fund_ltisample_haircutrobust_2.dta"
  • data_intermediate/fund_ltisample_haircutrobust_3.dta Stata
    code_3_crosssectionfund.do:164
    code_3_crosssectionfund.do, line 164 merge 1:1 crsp_portno year quarter using "data_intermediate/fund_ltisample_haircutrobust_3.dta"
  • data_intermediate/fund_ltisample_haircutrobust_4.dta Stata
    code_3_crosssectionfund.do:169
    code_3_crosssectionfund.do, line 169 merge 1:1 crsp_portno year quarter using "data_intermediate/fund_ltisample_haircutrobust_4.dta"

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

10 scripts, in the order the README lists them (Readme.pdf); 6 hand-offs through 4 intermediate files; 2 files written and never read back (outputs).

code_0_bank_lpi.do → code_1_pdftimeseries.do: bank_ltisample_haircutrobust_new.dtacode_0_fund_lpi.do → code_1_pdftimeseries.do: fund_ltisample_haircutrobust_new.dtacode_0_bank_lpi.do → code_2_crosssectionbank.do: bank_ltisample_haircutrobust_new.dtacode_0_fund_lpi.do → code_3_crosssectionfund.do: fund_ltisample_haircutrobust_Muni.dta, fund_ltisample_haircutrobust_new.dtacode_0_bank_lpi.do → code_4_bankregulation.do: bank_ltisample_haircutrobust_new.dtacode_0_mmf_lpi.do → code_5_mmmf.do: mmf_ltisample_haircutrobust_new.dta code_0_fund_lpi.do · reads 3 input files 1. code_0_fund_lpi.do code_0_bank_lpi.do · reads 3 input files · 1 estimation 2. code_0_bank_lpi.do 1 est.code_0_mmf_lpi.do · reads 1 input files 3. code_0_mmf_lpi.do code_5_mmmf.do · 4 estimations 4. code_5_mmmf.do 4 est.code_6_aggregate_trend.do · reads 2 input files 5. code_6_aggregate_trend.do code_7_haircut_plot.do · reads 2 input files 6. code_7_haircut_plot.do code_1_pdftimeseries.do 7. code_1_pdftimeseries.do code_2_crosssectionbank.do · reads 5 input files · 4 estimations 8. code_2_crosssectionbank.do 4 est.code_3_crosssectionfund.do · reads 5 input files · 4 estimations 9. code_3_crosssectionfund.do 4 est.code_4_bankregulation.do · reads 3 input files 10. code_4_bankregulation.do
  1. 1.code_0_fund_lpi.do named in Readme.pdf reads 3 input files · 2 merges ·
    writes fund_ltisample_haircutrobust_Muni.dta → read by code_3_crosssectionfund.do
    writes fund_ltisample_haircutrobust_new.dta → read by code_1_pdftimeseries.do, code_3_crosssectionfund.do
    writes (not read again): fund_ltisample_haircutrobust_$HY.dta
  2. 2.code_0_bank_lpi.do named in Readme.pdf reads 3 input files · 2 merges · 1 estimation
    writes bank_ltisample_haircutrobust_new.dta → read by code_1_pdftimeseries.do, code_2_crosssectionbank.do, code_4_bankregulation.do
    writes (not read again): bank_ltisample_haircutrobust_$HY.dta
  3. 3.code_0_mmf_lpi.do named in Readme.pdf reads 1 input file ·
    writes mmf_ltisample_haircutrobust_new.dta → read by code_5_mmmf.do
  4. 4.code_5_mmmf.do named in Readme.pdf 4 estimations
    reads what code_0_mmf_lpi.do wrote
  5. 5.code_6_aggregate_trend.do named in Readme.pdf reads 2 input files · 1 merge ·
  6. 6.code_7_haircut_plot.do named in Readme.pdf reads 2 input files ·
  7. 7.code_1_pdftimeseries.do 1 merge ·
    reads what code_0_fund_lpi.do, code_0_bank_lpi.do wrote
  8. 8.code_2_crosssectionbank.do reads 5 input files · 4 merges · 4 estimations
    reads what code_0_bank_lpi.do wrote
  9. 9.code_3_crosssectionfund.do reads 5 input files · 4 merges · 4 estimations
    reads what code_0_fund_lpi.do wrote
  10. 10.code_4_bankregulation.do reads 3 input files · 3 merges ·
    reads what code_0_bank_lpi.do wrote

3 · Merges — 17 joins, 14 followed by a check of the merge result

JoinsHowOn keysCheck that followsWhere
mf_prelmi_cleaned_2011_2017 ← corpbond_irc_hy merge m:1 yq drop if _m==2
code_0_fund_lpi.do:19
code_0_fund_lpi.do, line 19 merge m:1 yq using "$folder/data_input/corpbond_IRC_HY"
mf_prelmi_cleaned_2011_2017 ← vix merge m:1 year quarter drop if _m==2
code_0_fund_lpi.do:105
code_0_fund_lpi.do, line 105 merge m:1 year quarter using "$folder/data_input/VIX"
data_bank ← mkt_irc_hy_vol merge m:1 yq drop if _m==2
code_0_bank_lpi.do:35
code_0_bank_lpi.do, line 35 merge m:1 yq using "$folder/data_input/mkt_IRC_HY_vol.dta"
data_bank ← bank_flow merge 1:1 tq rssd none
code_0_bank_lpi.do:83
code_0_bank_lpi.do, line 83 merge 1:1 tq rssd using "$folder/data_input/bank_flow.dta"
aggbondfundasset ← bank_deposits merge 1:1 tm none
code_6_aggregate_trend.do:14
code_6_aggregate_trend.do, line 14 merge 1:1 tm using "$folder/data_input/bank_deposits"
fund_ltisample_haircutrobust_new ← banks_ltitimeseries merge 1:1 year quarter drop _merge
code_1_pdftimeseries.do:71
code_1_pdftimeseries.do, line 71 merge 1:1 year quarter using "data_intermediate/banks_ltitimeseries.dta"
bankassetsliab ← bank_ltisample_haircutrobust_new merge 1:1 rssd year quarter keep if _merge==3
code_2_crosssectionbank.do:11
code_2_crosssectionbank.do, line 11 merge 1:1 rssd year quarter using "data_intermediate/bank_ltisample_haircutrobust_new.dta"
bank_ltisample_haircutrobust_1 ← bank_ltisample_haircutrobust_2 merge 1:1 rssd tq drop _merge
code_2_crosssectionbank.do:174
code_2_crosssectionbank.do, line 174 merge 1:1 rssd tq using "data_intermediate/bank_ltisample_haircutrobust_2.dta"
bank_ltisample_haircutrobust_1 ← bank_ltisample_haircutrobust_3 merge 1:1 rssd tq drop _merge
code_2_crosssectionbank.do:179
code_2_crosssectionbank.do, line 179 merge 1:1 rssd tq using "data_intermediate/bank_ltisample_haircutrobust_3.dta"
bank_ltisample_haircutrobust_1 ← bank_ltisample_haircutrobust_4 merge 1:1 rssd tq drop _merge
code_2_crosssectionbank.do:184
code_2_crosssectionbank.do, line 184 merge 1:1 rssd tq using "data_intermediate/bank_ltisample_haircutrobust_4.dta"
fund_ltisample_haircutrobust_new ← fund_characteristics merge 1:1 year quarter crsp_portno drop if _merge==2
code_3_crosssectionfund.do:10
code_3_crosssectionfund.do, line 10 merge 1:1 year quarter crsp_portno using "data_input/fund_characteristics.dta"
fund_ltisample_haircutrobust_1 ← fund_ltisample_haircutrobust_2 merge 1:1 crsp_portno year quarter drop _merge
code_3_crosssectionfund.do:159
code_3_crosssectionfund.do, line 159 merge 1:1 crsp_portno year quarter using "data_intermediate/fund_ltisample_haircutrobust_2.dta"

4 · The sample — 27 keep/drop steps, 10 variables winsorized or trimmed

Filters, by kind
time period ×4
  • drop if year<2011
    code_0_bank_lpi.do:86
    code_0_bank_lpi.do, line 86 drop if year<2011
  • drop if year==2018
    code_0_bank_lpi.do:87
    code_0_bank_lpi.do, line 87 drop if year==2018
  • drop if tm<monthly("2014m01", "YM")
    code_5_mmmf.do:18
    code_5_mmmf.do, line 18 drop if tm<monthly("2014m01", "YM")
  • keep if year>=2011
    code_7_haircut_plot.do:23
    code_7_haircut_plot.do, line 23 keep if year>=2011
indicator subsets ×6
  • keep if prime==1 | muni==1
    code_5_mmmf.do:14
    code_5_mmmf.do, line 14 keep if prime==1 | muni==1
  • keep if prime==1 | muni==1
    code_5_mmmf.do:37
    code_5_mmmf.do, line 37 keep if prime==1 | muni==1
  • keep if prime==1 | muni==1
    code_5_mmmf.do:66
    code_5_mmmf.do, line 66 keep if prime==1 | muni==1
  • drop if dum==1
    code_5_mmmf.do:76
    code_5_mmmf.do, line 76 drop if dum==1
  • keep if prime==1 | muni==1
    code_5_mmmf.do:99
    code_5_mmmf.do, line 99 keep if prime==1 | muni==1
  • keep if prime==1 | muni==1
    code_5_mmmf.do:126
    code_5_mmmf.do, line 126 keep if prime==1 | muni==1
missing values ×10
  • drop if post==.
    code_5_mmmf.do:43
    code_5_mmmf.do, line 43 drop if post==.
  • drop if post==.
    code_5_mmmf.do:78
    code_5_mmmf.do, line 78 drop if post==.
  • drop if post==.
    code_5_mmmf.do:105
    code_5_mmmf.do, line 105 drop if post==.
  • drop if post==.
    code_5_mmmf.do:131
    code_5_mmmf.do, line 131 drop if post==.
  • drop if quarter==.
    code_1_pdftimeseries.do:41
    code_1_pdftimeseries.do, line 41 drop if quarter==.
  • drop if quarter==.
    code_1_pdftimeseries.do:58
    code_1_pdftimeseries.do, line 58 drop if quarter==.
  • drop if quarter==.
    code_4_bankregulation.do:25
    code_4_bankregulation.do, line 25 drop if quarter==.
  • drop if preres==.
    code_4_bankregulation.do:57
    code_4_bankregulation.do, line 57 drop if preres==.
  • first 8 of 10
drops after a merge (_merge) ×7
  • drop if _m==2
    code_0_fund_lpi.do:20
    code_0_fund_lpi.do, line 20 drop if _m==2
  • drop if _m==2
    code_0_fund_lpi.do:106
    code_0_fund_lpi.do, line 106 drop if _m==2
  • drop if _m==2
    code_0_bank_lpi.do:36
    code_0_bank_lpi.do, line 36 drop if _m==2
  • keep if _merge==3
    code_2_crosssectionbank.do:12
    code_2_crosssectionbank.do, line 12 keep if _merge==3
  • drop if _merge==2
    code_3_crosssectionfund.do:12
    code_3_crosssectionfund.do, line 12 drop if _merge==2
  • drop if _merge==2
    code_4_bankregulation.do:16
    code_4_bankregulation.do, line 16 drop if _merge==2
  • drop if _merge!=3
    code_4_bankregulation.do:43
    code_4_bankregulation.do, line 43 drop if _merge!=3
Outliers
winsorize at 1/99 · 10 variables
flow_trunc cashratio assetilliquidity exp_ratio lnage lnassets lpi* netincratio nodepliab insuredratio
code_3_crosssectionfund.do:45
code_3_crosssectionfund.do, line 45 winsor2 `x', cuts (1 99) replace
code_0_fund_lpi.do:101
code_0_fund_lpi.do, line 101 winsor2 lpi*, cut(1 99) replace
code_2_crosssectionbank.do:64
code_2_crosssectionbank.do, line 64 winsor2 netincratio, cuts(1 99) replace
code_2_crosssectionbank.do:82
code_2_crosssectionbank.do, line 82 winsor2 `x', cuts(1 99) replace
Missing values
dropped ×10
  • code_5_mmmf.do:43
    code_5_mmmf.do, line 43 drop if post==.
  • code_5_mmmf.do:78
    code_5_mmmf.do, line 78 drop if post==.
  • code_5_mmmf.do:105
    code_5_mmmf.do, line 105 drop if post==.
  • code_5_mmmf.do:131
    code_5_mmmf.do, line 131 drop if post==.
  • code_4_bankregulation.do:25
    code_4_bankregulation.do, line 25 drop if quarter==.
  • code_4_bankregulation.do:57
    code_4_bankregulation.do, line 57 drop if preres==.
set to zero ×6
  • dum → 0
    code_5_mmmf.do:49
    code_5_mmmf.do, line 49 replace dum=0 if dum==.
  • dum → 0
    code_5_mmmf.do:83
    code_5_mmmf.do, line 83 replace dum=0 if dum==.
  • dum → 0
    code_5_mmmf.do:110
    code_5_mmmf.do, line 110 replace dum=0 if dum==.
  • dum → 0
    code_5_mmmf.do:137
    code_5_mmmf.do, line 137 replace dum=0 if dum==.
  • lcrbig → 0
    code_4_bankregulation.do:17
    code_4_bankregulation.do, line 17 replace lcrbig=0 if lcrbig==.
  • lcrmedium → 0
    code_4_bankregulation.do:18
    code_4_bankregulation.do, line 18 replace lcrmedium=0 if lcrmedium==.

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

Standard measures computed here: Log Total Assets (lnassets
code_2_crosssectionbank.do:19
code_2_crosssectionbank.do, line 19 gen lnassets=log(assets)
)
VariableUsed in models asBuilt by
lpi outcome in 10
lpi = 0 (gen)
code_0_fund_lpi.do:76
code_0_fund_lpi.do, line 76 gen lpi = 0 if -flow_trunc>liq_value_pct
lpi = 0 (gen)
code_0_bank_lpi.do:96
code_0_bank_lpi.do, line 96 gen lpi = 0 if -totalliabflow>liq_value_pct
lpi = 0 (gen)
code_0_mmf_lpi.do:49
code_0_mmf_lpi.do, line 49 gen lpi = 0 if -flow>liq_value_pct
+13 more statements set it
lpi_8 outcome in 2 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
assetstotal outcome in 1
assetstotal = a_b_ag_deb+ a_b_ag_mbscmo+ a_b_bond+ a_b_cash+ a_b_cmoabs+ a_b_com_loan+ a_b_cons_loan + a_b_eq+ a_b_mm+ a_b_muni+ a_b_treas+a_b_o_realestate+a_b_sf_realestate+a_b_fasset (gen)
code_0_bank_lpi.do:52
code_0_bank_lpi.do, line 52 gen assetstotal=a_b_ag_deb+ a_b_ag_mbscmo+ a_b_bond+ a_b_cash+ a_b_cmoabs+ a_b_com_loan+ a_b_cons_loan + a_b_eq+ a_b_mm+ a_b_muni+ a_b_treas+a_b_o_realestate+a_b_sf_realestate+a_b_fasset
assetstotal = . (replace)
code_1_pdftimeseries.do:43
code_1_pdftimeseries.do, line 43 replace assetstotal=. if lpi==.
assetstotal = . (replace)
code_1_pdftimeseries.do:60
code_1_pdftimeseries.do, line 60 replace assetstotal=. if lpi==.
assetilliquidity regressor in 6
assetilliquidity = (a_b_cons_loan*awgt_cons_loan+ a_b_com_loan*awgt_com_loan + awgt_cmoabs*a_b_cmoabs+ awgt_bond*a_b_bond +awgt_mm*a_b_mm+awgt_muni*a_b_muni+ awgt_o_realestate*a_b_o_realestate+ awgt_sf_realestate*a_b_sf_realestate+ awgt_eq*a_b_eq + awgt_fasset*a_b_fasset) (gen)
code_2_crosssectionbank.do:28
code_2_crosssectionbank.do, line 28 gen assetilliquidity=(a_b_cons_loan*awgt_cons_loan+ a_b_com_loan*awgt_com_loan + awgt_cmoabs*a_b_cmoabs+ awgt_bond*a_b_bond /// +awgt_mm*a_b_mm+awgt_muni*a_b_muni+ awgt_o_realestate*a_b_o_realestate+ awgt_sf_realestate*a_b_sf_realestate+ aw …
assetilliquidity = (a_mf_com_loan*awgt_com_loan + awgt_cmoabs*a_mf_cmoabs+ awgt_bond*a_mf_bond +awgt_mm*a_mf_mm+awgt_muni*a_mf_muni+ awgt_eq* a_mf_eq) (gen)
code_3_crosssectionfund.do:21
code_3_crosssectionfund.do, line 21 gen assetilliquidity=(a_mf_com_loan*awgt_com_loan + awgt_cmoabs*a_mf_cmoabs+ awgt_bond*a_mf_bond /// +awgt_mm*a_mf_mm+awgt_muni*a_mf_muni+ awgt_eq* a_mf_eq)
assetilliquidity = 1-assetilliquidity/(a_b_cons_loan+ a_b_com_loan+a_b_cmoabs+a_b_bond+a_b_mm+ a_b_o_realestate+ a_b_muni+ a_b_sf_realestate+a_b_eq + a_b_fasset) (replace)
code_2_crosssectionbank.do:32
code_2_crosssectionbank.do, line 32 replace assetilliquidity=1-assetilliquidity/(a_b_cons_loan+ a_b_com_loan+a_b_cmoabs+a_b_bond+a_b_mm+ a_b_o_realestate+ a_b_muni+ a_b_sf_realestate+a_b_eq + a_b_fasset)
+1 more statements set it
cashratio regressor in 5
cashratio = (a_b_treas+a_b_ag_deb+a_b_cash+a_b_ag_mbscmo)*100/assetstotal (gen)
code_2_crosssectionbank.do:26
code_2_crosssectionbank.do, line 26 gen cashratio=(a_b_treas+a_b_ag_deb+a_b_cash+a_b_ag_mbscmo)*100/assetstotal
cashratio = (a_mf_treas+a_mf_ag_deb+a_mf_cash+a_mf_ag_mbscmo)/assetstotal (gen)
code_3_crosssectionfund.do:18
code_3_crosssectionfund.do, line 18 gen cashratio=(a_mf_treas+a_mf_ag_deb+a_mf_cash+a_mf_ag_mbscmo)/assetstotal
dum regressor in 4
dum = 1 (gen)
code_5_mmmf.do:48
code_5_mmmf.do, line 48 gen dum=1 if post==1 & insti==1
dum = 1 (gen)
code_5_mmmf.do:74
code_5_mmmf.do, line 74 by fundcode: gen dum=1 if post[1]==1
dum = 1 (gen)
code_5_mmmf.do:82
code_5_mmmf.do, line 82 gen dum=1 if post==1 & insti==1
+7 more statements set it
exp_ratio regressor in 4 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
flow_trunc regressor in 4
flow_trunc = flow (gen)
code_0_fund_lpi.do:50
code_0_fund_lpi.do, line 50 g flow_trunc = flow
flow_trunc = flow (gen)
code_0_mmf_lpi.do:68
code_0_mmf_lpi.do, line 68 g flow_trunc = flow
flow_trunc = 0 (replace)
code_0_fund_lpi.do:51
code_0_fund_lpi.do, line 51 replace flow_trunc = 0 if flow>0
+4 more statements set it
insti regressor in 4 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
insuredratio regressor in 4
insuredratio = depins/deposits (gen)
code_2_crosssectionbank.do:16
code_2_crosssectionbank.do, line 16 gen insuredratio=depins/deposits
insuredratio = 1 (replace)
code_2_crosssectionbank.do:17
code_2_crosssectionbank.do, line 17 replace insuredratio=1 if insuredratio>1
post regressor in 4
post = 0 (gen)
code_5_mmmf.do:40
code_5_mmmf.do, line 40 gen post=0 if tm>monthly("2013m12", "YM") & tm<monthly("2015m10", "YM")
post = 0 (gen)
code_5_mmmf.do:69
code_5_mmmf.do, line 69 gen post=0 if tm>monthly("2013m12", "YM") & tm<monthly("2015m10", "YM")
post = 0 (gen)
code_5_mmmf.do:102
code_5_mmmf.do, line 102 gen post=0 if tm>monthly("2013m12", "YM") & tm<monthly("2015m10", "YM")
+5 more statements set it
lnassets regressor in 3
lnassets = log(assets) (gen)
code_2_crosssectionbank.do:19
code_2_crosssectionbank.do, line 19 gen lnassets=log(assets)
lnassets = log(assetstotal) (gen)
code_3_crosssectionfund.do:16
code_3_crosssectionfund.do, line 16 gen lnassets=log(assetstotal)
nodepliab regressor in 3
nodepliab = (assets-deposits)/assets (gen)
code_2_crosssectionbank.do:24
code_2_crosssectionbank.do, line 24 gen nodepliab=(assets-deposits)/assets
lnage regressor in 2 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
retail regressor in 2 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace

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

Estimations not traced to a table or figure · 13
CommandOutcomeRegressors Fixed effectsStandard errorsWhere
reg
ols
assetstotal assetstotal_L — default
code_0_bank_lpi.do:60
code_0_bank_lpi.do, line 60 reg assetstotal assetstotal_L
reg
ols
lpi post insti dum — cluster: fundcode
code_5_mmmf.do:60
code_5_mmmf.do, line 60 eststo:reg lpi post insti dum, cluster(fundcode)
reg
ols
lpi post insti dum — cluster: fundcode
code_5_mmmf.do:93
code_5_mmmf.do, line 93 eststo:reg lpi post insti dum, cluster(fundcode)
reg
ols
lpi post insti dum — cluster: fundcode
code_5_mmmf.do:120
code_5_mmmf.do, line 120 eststo:reg lpi post insti dum, cluster(fundcode)
reg
ols
lpi post insti dum — cluster: fundcode
code_5_mmmf.do:146
code_5_mmmf.do, line 146 eststo:reg lpi post insti dum, cluster(fundcode)
reg
ols
lpi insuredratio — default
code_2_crosssectionbank.do:131
code_2_crosssectionbank.do, line 131 eststo: reg lpi insuredratio
reg
ols
lpi insuredratio nodepliab — default
code_2_crosssectionbank.do:132
code_2_crosssectionbank.do, line 132 eststo: reg lpi insuredratio nodepliab
reg
ols
lpi insuredratio nodepliab assetilliquidity — default
code_2_crosssectionbank.do:133
code_2_crosssectionbank.do, line 133 eststo: reg lpi insuredratio nodepliab assetilliquidity
reg
ols
lpi insuredratio nodepliab runprob assetilliquidity cashratio lnassets — default
code_2_crosssectionbank.do:134
code_2_crosssectionbank.do, line 134 eststo: reg lpi insuredratio nodepliab runprob assetilliquidity cashratio lnassets
reg
ols
lpi flow_trunc cashratio assetilliquidity exp_ratio — default
code_3_crosssectionfund.do:65
code_3_crosssectionfund.do, line 65 eststo: reg lpi flow_trunc cashratio assetilliquidity exp_ratio
reg
ols
lpi flow_trunc cashratio assetilliquidity exp_ratio retail lnage lnassets — default
code_3_crosssectionfund.do:66
code_3_crosssectionfund.do, line 66 eststo:reg lpi flow_trunc cashratio assetilliquidity exp_ratio retail lnage lnassets
reg
ols
lpi_8 flow_trunc cashratio assetilliquidity exp_ratio — default
code_3_crosssectionfund.do:69
code_3_crosssectionfund.do, line 69 eststo: reg lpi_8 flow_trunc cashratio assetilliquidity exp_ratio
reg
ols
lpi_8 flow_trunc cashratio assetilliquidity exp_ratio retail lnage lnassets — default
code_3_crosssectionfund.do:70
code_3_crosssectionfund.do, line 70 eststo:reg lpi_8 flow_trunc cashratio assetilliquidity exp_ratio retail lnage lnassets
Tables and figures the code writes: bankcross.tex
code_2_crosssectionbank.do:135
code_2_crosssectionbank.do, line 135 capture: esttab using "output/bankcross.tex", /// replace b(2) se(2) star(* 0.10 ** 0.05 *** 0.01 ) /// mgroups("LPI", pattern( 1 0 0 0 ) /// prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) /// ar2 label …
· banklpistats.tex
code_2_crosssectionbank.do:154
code_2_crosssectionbank.do, line 154 esttab using "output/banklpistats.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(1)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· banklpistats_hy2.tex
code_2_crosssectionbank.do:204
code_2_crosssectionbank.do, line 204 esttab using "output/banklpistats_hy2.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(1)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· banklpistats_lag.tex
code_2_crosssectionbank.do:158
code_2_crosssectionbank.do, line 158 esttab using "output/banklpistats_lag.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(1)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· banklpistats_netfees.tex
code_2_crosssectionbank.do:163
code_2_crosssectionbank.do, line 163 esttab using "output/banklpistats_netfees.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(3)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· bankstats.tex
code_2_crosssectionbank.do:149
code_2_crosssectionbank.do, line 149 esttab using "output/bankstats.tex", replace cells("mean(fmt(2)) sd(fmt()) p25(fmt(2)) p50(fmt(2)) p75(fmt(2)) ") nomtitle width(0.8\hsize) label nonumber noobs
· fundcross.tex
code_3_crosssectionfund.do:72
code_3_crosssectionfund.do, line 72 capture: esttab using "output/fundcross.tex", /// replace b(2) se(2) star(* 0.10 ** 0.05 *** 0.01 ) /// mgroups("LPI" "LPI (NAV Striking)", pattern( 1 0 1 0 ) /// prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span …
· fundlpistats_hy2.tex
code_3_crosssectionfund.do:189
code_3_crosssectionfund.do, line 189 esttab using "output/fundlpistats_hy2.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(1)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· fundlpistats_jlw.tex
code_3_crosssectionfund.do:143
code_3_crosssectionfund.do, line 143 esttab using "output/fundlpistats_jlw.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(1)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· fundlpistats_muni.tex
code_3_crosssectionfund.do:205
code_3_crosssectionfund.do, line 205 esttab using "output/fundlpistats_muni.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(1)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· fundlpistats_observed.tex
code_3_crosssectionfund.do:138
code_3_crosssectionfund.do, line 138 esttab using "output/fundlpistats_observed.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(1)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· fundlpistats_observed_netfees.tex
code_3_crosssectionfund.do:148
code_3_crosssectionfund.do, line 148 esttab using "output/fundlpistats_observed_netfees.tex", replace cells("mean(fmt(1)) sd(fmt(1)) p25(fmt(1)) p50(fmt(1)) p75(fmt(1)) ") nomtitle width(0.8\hsize) label nonumber noobs
· fundstats_baseline.tex
code_3_crosssectionfund.do:134
code_3_crosssectionfund.do, line 134 esttab using "output/fundstats_baseline.tex", replace cells("mean(fmt(2)) sd(fmt(2)) p25(fmt(2)) p50(fmt(2)) p75(fmt(2)) ") nomtitle width(0.8\hsize) label nonumber noobs
· mmmfreform_new.tex
code_5_mmmf.do:148
code_5_mmmf.do, line 148 capture: esttab using "output/mmmfreform_new.tex", /// replace b(2) se(2) star(* 0.10 ** 0.05 *** 0.01 ) /// mtitles("LPI" "LPI" "LPI" "LPI" ) /// ar2 br label nonotes s( N r2_a, /// label( "Observations" "Adj. R-squared") /// fmt …
· aggregate_assets_1995_2019.pdf
code_6_aggregate_trend.do:25
code_6_aggregate_trend.do, line 25 graph export "$folder/output/aggregate_assets_1995_2019.pdf", replace
· bid_ask_spreads.pdf
code_7_haircut_plot.do:37
code_7_haircut_plot.do, line 37 graph export "$folder/output/bid_ask_spreads.pdf", replace
· bid_ask_spreads_others.pdf
code_7_haircut_plot.do:57
code_7_haircut_plot.do, line 57 graph export "$folder/output/bid_ask_spreads_others.pdf", replace
· fund_deposit_share_1995_2019.pdf
code_6_aggregate_trend.do:38
code_6_aggregate_trend.do, line 38 graph export "$folder/output/fund_deposit_share_1995_2019.pdf", replace
· LPI_numerical_three_LPI.eps
code_8_LPI_simulation.ipynb:233
code_8_LPI_simulation.ipynb, line 233 { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ def plot_VS_Phi_update_three_LPI(q, q_b, pi, lam, phi_values): …
· lpilcr.pdf
code_4_bankregulation.do:32
code_4_bankregulation.do, line 32 graph export "output/lpilcr.pdf", replace
· lpiqe.pdf
code_4_bankregulation.do:81
code_4_bankregulation.do, line 81 graph export "output/lpiqe.pdf", replace
· lti_timeseries.pdf
code_1_pdftimeseries.do:80
code_1_pdftimeseries.do, line 80 graph export "output/lti_timeseries.pdf", replace
· ltibankcrosssection.pdf
code_1_pdftimeseries.do:17
code_1_pdftimeseries.do, line 17 graph export "output/ltibankcrosssection.pdf", replace
· ltifundcrosssection_baseline.pdf
code_1_pdftimeseries.do:32
code_1_pdftimeseries.do, line 32 graph export "output/ltifundcrosssection_baseline.pdf", replace
· mmmftrends_cash.pdf
code_5_mmmf.do:28
code_5_mmmf.do, line 28 graph export "output/mmmftrends_cash.pdf", replace
· mmmftrends_lpi.pdf
code_5_mmmf.do:24
code_5_mmmf.do, line 24 graph export "output/mmmftrends_lpi.pdf", replace

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

line 11 · histogram 2
commandlayersvariables optionssaved aswhere
histogram
histogram
histogram x lpi xtitle Liquidity Provision Index · ytitle Fraction ltibankcrosssection.pdf
code_1_pdftimeseries.do:16
code_1_pdftimeseries.do, line 16 histogram lpi, fraction xtitle("Liquidity Provision Index") ytitle("Fraction") start(0) ylabel( , nogrid) bgcolor(white) fcolor(blue) lcolor(black) graphregion(color(white))
histogram
histogram
histogram x lpi xtitle Liquidity Provision Index ltifundcrosssection_baseline.pdf
code_1_pdftimeseries.do:31
code_1_pdftimeseries.do, line 31 histogram lpi, fcolor(maroon) lcolor(black) frac xtitle("Liquidity Provision Index") ylabel(,nogrid) bgcolor(white) graphregion(color(white))
twoway
line
line + line y fund_w_lpi, bank_w_lpi x tq ytitle Liquidity Provision Index · legend label(1 Funds) label(2 Banks) region(col(white)) lti_timeseries.pdf
code_1_pdftimeseries.do:79
code_1_pdftimeseries.do, line 79 twoway line fund_w_lpi tq, lcolor("maroon") || line bank_w_lpi tq, lcolor("navy") || , ylabel(, nogrid) ytitle("Liquidity Provision Index") xtitle("") ylabel(, nogrid) graphregion(color(white)) bgcolor(white) legend( …
line
line
line + line + line y normmedian x tq ytitle Liquidity Provision Index (normalized) · legend label(1 < 50 Billion) label(2 > 250 Billion) label(3 50 - 250 Billion) region(col(white)) lpilcr.pdf
code_4_bankregulation.do:31
code_4_bankregulation.do, line 31 line normmedian tq if lcrbig==0 || line normmedian tq if lcrbig==1 || line normmedian tq if lcrbig==2 ||, ylabel(,nogrid) xtitle("") ytitle("Liquidity Provision Index (normalized)") legend(label(1 "< 50 Billion") label …
line
line
line + line + line + line + line y mediannorm, reserves x tq ytitle Liquidity Provision Index (normalized) · legend label(1 1st Quartile) label(2 2nd Quartile) label(3 3rd Quartile) label(4 4th Quartile) label(5 Excess Reserves) region(col(white)) lpiqe.pdf
code_4_bankregulation.do:80
code_4_bankregulation.do, line 80 line mediannorm tq if quart==1 || line mediannorm tq if quart==2 || line mediannorm tq if quart==3 ||line mediannorm tq if quart==4 || line reserves tq if quart==1, yaxis(2) ||, ytitle("Liquidity Provision Index (normali …
line
line
line + line y lpi x tm ytitle Liquidity Provision Index · xline 681, 669, 696 · legend label(1 Retail) label(2 Institutional (Fixed NAV)) label(3 Institutional (Flexible NAV)) region(col(white)) mmmftrends_lpi.pdf
code_5_mmmf.do:23
code_5_mmmf.do, line 23 line lpi tm if insti==0 || line lpi tm if insti==1 ||, xline(681, lpattern(dash) lcolor(black)) xline(669, lcolor(black)) xline(696, lcolor(black)) ytitle("Liquidity Provision Index") xtitle("") ylabel(, nogrid) gra …
line
line
line + line y sa_mf_cash x tm ytitle Cash Proportion · xline 681, 669, 696 · legend label(1 Retail) label(2 Institutional) region(col(white)) mmmftrends_cash.pdf
code_5_mmmf.do:27
code_5_mmmf.do, line 27 line sa_mf_cash tm if insti==0 || line sa_mf_cash tm if insti==1 ||, xline(681, lpattern(dash) lcolor(black)) xline(669, lcolor(black)) xline(696, lcolor(black)) yscale (range( 0 0.25)) ytitle("Cash Proportion") xti …
twoway
line
area y bond x date ytitle Fund assets (billion) · legend off aggregate_assets_1995_2019.pdf
code_6_aggregate_trend.do:19
code_6_aggregate_trend.do, line 19 twoway /// (area bond date, xlabel(,format(%tdCY))) if date>=td(01jan1995) & date<=td(31dec2019), /// graphregion(color(white)) plotregion(color(white)) bgcolor(none) /// legend(off) /// ytitle("Fund assets …
–24
twoway
line
area y fund_deposit_share x date ytitle Fixed-income fund shares / Bank deposits · legend off fund_deposit_share_1995_2019.pdf
code_6_aggregate_trend.do:32
code_6_aggregate_trend.do, line 32 twoway /// (area fund_deposit_share date, xlabel(,format(%tdCY))) if date>=td(01jan1995) & date<=td(31dec2019), /// graphregion(color(white)) plotregion(color(white)) bgcolor(none) /// legend(off) /// ytitl …
–37
graph twoway
line
tsline + tsline + tsline + tsline y vwavg_bond_IRC, avg_trea_bas, vwavg_muni_IRC, vwavg_eq_PQS ytitle Liquidation costs (bps) · legend label(1 Corporate bonds) label(2 Treasury bonds) label(3 Municipal bonds) label(4 Stocks) bid_ask_spreads.pdf
code_7_haircut_plot.do:26
code_7_haircut_plot.do, line 26 graph twoway (tsline vwavg_bond_IRC , lpattern(solid) lcolor(blue) lwidth(medium)) /// (tsline avg_trea_bas , lpattern(dash) lcolor(sand) lwidth(medium)) /// (tsline vwavg_muni_IRC , lpattern(dot) lcolor(green) lwidth(me …
–36
graph twoway
line
tsline + tsline + tsline + tsline y spread_com_loan, spread_cmoabs, spread_ag_mbscmo, spread_ag_deb ytitle Liquidation costs (bps) · legend label(1 Loans) label(2 ABS) label(3 Agency MBS) label(4 Agency debt) bid_ask_spreads_others.pdf
code_7_haircut_plot.do:46
code_7_haircut_plot.do, line 46 graph twoway (tsline spread_com_loan , lpattern(solid) lcolor(blue) lwidth(medium)) /// (tsline spread_cmoabs , lpattern(dash) lcolor(sand) lwidth(medium)) /// (tsline spread_ag_mbscmo , lpattern(dot) lcolor(green) lwidt …
–56
plt.plot
line
line + line + line y lpi_f_values, lpi_b_values, lpi_b_ds_values x phi_values xtitle $\phi$ · ytitle Expected LPI · legend True LPI_numerical_three_LPI.eps
code_8_LPI_simulation.ipynb:271
code_8_LPI_simulation.ipynb, line 271 plt.figure(figsize=(7.5, 5))
–281
plt.plot
line
line + line + line y yf_values, yb_values, yb_ds_values x phi_values xtitle $\phi$ · ytitle Share of illiquid asset · legend True LPI_numerical_three_portfolio.eps
code_8_LPI_simulation.ipynb:352
code_8_LPI_simulation.ipynb, line 352 plt.figure(figsize=(7.5, 5))
–362