LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 1997, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 23 Apr 1997 17:55:28 -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:      Help: another time series question
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi there,

Thanks for all of you that helped me with my question yesterday. Since I am totally new to SAS, I have yet another one to bother you.

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 11/94 98 xxx xxx IBM 12/94 95 xxx xxx MSFT 01/94 120 xxx xxx MSFT 02/94 118 xxx xxx MSFT 03/94 115 xxx xxx . . MSFT 11/94 124 xxx xxx 3M 01/94 58 xxx xxx 3M 02/94 59 xxx xxx . .

Now, I would like to compute the mean of stock prices by month and call this "average market price" for month n. I know that we can do this easily by using "proc means" with "by" statement. But my question is that I want to use these market prices as independent variables and do a time series regression for each stock using the stock's prices as dependent variables.

That is, I want to create a data set that will look like:

name date price return volume avg_mkt

IBM 01/94 90 xxx xxx 89.3 IBM 02/94 92 xxx xxx 89.6 IBM 03/94 95 xxx xxx xxx IBM 04/94 92 xxx xxx xxx IBM 05/94 97 xxx xxx xxx IBM 06/94 95 xxx xxx xxx IBM 07/94 90 xxx xxx xxx . . IBM 11/94 98 xxx xxx xxx IBM 12/94 95 xxx xxx xxx MSFT 01/94 120 xxx xxx 89.3 MSFT 02/94 118 xxx xxx 89.6 MSFT 03/94 115 xxx xxx xxx . . MSFT 11/94 124 xxx xxx xxx 3M 01/94 58 xxx xxx 89.3 3M 02/94 59 xxx xxx 89.6 . .

Thus, I can regress price on avg_mkt for each stock. Any suggestion will be greatly appreciated. Thanks again.

Robin Chou Department of Finance University of Iowa Iowa City, IA 52242


Back to: Top of message | Previous page | Main SAS-L page