Appendix: Some SCA Commands
In this appendix, we give the SCA commands used in Section 2.9. The 1-year maturity interest rates are in the file w-gs1yr.txt and the 3-year rates are in the file w-gs3yr.txt.
-- load the data into SCA, denote the data by rate1 and rate3.
input year,mom,day,rate1. file ‘w-gs1yr.txt’
--
input year,mon,day,rate3. file ‘w-gs3yr.txt’
-- specify a simple linear regression model.
tsm m1. model rate3=b0+(b1)rate1+noise.
-- estimate the specified model and store residual in r1.
estim m1. hold resi(r1).
-- compute 10 lags of residual acf.
acf r1. maxl 10.
-- difference the two series, denote the new series by c1t
and c3t
diff old rate1,rate3. new c1t, c3t. compress.
-- specify a linear regression model for the differenced data
tsm m2. model c3t=h0+(h1)c1t+noise.
-- estimation
estim m2. hold resi(r2).
-- compute residual acf.
acf r2. maxl 10.
-- specify a regression model with time series errors.
tsm m3. model c3t=g0+(g1)c1t+(1)noise.
-- estimate the model using the exact likelihood method.
estim m3. method exact. hold resi(r3).
-- compute residual acf.
acf r3. maxl 10.
-- refine the model to include more MA lags.
tsm m4. model c3t=g0+(g1)c1t+(1,4,6,7)noise.
-- estimation
estim m4. method exact. hold resi(r4).
-- compute residual acf.
acf r4. maxl 10.
-- exit SCA
stop
Exercises
If not specifically specified, use 5% significance level to draw conclusions in the exercises.
2.1 Suppose that the simple return of a monthly bond index follows the MA(1) model ...
Get Analysis of Financial Time Series, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.