<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80153#M530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;read &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003154994.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003154994.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 17:15:30 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2013-04-11T17:15:30Z</dc:date>
    <item>
      <title>Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80147#M524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hi i have a daily stock price panel data over a period of years, i want to calculate weekly standard deviation for each stock and then use it as a regressor in a regression equation, how can i do it, please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;i have data like this&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data have;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;input stockname $ price date year;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;cards;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 26&amp;nbsp; 20071205 2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 46&amp;nbsp; 20071206 2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 36&amp;nbsp; 20071207 2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 26&amp;nbsp; 20071208 2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 26&amp;nbsp; 20071210 2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 35 20071212 2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 75 20080123 2008&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 45 20080224 2008&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 55 20090612 2009&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 51 20090613 2009&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;abc 57 20090614 2009&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;xyz 26&amp;nbsp; 20071205 2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;xyz 35 20071206 2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;xyz 75 20080123 2008&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;xyz&amp;nbsp; 45 20080612 2008&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;frequency and number of stock is much higher though, i have tried to use proc means but it is not working for the panel data for me, i am really stuck up right no and cant figure out how to do it&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P&gt; data ghf;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;format date date9.;&lt;/P&gt;&lt;P&gt;yrwk=year(date)*100+week(date,"U");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data = ghf;&lt;/P&gt;&lt;P&gt;by yrwk stockname;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc means data=ghf std; &lt;/P&gt;&lt;P&gt;&amp;nbsp; var _numeric_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by yrwk stockname;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output out=dsd;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it gives me a messy output i.e. for every stock for each date it gives me STD MEAN and other stats too, is there any more efficient way to do this?? PLEASE HELP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 12:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80147#M524</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2012-11-26T12:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80148#M525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not just limit the output to what you need?&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data need;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.pricedata;&lt;/P&gt;&lt;P&gt;&amp;nbsp; yrwk=year(date)*100+week(date,"U");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=need nway;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var _numeric_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class regionName yrwk;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output out=want (drop=_:) mean= std= /autoname;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 14:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80148#M525</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-26T14:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80149#M526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello &lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;, i have a question, when i creak an year week variable as you have mentioned above, why doe sas graph does not treat it as a date variable ??? when i make graphs it gives me discontinuity although there are none in the data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="255172" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 05:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80149#M526</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-04-11T05:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80150#M527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For graphing you would get better results with a genuine date variable such as :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;yrwk = intnx("WEEK",date,0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;format yrwk yyweeku.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then, if you use SGPLOT graphing proc :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;series x=yrwk y=ystd / group=regionName;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;xaxis type=time tickvalueformat=yyweeku. fitpolicy=thin;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 13:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80150#M527</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-04-11T13:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80151#M528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; but now as i have wee,ly data, based on the yrwk variable i created , and now i dont have date variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now my yrwk variable has the following format 200601 ....200652;;;;;;;;;200701.......200752&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i convert this variable in a&amp;nbsp; year week format which sas treats like a date variable??*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 15:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80151#M528</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-04-11T15:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80152#M529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anyone please tell me what &lt;STRONG&gt;week(date,"U") &lt;/STRONG&gt;does?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 17:03:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80152#M529</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-04-11T17:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80153#M530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;read &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003154994.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003154994.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 17:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80153#M530</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-04-11T17:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80154#M531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="809722" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: Have you looked up and read the page in the documentation?&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003154994.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003154994.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 17:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80154#M531</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-04-11T17:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80155#M532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks guys&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 17:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80155#M532</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-04-11T17:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help to calculate weekly standard deviation from daily price panel data--URGENT HELP REQUIRED</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80156#M533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you have to do a bit of back flipping to recover the week dates (untested)...&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;data wantGraph;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;set want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;/* transform number 200601 into string "2006W0101" and read with WEEKU9. informat */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;yrwkDate = input(cats(floor(yrwk/100),"W",put(mod(yrwk,100),z2.),"01"),weeku9.);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;format yrwkDate yyweeku.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;proc sgplot data=wantGraph;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;series x=yrwkDate y=price_std / group=regionName;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;xaxis type=time tickvalueformat=yyweeku. fitpolicy=thin;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Apr 2013 02:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Help-to-calculate-weekly-standard-deviation-from-daily-price/m-p/80156#M533</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-04-13T02:40:26Z</dc:date>
    </item>
  </channel>
</rss>

