12.07.2015 Views

"Frontmatter". In: Analysis of Financial Time Series

"Frontmatter". In: Analysis of Financial Time Series

"Frontmatter". In: Analysis of Financial Time Series

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APPENDIX A: SOME SCA COMMANDS 75estim m1. hold resi(r1)-- compute ACF <strong>of</strong> the residuals, including Q statistics.acf r1.-- refine the model to an AR(5).tsm m1. model (1,2,3,4,5)vw=c0+noise.-- estimate the model and store the residuals in r1.estim m1. hold resi(r1)-- compute ACF <strong>of</strong> the residuals.acf r1. maxl 10.-- compute p-value <strong>of</strong> the Q(5) statistic.p=1.0-cdfc(11.2,5)-- print p-value.print p-- re-estimate the model using the first 858 observations.estim m1. span 1,858.-- compute 1-step to 6-step ahead forecasts at origin 858.ufore m1. orig 858. n<strong>of</strong>s 6.-- quit SCA.stopB. Commands used in Section 2.9The 1-year maturity interest rates are in the file “wgs1yr.dat” and the 3-year rates arein the file “wgs3yr.dat.”-- load the data into SCA, denote the data by rate1 and rate3.input date, rate1. file ’wgs1yr.dat’--input date,rate3. file ’wgs3yr.dat’-- 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 <strong>of</strong> residual acf.acf r1. maxl 10.-- difference the two series, denote the new series by c1t and c3tdiff old rate1,rate3. new c1t, c3t. compress.-- specify a linear regression model for the differenced datatsm m2. model c3t=h0+(h1)c1t+noise.-- estimationestim 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)noise.-- estimationestim m4. method exact. hold resi(r4).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!