Date: Tue, 22 Apr 1997 19:11:35 -0500
Reply-To: "Robin K. Chou" <rchou@BLUE.WEEG.UIOWA.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Robin K. Chou" <rchou@BLUE.WEEG.UIOWA.EDU>
Organization: The University of Iowa
Subject: Need help for time series data
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi everyone,
I would like to thank you first for help.
I have a huge amount of securities data. For each stock, I have several
variables and each variable is a time series. For example , price series,
return series, volume series ...
It looks like;
name date price return volume
IBM 01/94 90 xxx xxx
IBM 02/94 92 xxx xxx
IBM 03/94 95 xxx xxx
IBM 04/94 92 xxx xxx
IBM 05/94 97 xxx xxx
IBM 06/94 95 xxx xxx
IBM 07/94 90 xxx xxx
.
.
.
IBM 12/94 95 xxx xxx
MSFT 01/94 120 xxx xxx
MSFT 02/94 118 xxx xxx
.
.
.
Now, my question is that I would like to compare the price of IBM on 06/94
to the price of IBM 5 months ago (on 01/94). If the price on 06/94 is
higher than that on 01/94, I need to assign a dummy variable of value 1 to
the observation on 06/94. Otherwise, the dummy is zero. Next, I need to
compare the price on 07/94 to that on 2/94 (price 5 month ago) and again
assign a dummy to the observation on 07/94. So on and so forth. Thus,
I need to refer to the observation 5 months ago in order to assign a dummy
to the current observation.
I would prefer to do this under SAS if possible. Otherwise, any help
on other programs that can solve this problem will also be greatly
appreciated.
Thanks again.
Robin Chou
Department of Finance
University of Iowa
Iowa City, IA 52242
|