Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Thread-Index: AQHNGEBCIuB42jRH6ke3cai302EPyw==


From   Mark Bailie <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index