/*用于检验2005-2019年债券市场对冲型与庞氏型融资占比是否存在显著差异*/

//剔除样本（投机型融资样本删掉）
use FSIB,clear
 drop if FSIB == 2
generate long HEDGE = 1 if FSIB == 1
replace HEDGE = 0 if HEDGE == .
generate long PONZI = 1 if FSIB == 3
replace PONZI = 0 if PONZI == .

//T-Test
ttest HEDGE == PONZI, level(99)

//2019年
drop if date < 2019
ttest HEDGE == PONZI, level(99)

//公司债
use FSIB,clear
 drop if FSIB == 2
generate long HEDGE = 1 if FSIB == 1
replace HEDGE = 0 if HEDGE == .
generate long PONZI = 1 if FSIB == 3
replace PONZI = 0 if PONZI == .
drop if GSBOND == 0
ttest HEDGE == PONZI, level(99)
drop if date < 2019
ttest HEDGE == PONZI, level(99)

//企业债
drop if QYBOND ==0
ttest HEDGE == PONZI, level(99)
drop if date < 2019
ttest HEDGE == PONZI, level(99)