滞后项\前移项\和差分项
【滞后项\前移项\和差分项】滞后项\前移项\和差分项
help varlistsysuse "sp500", clear
tsset date
gen t = _n
tsset t
gen lnclose = ln(close)// ln(收盘价)
gen ret = D.lnclose// 收益率,一阶差分
gen L1ret = L1.ret// 一期滞后项
gen L2ret = L2.ret// 两期滞后项
corr *ret
reg ret L(1/3).ret F(1/3).ret //可以不必生成,回归中直接引用即可