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]

st: Thread-Index: AQHNGEBCIuB42jRH6ke3cai302EPyw==


From   Mark Bailie <mbailie05@qub.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Thread-Index: AQHNGEBCIuB42jRH6ke3cai302EPyw==
Date   Thu, 12 Apr 2012 01:07:32 +0100

Hi, 

I have daily data of stock prices dating back to the 1950s and I would like to collapse the dataset into weekly data.

I want the weekly data to be formed from the stock price on every Wednesday.

Some weeks do not have a Wednesday, due to the stock markets closed that day.  In these cases I want to use the value from Tuesday for that week.

Bascially:

COLLAPSE DAILY TO WEEKLY ON EACH WEDNESDAY -- ALTHOUGH IF THERE IS NO WEDNESDAY THAT WEEK TAKE THE TUESDAY VALUE  --   IF NO TUESDAY, TAKE THE THURSDAY

Can this be done?

Kind regards,

Mark
*
*   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