Date: Tue, 20 Jun 2006 06:01:04 -0400
Reply-To: Thomas <tythong@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Thomas <tythong@YAHOO.COM>
Subject: Re: WKret
Hi Howard,
I would like to present an example here (dataset and desired output) and
hope you could kindly help me at your convenience to achieve the correct
weekly compounding concept.
The compounding return is from Thursday to Wednesday. If Thursday is
holiday or no trading, the subsequent non-holiday or trading day
observation will be the starting of the week. If Wednesday is holiday or
non-trading, the day before will be the end of the week. Thus, the
compounding concept is to capture every week returns.
Thank you very much!
Warm regards,
Thomas
/*data*/
date com ret weekday
20010830 MSFT -0.054937784 5
20010831 MSFT 0.001931869 6
20010904 MSFT -0.016652074 3
20010905 MSFT 0.029233569 4
20010906 MSFT -0.029788729 5
20010907 MSFT -0.011067457 6
20010910 MSFT 0.039350186 2
20010917 MSFT -0.081104584 2
20010918 MSFT 0.026649024 3
20010919 MSFT -0.008284256 4
20010920 MSFT -0.057731587 5
20010921 MSFT -0.020685565 6
20010924 MSFT 0.04626834 2
20010925 MSFT -0.013651203 3
20010926 MSFT -0.020077949 4
20010927 MSFT -0.006166727 5
20010928 MSFT 0.024219358 6
20011001 MSFT 0.012116529 2
20011002 MSFT 0.024328988 3
20011003 MSFT 0.059943456 4
/*Desired output*/
20010830 MSFT -0.041659725 Thursday, August 30, 2001
20010906 MSFT -0.00277104 Thursday, September 6, 2001
20010913 MSFT -0.064432145 Thursday, September 13, 2001
20010920 MSFT -0.066827521 Thursday, September 20, 2001
20010926 MSFT 0.118559759 Thursday, September 26, 2001
|