We cover the following topics:
1. How to estimate the FDL model using OLS and the lag operator in Stata.
2. Testing and calculating the Long Run Propensity.
3. Using the Information Criterion to optimize lag length.
4. Creating a foreach loop in Stata to cycle through multiple lag orders, exporting the information criterion to Excel using 'putexcel'.
//Data command//
freduse TB3MS FEDFUNDS
gen t=_n
asset t
//Loop Commands//
putexcel set results1
foreach i of num 1/20 {
reg D.TB3MS L(0/`i').D.FEDFUNDS
estat ic
putexcel A`i' =matrix(r(S))
}
Loops in Stata Tutorial:
https://youtu.be/sT3gjnd9v-k
'putexcel' tutorial:
https://youtu.be/BnUqoDyoP_8
Another Time-series topic: the "correlogram":
https://youtu.be/GJukJBfImg0
Textbook Link
Introductory Econometrics for Finance
https://amzn.to/2YJc2Tu
Link to tutorial on time series graphs in Stata:
https://youtu.be/A7JaI-B5t-0
Amazon link for Baum's "Introduction to Stata Programming"
https://amzn.to/2PpAqVe