Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: data processing (daily to yearly)


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: data processing (daily to yearly)
Date   Tue, 5 Apr 2011 08:10:55 +0100

Sounds like homework. Statalist does not encourage students to get
others to do their
assignments for them. See the FAQ.

On Tue, Apr 5, 2011 at 1:15 AM, Arlene Young (yi yang
<yangyi.1122@yahoo.com.cn>) wrote:

> We have met a data processing problem.
>
> We now have a series of daily trading data for all stocks listed from year 2000 to 2011. Our assignments are:
>
> (1) For each stock, keep only the data on the last trading day of each year;
>
> (2) For each year, accumulate the daily trading data of single stock as to obtain the mean value as the final trading data of this stock.
>
> As to the first requirement, we find it hard to locate the last trading day of each year, since it may be December 31th, or December 29,th or else.
>
> As to the second requirement, we have no idea which function or order to use as to accumulate the daily data, and finally count the mean value.
>
> Could anyone kindly help us to locate the target record, or to tell us how to compute the mean value?
>
> Thank you and best wishes!
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index