<?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 Sorting data into deciles in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-into-deciles/m-p/470981#M120579</link>
    <description>&lt;P&gt;Hi SAS community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large dataset (2000 stocks) with 180 month observations.&amp;nbsp;For each stock I have three variables, Returns, Market Cap and transection cost.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to sort data initially&amp;nbsp;based on transection cost to 4 groups (500 stocks in each group), with group-1 containing stocks with the lowest transection cost and Group-4 containing stocks with the highest transection cost. Then I would like to sort stocks in each group into 10 deciles based on the market cap and calculating returns of each of these deciles (for example decile-1 in group-1 has 50 stocks, so I want to calculate the returns of these stocks). I would like the&amp;nbsp;machine to do the same procedure for each month, so finally I can calculate the average returns of each decile for the full period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example: What I am trying to test is to see if&amp;nbsp;stocks with the lowest transection cost and lowest Market Cap (Group-1, Decile-1) have higher average returns than stocks with highest transection cost and highest Market Cap (Group-4, Decile-10).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this is too much to ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas or suggestions how I may get this done will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jun 2018 07:11:57 GMT</pubDate>
    <dc:creator>Yazeed_10</dc:creator>
    <dc:date>2018-06-18T07:11:57Z</dc:date>
    <item>
      <title>Sorting data into deciles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-into-deciles/m-p/470981#M120579</link>
      <description>&lt;P&gt;Hi SAS community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large dataset (2000 stocks) with 180 month observations.&amp;nbsp;For each stock I have three variables, Returns, Market Cap and transection cost.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to sort data initially&amp;nbsp;based on transection cost to 4 groups (500 stocks in each group), with group-1 containing stocks with the lowest transection cost and Group-4 containing stocks with the highest transection cost. Then I would like to sort stocks in each group into 10 deciles based on the market cap and calculating returns of each of these deciles (for example decile-1 in group-1 has 50 stocks, so I want to calculate the returns of these stocks). I would like the&amp;nbsp;machine to do the same procedure for each month, so finally I can calculate the average returns of each decile for the full period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example: What I am trying to test is to see if&amp;nbsp;stocks with the lowest transection cost and lowest Market Cap (Group-1, Decile-1) have higher average returns than stocks with highest transection cost and highest Market Cap (Group-4, Decile-10).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this is too much to ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas or suggestions how I may get this done will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 07:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-into-deciles/m-p/470981#M120579</guid>
      <dc:creator>Yazeed_10</dc:creator>
      <dc:date>2018-06-18T07:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting data into deciles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-data-into-deciles/m-p/470986#M120582</link>
      <description>&lt;P&gt;1) Sort the data by transaction, then assign group based on a retained count up to 500, then add 1.&lt;/P&gt;
&lt;P&gt;2) do this "deciles" thing based on a by group of month.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what else we can provide with zero information.&amp;nbsp; Test data in the form of a datastep, required output etc.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 07:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-data-into-deciles/m-p/470986#M120582</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-18T07:46:27Z</dc:date>
    </item>
  </channel>
</rss>

