******************************************************************************* ** Please acknowlegde the source ** Boermans, M.A. (2022). A literature review of Securities Holdings Statistics research and a practitioner's guide. DNB Working Paper No 757. ** Version 1.0 (8 December 2022) ******************************************************************************* ******************************************************************************* * select clean copy SHS-S (cross-section) stocks vs bonds ******************************************************************************* * stocks (or money market and investment funds F52E) ******************************************************************************* use "F511_2022Q2.dta", clear ******************************************************************************* * select positions keep if amount_type=="LE" * select market values keep if valuation=="M" * select euro area investors (20 countries, incl Croatia) keep if holder_area=="AT" | holder_area=="BE" | holder_area=="CY" | holder_area=="DE" | holder_area=="EE" | holder_area=="ES" | holder_area=="FI" | holder_area=="FR" | holder_area=="GR" | holder_area=="HR" | holder_area=="IE" | holder_area=="IT" | holder_area=="LT" | holder_area=="LU" | holder_area=="LV" | holder_area=="MT" | holder_area=="NL" | holder_area=="PT" | holder_area=="SI" | holder_area=="SK" * excluide third-party holdings except for households and non-profit drop if tph=="N" & ( holder_sector!="S_14" & holder_sector!="S_15" & holder_sector!="S_1MU" ) * exclude FDI drop if functional_category=="D" * exclude short positions keep if obs_value>0 * Only active securities keep if security_status==100 * exclude tax havens drop if issuer_country == "VI" | issuer_country == "CW" | issuer_country == "KY" | issuer_country == "BS" | issuer_country == "BM" | issuer_country == "VG" | issuer_country == "IM" | issuer_country == "MH" | issuer_country == "GG" | issuer_country == "GI" | issuer_country == "JE" | issuer_country == "LI" * new holder sector definition gen holder_sector_new = "banks" if holder_sector=="S_122" replace holder_sector_new = "insur" if holder_sector=="S_128" replace holder_sector_new = "pfund" if holder_sector=="S_129" replace holder_sector_new = "invfd" if holder_sector=="S_123" | holder_sector=="S_124" replace holder_sector_new = "hhold" if holder_sector=="S_14" | holder_sector=="S_15" | holder_sector=="S_1MU" replace holder_sector_new = "omfis" if holder_sector=="S_125A" | holder_sector=="S_125W" replace holder_sector_new = "gov" if holder_sector=="S_1311" | holder_sector=="S_1312" | holder_sector=="S_1313" | holder_sector=="S_1314" | holder_sector=="S_13U" replace holder_sector_new = "nonfc" if holder_sector=="S_11" drop holder_sector encode holder_sector_new, gen(holder_sector) * holder country - hoilder sector level egen id1 = group(identifier holder_area holder_sector period) bys id1: egen temp = total(obs_value) replace obs_value = temp bys id1: gen tempvar = _n drop if tempvar > 1 drop temp tempvar id1 functional_category /* OPTIONAL: euro area investor level by holder sectors egen id1 = group(identifier holder_sector period) bys id1: egen temp = total(obs_value) replace obs_value = temp bys id1: gen tempvar = _n drop if tempvar > 1 drop temp tempvar id1 */ *for stocks and mutual fund data *! otherwise amount_out_eur instead of market_cap_eur replace obs_value = market_cap_eur if obs_value> market_cap_eur & obs_value!=. & market_cap_eur!=. keep if obs_value>10000 * drop unneccesary variables for better performance drop /* obs_status */ identifier_type instr_class conf_status conf_status_calc sensitivity escb is_in_eadb accr_interest accr_income_factor issue_price last_coupon_date last_coupon_freq coupon_type poolfactor orig_mat_days orig_mat_bracket unit_measure amount_out amount_out_eur mat_date asset_securitisation_type redemption_price resid_mat_days resid_mat_bracket orig_mat_bracket orig_mat_days save "F511_LE_2022Q2_cleand.dta", replace ******************************************************************************* * select clean copy SHS-S (cross-section) ******************************************************************************* ******************************************************************************* * bonds (or money market F31) ******************************************************************************* use "F32_2022Q2.dta", clear ******************************************************************************* * select positions keep if amount_type=="LE" * select market values keep if valuation=="M" * select euro area investors (20 countries, incl Croatia) keep if holder_area=="AT" | holder_area=="BE" | holder_area=="CY" | holder_area=="DE" | holder_area=="EE" | holder_area=="ES" | holder_area=="FI" | holder_area=="FR" | holder_area=="GR" | holder_area=="HR" | holder_area=="IE" | holder_area=="IT" | holder_area=="LT" | holder_area=="LU" | holder_area=="LV" | holder_area=="MT" | holder_area=="NL" | holder_area=="PT" | holder_area=="SI" | holder_area=="SK" * excluide third-party holdings except for households and non-profit drop if tph=="N" & ( holder_sector!="S_14" & holder_sector!="S_15" & holder_sector!="S_1MU" ) * exclude FDI drop if functional_category=="D" * exclude short positions keep if obs_value>0 * Only active securities keep if security_status==100 * exclude tax havens drop if issuer_country == "VI" | issuer_country == "CW" | issuer_country == "KY" | issuer_country == "BS" | issuer_country == "BM" | issuer_country == "VG" | issuer_country == "IM" | issuer_country == "MH" | issuer_country == "GG" | issuer_country == "GI" | issuer_country == "JE" | issuer_country == "LI" * new holder sector definition gen holder_sector_new = "banks" if holder_sector=="S_122" replace holder_sector_new = "insur" if holder_sector=="S_128" replace holder_sector_new = "pfund" if holder_sector=="S_129" replace holder_sector_new = "invfd" if holder_sector=="S_123" | holder_sector=="S_124" replace holder_sector_new = "hhold" if holder_sector=="S_14" | holder_sector=="S_15" | holder_sector=="S_1MU" replace holder_sector_new = "omfis" if holder_sector=="S_125A" | holder_sector=="S_125W" replace holder_sector_new = "gov" if holder_sector=="S_1311" | holder_sector=="S_1312" | holder_sector=="S_1313" | holder_sector=="S_1314" | holder_sector=="S_13U" replace holder_sector_new = "nonfc" if holder_sector=="S_11" drop holder_sector encode holder_sector_new, gen(holder_sector) * holder country - hoilder sector level egen id1 = group(identifier holder_area holder_sector period) bys id1: egen temp = total(obs_value) replace obs_value = temp bys id1: gen tempvar = _n drop if tempvar > 1 drop temp tempvar id1 functional_category * OPTIONAL: euro area investor level by holder sectors egen id1 = group(identifier holder_sector period) bys id1: egen temp = total(obs_value) replace obs_value = temp bys id1: gen tempvar = _n drop if tempvar > 1 drop temp tempvar id1 * for bonds and money market *! otherwise market_cap_eur instead of amount_out_eur replace obs_value = amount_out_eur if obs_value> amount_out_eur & obs_value!=. & amount_out_eur!=. keep if obs_value>10000 * for BONDS - drop unneccesary variables for better performance drop /* obs_status */ identifier_type instr_class dividend_amount dividend_amount_type dividend_currency dividend_settl_date last_split_factor last_split_date market_cap_eur market_cap conf_status conf_status_calc sensitivity escb drop accr_interest accr_income_factor issue_price last_coupon_date last_coupon_freq poolfactor orig_mat_days orig_mat_bracket unit_measure save "F32_LE_2022Q2_clean.dta", replace ******************************************************************************** replace time_period = period if time_period=="" & period!="" *rename period time_period split time_period, p("-Q") destring time_period1 time_period2, replace gen qdate = yq(time_period1, time_period2) format %tq qdate drop time_period1 time_period2 period ******************************************************************************** * BOND-specific edits ******************************************************************************** * active bonds gen issue_qdate = substr(issue_date,1,7) split issue_qdate, p("-") destring issue_qdate1 issue_qdate2, replace replace issue_qdate2 = ceil(issue_qdate2/3) gen issuance_date = yq(issue_qdate1, issue_qdate2) format %tq issuance_date drop issue_qdate1 issue_qdate2 issue_qdate issue_date * gen maturity_qdate = substr(mat_date,1,7) split maturity_qdate, p("-") destring maturity_qdate1 maturity_qdate2, replace replace maturity_qdate2 = ceil(maturity_qdate2/3) gen maturity_date = yq(maturity_qdate1, maturity_qdate2) format %tq maturity_date drop maturity_qdate maturity_qdate1 maturity_qdate2 mat_date * dataset kleiner maken naar UNBALANCED: drop if maturity_date < qdate drop if issuance_date > qdate * only in PCL keep if quotation_basis=="PCL" *! drop strange bond types (debt_type) gen debt_type_temp = substr(debt_type, 1,1) keep if debt_type_temp =="D" drop debt_type_temp drop if debt_type=="D.7" | debt_type=="D.72" | debt_type=="D.74" | debt_type=="D.742" /// | debt_type=="D.743" | debt_type=="D.758" *! debt_type=="D.18" * add price value type drop if price_value_type=="." * drop weird prices drop if price_value <5 & price_value!=. drop if price_value >250 & price_value!=. * 1% of prices trimmed, two sided so at 0.5% winsor price_value, gen(price_value_w) p(0.005) drop cc_serial_number cc_type conf_amount conf_amount_calc conf_status conf_status_calc creation_time escb freq last_csdb_extraction_time last_csdb_revision last_sdw_extraction_time obs_status obs_value_status placeholder_1 placeholder_10 placeholder_2 placeholder_3 placeholder_4 placeholder_5 placeholder_6 placeholder_7 placeholder_8 placeholder_9 security_status_date sensitivity source time_period unit_measure v65 version_number quotation_basis price_value_basis drop dividend_amount dividend_amount_type dividend_currency dividend_settl_date last_split_factor last_split_date market_cap market_cap_eur drop revision_number amount_out price_value_type security_status nominal_value reporting_basis ref_area tph compress save "F32_LE.dta" ******************************************************************************** ******************************************************************************** * GENERATE VARS ******************************************************************************** gen id_panel = identifier + " " + holder_area + " " + holder_sector_new compress gen EUR =. replace EUR = 1 if nom_curr=="EUR" replace EUR = 0 if nom_curr!="EUR" gen euroarea = 0 replace euroarea = 1 if issuer_country=="AT" | issuer_country=="BE" | issuer_country=="DE" | issuer_country=="EE" | issuer_country=="FI" | issuer_country=="FR" | issuer_country=="LT" | issuer_country=="LU" | issuer_country=="LV" | issuer_country=="MT" | issuer_country=="NL" | issuer_country=="SK" | issuer_country=="CY" | issuer_country=="ES" | issuer_country=="GR" | issuer_country=="IE" | issuer_country=="IT" | issuer_country=="PT" | issuer_country=="SI" gen hold_ln = log(obs_value) xtset id_panel qdate gen hold_ln_l = l.hold_ln gen mv = (amount_out_eur*price_value_w)/100 gen mvsize_ln = log(mv) gen share = obs_value/mv table qdate, c(sum obs_value) ***************************************************** sort id_panel qdate egen id_panel_num = group(id_panel) sort id_panel_num qdate xtset id_panel_num qdate keep identifier nom_curr id_panel_num qdate hold_ln hold_ln_l EUR euroarea mvsize_ln obs_value price_value_w amount_out_eur mv share issuer_country holder_area holder_sector_new egen holder_area_num = group(holder_area) egen holder_sector_num = group(holder_sector_new) egen issuer_country_num = group(issuer_country) gen id_panel_cluster = holder_area + " " + holder_sector_new egen id_panel_cluster_n = group(id_panel_cluster) save "regression_full_detail", replace ***************************************************** use "regression_full_detail", clear ***************************************************** *benchmark: gov, nonfc *allow for investor heteorgeneity in Beta coefficients here * see Boermans (2022) gen EUR_banks = 0 replace EUR_banks = EUR if holder_sector_new=="banks" gen EUR_hhold = 0 replace EUR_hhold = EUR if holder_sector_new=="hhold" gen EUR_insur = 0 replace EUR_insur = EUR if holder_sector_new=="insur" gen EUR_omfis = 0 replace EUR_omfis = EUR if holder_sector_new=="omfis" gen EUR_invfund = 0 replace EUR_invfund = EUR if holder_sector_new=="invfund" gen EUR_pfund = 0 replace EUR_pfund = EUR if holder_sector_new=="pfund" gen euroarea_banks = 0 replace euroarea_banks = euroarea if holder_sector_new=="banks" gen euroarea_hhold = 0 replace euroarea_hhold = euroarea if holder_sector_new=="hhold" gen euroarea_insur = 0 replace euroarea_insur = euroarea if holder_sector_new=="insur" gen euroarea_omfis = 0 replace euroarea_omfis = euroarea if holder_sector_new=="omfis" gen euroarea_invfund = 0 replace euroarea_invfund = euroarea if holder_sector_new=="invfund" gen euroarea_pfund = 0 replace euroarea_pfund = euroarea if holder_sector_new=="pfund" gen mvsize_ln_banks = 0 replace mvsize_ln_banks = mvsize_ln if holder_sector_new=="banks" gen mvsize_ln_hhold = 0 replace mvsize_ln_hhold = mvsize_ln if holder_sector_new=="hhold" gen mvsize_ln_insur = 0 replace mvsize_ln_insur = mvsize_ln if holder_sector_new=="insur" gen mvsize_ln_omfis = 0 replace mvsize_ln_omfis = mvsize_ln if holder_sector_new=="omfis" gen mvsize_ln_invfund = 0 replace mvsize_ln_invfund = mvsize_ln if holder_sector_new=="invfund" gen mvsize_ln_pfund = 0 replace mvsize_ln_pfund = mvsize_ln if holder_sector_new=="pfund" ***************************************************** ** CROSS_SECTION ***************************************************** reg hold_ln EUR_banks EUR_omfis EUR_insur EUR_invfund EUR_pfund EUR_hhold /// mvsize_ln_banks mvsize_ln_omfis mvsize_ln_insur mvsize_ln_invfund mvsize_ln_pfund mvsize_ln_hhold /// i.holder_area_num i.holder_sector_num i.holder_area_num##c.holder_sector_num i.issuer_country_num /// if qdate==tq(2022q2), rob cluster(id_panel_cluster) outreg2 using "$OUT/Table 1_20221122", /// keep(EUR_banks EUR_omfis EUR_insur EUR_invfund EUR_pfund EUR_hhold /// mvsize_ln_banks mvsize_ln_omfis mvsize_ln_insur mvsize_ln_invfund mvsize_ln_pfund mvsize_ln_hhold ) bdec(2) /// label bracket excel append /// addtext(Investor country FE, Yes, Investor sector FE, Yes, Investor Country*Sector FE, Yes, Issuer country FE, Yes) reg share EUR_banks EUR_omfis EUR_insur EUR_invfund EUR_pfund EUR_hhold /// i.holder_area_num i.holder_sector_num i.holder_area_num##c.holder_sector_num i.issuer_country_num /// if qdate==tq(2022q2), rob cluster(id_panel_cluster) outreg2 using "$OUT/Table 1_20221122_v2", /// keep(EUR_banks EUR_omfis EUR_insur EUR_invfund EUR_pfund EUR_hhold ) bdec(2) /// label bracket excel append /// addtext(Investor country FE, Yes, Investor sector FE, Yes, Investor Country*Sector FE, Yes, Issuer country FE, Yes)