Forecasting using SAS Forecast Server, SAS/ETS, and more

Autocorrelation in timeseries data

Reply
New Contributor
Posts: 4

Autocorrelation in timeseries data

Hi everyone,

 

Im not an expert in SAS, but I am writing my masterthesis and doing a valuation of the CNY/USD exchange rate. 

I am currently trying to build a regression with CNY/USD as the dependent variable and some macro economic factors as independent variables. To test for autocorrelation i have used the following code on all of my variables, including the dependent variable: 

PROC ARIMA DATA = sas;
IDENTIFY VAR = dCNY_USD;
RUN; 

 

Attached is the output from the test. As you can see, the output indicates a high level of autocorrelation. It is the same for 7 of my 10 variables. How do I proceed to remove the autocorrelation from my data set?

 

Hope someone can help me with this problem.

 

Best regards

Anders


Capture1.PNG
Respected Advisor
Posts: 4,640

Re: Autocorrelation in timeseries data

Unless your model potentially includes moving average components, I think you would be better with proc autoreg.

 

PROC AUTOREG DATA = sas;
MODEL dCNY_USD = YEAR / dw=5 dwprob;
RUN;
PG
New Contributor
Posts: 4

Re: Autocorrelation in timeseries data

Thanks for your answer. I have also tried the DW test as you suggested, using the following code:

 

proc autoreg data=sas;
model dCNY_USD = dirdiff infdiff dlogfdicn dlogfxrcn dlogfxrus dlogcacn dpsicn dpsius naus / dw=12 dwprob;
run;

 

You can see the output attached. I used 12th order, as it is monthly data. Are you then suppose to check all the orders for an indication of autocorelation, or just the 12th? Also, as you can see from the output, this test suggests no autocorrelation on first order, while the initial test I did, which I attached in the first post, shows a strong indication of autocorrelation. And so it did for 7 out of my 10 variables. Do you know why the two tests gives so different answers?

 

I am very greatful for your help.

 

Anders


Capture.PNG
Super User
Posts: 9,662

Re: Autocorrelation in timeseries data

using difference the time series, 

the first difference is :

 

IDENTIFY VAR = dCNY_USD(1);

 

if it is still correlation,try second difference,

IDENTIFY VAR = dCNY_USD(2);

 

 

Or you could let SAS do it for you automatically.

identify var=dCNY_USD esacf p=(0:7) q=(0:8);

New Contributor
Posts: 4

Re: Autocorrelation in timeseries data

Thanks for your answer. I`ve tried your solution, and I have to take 7 or 8 differences for the p-value to start moving up towards 1%. And by using the Durbin-Watson test, it shows no obvious autocorrelation in the regression. I can´t understand why the two tests gives such different answers. Also, how come you can check for autocorrelation on all variables at once in the DW-test, but with the test you suggested, you have to check one variable at the time.

 

Thanks again.

Anders

 

 

Ask a Question
Discussion stats
  • 4 replies
  • 138 views
  • 0 likes
  • 3 in conversation