<?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: create monthly decile Portfolios sorted on risk (3-years sorted by volatility) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586275#M167351</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         /* Generierter Code (IMPORT) */
 74         /* Quelldatei: SaS_Stoxx300.xlsx */
 75         /* Quellpfad: /folders/myshortcuts/MyFolders */
 76         /* Code generiert am: 04.09.19 23:51 */
 77         
 78         %web_drop_table(WORK.IMPORT);
 NOTE: Table WORK.IMPORT has been dropped.
 NOTE:  Verwendet wurde: PROZEDUR SQL - (Gesamtverarbeitungszeit):
       real time           0.01 seconds
       cpu time            0.02 seconds
       
 
 79         
 80         
 81         FILENAME REFFILE '/folders/myshortcuts/MyFolders/SaS_Stoxx300.xlsx';
 82         
 83         PROC IMPORT DATAFILE=REFFILE
 84         DBMS=XLSX
 85         OUT=WORK.IMPORT;
 86         GETNAMES=NO;
 87         SHEET="LogReturn";
 88         RUN;
 
 NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with 
       options MSGLEVEL=I.
 NOTE: The import data set has 262 observations and 304 variables.
 NOTE: WORK.IMPORT data set was successfully created.
 NOTE:  Verwendet wurde: PROZEDUR IMPORT - (Gesamtverarbeitungszeit):
       real time           3.20 seconds
       cpu time            3.09 seconds
       
 
 89         
 90         PROC CONTENTS DATA=WORK.IMPORT; RUN;
 
 NOTE:  Verwendet wurde: PROZEDUR CONTENTS - (Gesamtverarbeitungszeit):
       real time           2.46 seconds
       cpu time            2.45 seconds
       
 
 91         
 92         
 93         %web_open_table(WORK.IMPORT);
 94         
 95         proc means
 96         
 97         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
            _______
            22
            76
 ERROR 22-322: Syntaxfehler, erwartet wird eines der folgenden: ;, ALPHA, CHARTYPE, CLASSDATA, CLM, COMPLETETYPES, CSS, CV, DATA, 
               DESCEND, DESCENDING, DESCENDTYPES, EXCLNPWGT, EXCLNPWGTS, EXCLUSIVE, FW, IDMIN, INCAS, KURTOSIS, LCLM, MAX, MAXDEC, 
               MEAN, MEDIAN, MIN, MISSING, MODE, N, NDEC, NMISS, NOLABELS, NONOBS, NOPRINT, NOTHREADS, NOTRAP, NWAY, ORDER, P1, P10, 
               P20, P25, P30, P40, P5, P50, P60, P70, P75, P80, P90, P95, P99, PCTLDEF, PRINT, PRINTALL, PRINTALLTYPES, PRINTIDS, 
               PRINTIDVARS, PROBT, Q1, Q3, QMARKERS, QMETHOD, QNTLDEF, QRANGE, RANGE, SKEWNESS, STACKODS, STACKODSOUTPUT, STDDEV, 
               STDERR, SUM, SUMSIZE, SUMWGT, T, THREADS, UCLM, USS, VAR, VARDEF.  
 ERROR 76-322: Syntax error, statement will be ignored.
 98         ODS HTML CLOSE;
 99         &amp;amp;GRAPHTERM; ;*';*";*/;RUN;
 
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE:  Verwendet wurde: PROZEDUR MEANS - (Gesamtverarbeitungszeit):
       real time           0.11 seconds
       cpu time            0.02 seconds
       
 99       !                           QUIT;
 100        QUIT;RUN;
 101        ODS HTML5 (ID=WEB) CLOSE;
 102        
 103        ODS RTF (ID=WEB) CLOSE;
 104        ODS PDF (ID=WEB) CLOSE;
 NOTE: ODS PDF(WEB) printed 9 pages to /tmp/SAS_work4A5400000B32_localhost.localdomain/#LN00060.
 105        FILENAME _GSFNAME;
 NOTE: Fileref _GSFNAME has been deassigned.
 
 
 106        DATA _NULL_;
 107        RUN;
 
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 108        OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
 109        &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;this is my Log above and my Excel Datei you will see in the Attachments, thanks for trying help me Patrick.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2019 22:20:46 GMT</pubDate>
    <dc:creator>MarthelF</dc:creator>
    <dc:date>2019-09-04T22:20:46Z</dc:date>
    <item>
      <title>create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/583739#M166207</link>
      <description>&lt;P&gt;Hello dear People,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create 10 decile Portfolios from my datasets Europe Stoxx 300. i calculated the equal weighted Returns and the LogReturns as you can see on my Excel-data , but now i don't know how to sort this by Volatility. Please help me. Thanks you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2019 10:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/583739#M166207</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-08-25T10:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/583745#M166209</link>
      <description>&lt;P&gt;I've typed into Google: SAS decile&lt;/P&gt;
&lt;P&gt;First hit I've got:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Splitting-a-data-set-into-10-equal-deciles/td-p/267187" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Procedures/Splitting-a-data-set-into-10-equal-deciles/td-p/267187&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2019 11:30:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/583745#M166209</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-08-25T11:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/583754#M166216</link>
      <description>&lt;P&gt;thanks for your Help Patrick, i'm trying. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2019 12:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/583754#M166216</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-08-25T12:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586086#M167272</link>
      <description>&lt;P&gt;Hey Dear members,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried to calculate my volatility from my data&amp;nbsp; entered in SAS but i front many Problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;first the date change on numerical values for example&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;for &lt;FONT&gt;31.12.1997 ( Excel)&amp;nbsp;&lt;/FONT&gt; to 35795 ( SAS)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;i don`t understand why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;second the values are converted again in 100% for exampe&amp;nbsp; for&amp;nbsp; &lt;FONT&gt;-0.00928714889489078% ( Excel)&amp;nbsp;&lt;/FONT&gt; to &lt;SPAN style="color: #2b3138; font-family: AvenirNext, Helvetica, Arial, sans-serif; font-size: 14.224px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: nowrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ebedf0; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;-9.287148894890781E-5 (SAS)&lt;/SPAN&gt; , i don't need that why my data already are in percent.&lt;/P&gt;&lt;P&gt;for the calcul of my volatility i used first proc means but my Programm Shows me Errors, it doesn't recognize the command Rtnvol for volatility.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please can someone help me to unterstand what happens on my Programm and Shows me how i can calculate the volatility and sort my data on decile Portfolios sorted on 3- years volatility. i will be very grateful for your Help. Ths.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors showed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc means&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 76&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 22-322: Syntaxfehler, erwartet wird eines der folgenden: ;, ALPHA, CHARTYPE, CLASSDATA, CLM, COMPLETETYPES, CSS, CV, DATA,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;DESCEND, DESCENDING, DESCENDTYPES, EXCLNPWGT, EXCLNPWGTS, EXCLUSIVE, FW, IDMIN, INCAS, KURTOSIS, LCLM, MAX, MAXDEC,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MEAN, MEDIAN, MIN, MISSING, MODE, N, NDEC, NMISS, NOLABELS, NONOBS, NOPRINT, NOTHREADS, NOTRAP, NWAY, ORDER, P1, P10,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P20, P25, P30, P40, P5, P50, P60, P70, P75, P80, P90, P95, P99, PCTLDEF, PRINT, PRINTALL, PRINTALLTYPES, PRINTIDS,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRINTIDVARS, PROBT, Q1, Q3, QMARKERS, QMETHOD, QNTLDEF, QRANGE, RANGE, SKEWNESS, STACKODS, STACKODSOUTPUT, STDDEV,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STDERR, SUM, SUMSIZE, SUMWGT, T, THREADS, UCLM, USS, VAR, VARDEF.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;DIV class="sasSource"&gt;95 proc means data=rtnvol.rtnvol std;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Libref RTNVOL ist nicht zugewiesen.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;96&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;97 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;109&lt;/DIV&gt;&lt;PRE class="sasLog"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;many thanks for your Help.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 12:29:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586086#M167272</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-09-04T12:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586261#M167345</link>
      <description>&lt;P&gt;Please share your program, SAS Log and sample data (source Excel) to allow us to replicate the issue and to test amended and working code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;first the date change on numerical values for example 
 for 31.12.1997 ( Excel)  to 35795 ( SAS)
&lt;/PRE&gt;
&lt;P&gt;SAS stores dates as the count of days since 1/1/1960. You then apply a SAS format to print such a number human readable as a date string. ...but: The number you show us would return a different date than what Excel shows you.&lt;/P&gt;
&lt;P&gt;Not sure if anyone will be able to guess what's going wrong for you without seeing your code and some of the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ERROR 22-322: Syntaxfehler,....&lt;/PRE&gt;
&lt;P&gt;The SAS log tells you that there is a syntax error in your code but you haven't shared neither the code nor all of the relevant SAS log section with us.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 21:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586261#M167345</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-04T21:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586275#M167351</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         /* Generierter Code (IMPORT) */
 74         /* Quelldatei: SaS_Stoxx300.xlsx */
 75         /* Quellpfad: /folders/myshortcuts/MyFolders */
 76         /* Code generiert am: 04.09.19 23:51 */
 77         
 78         %web_drop_table(WORK.IMPORT);
 NOTE: Table WORK.IMPORT has been dropped.
 NOTE:  Verwendet wurde: PROZEDUR SQL - (Gesamtverarbeitungszeit):
       real time           0.01 seconds
       cpu time            0.02 seconds
       
 
 79         
 80         
 81         FILENAME REFFILE '/folders/myshortcuts/MyFolders/SaS_Stoxx300.xlsx';
 82         
 83         PROC IMPORT DATAFILE=REFFILE
 84         DBMS=XLSX
 85         OUT=WORK.IMPORT;
 86         GETNAMES=NO;
 87         SHEET="LogReturn";
 88         RUN;
 
 NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with 
       options MSGLEVEL=I.
 NOTE: The import data set has 262 observations and 304 variables.
 NOTE: WORK.IMPORT data set was successfully created.
 NOTE:  Verwendet wurde: PROZEDUR IMPORT - (Gesamtverarbeitungszeit):
       real time           3.20 seconds
       cpu time            3.09 seconds
       
 
 89         
 90         PROC CONTENTS DATA=WORK.IMPORT; RUN;
 
 NOTE:  Verwendet wurde: PROZEDUR CONTENTS - (Gesamtverarbeitungszeit):
       real time           2.46 seconds
       cpu time            2.45 seconds
       
 
 91         
 92         
 93         %web_open_table(WORK.IMPORT);
 94         
 95         proc means
 96         
 97         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
            _______
            22
            76
 ERROR 22-322: Syntaxfehler, erwartet wird eines der folgenden: ;, ALPHA, CHARTYPE, CLASSDATA, CLM, COMPLETETYPES, CSS, CV, DATA, 
               DESCEND, DESCENDING, DESCENDTYPES, EXCLNPWGT, EXCLNPWGTS, EXCLUSIVE, FW, IDMIN, INCAS, KURTOSIS, LCLM, MAX, MAXDEC, 
               MEAN, MEDIAN, MIN, MISSING, MODE, N, NDEC, NMISS, NOLABELS, NONOBS, NOPRINT, NOTHREADS, NOTRAP, NWAY, ORDER, P1, P10, 
               P20, P25, P30, P40, P5, P50, P60, P70, P75, P80, P90, P95, P99, PCTLDEF, PRINT, PRINTALL, PRINTALLTYPES, PRINTIDS, 
               PRINTIDVARS, PROBT, Q1, Q3, QMARKERS, QMETHOD, QNTLDEF, QRANGE, RANGE, SKEWNESS, STACKODS, STACKODSOUTPUT, STDDEV, 
               STDERR, SUM, SUMSIZE, SUMWGT, T, THREADS, UCLM, USS, VAR, VARDEF.  
 ERROR 76-322: Syntax error, statement will be ignored.
 98         ODS HTML CLOSE;
 99         &amp;amp;GRAPHTERM; ;*';*";*/;RUN;
 
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE:  Verwendet wurde: PROZEDUR MEANS - (Gesamtverarbeitungszeit):
       real time           0.11 seconds
       cpu time            0.02 seconds
       
 99       !                           QUIT;
 100        QUIT;RUN;
 101        ODS HTML5 (ID=WEB) CLOSE;
 102        
 103        ODS RTF (ID=WEB) CLOSE;
 104        ODS PDF (ID=WEB) CLOSE;
 NOTE: ODS PDF(WEB) printed 9 pages to /tmp/SAS_work4A5400000B32_localhost.localdomain/#LN00060.
 105        FILENAME _GSFNAME;
 NOTE: Fileref _GSFNAME has been deassigned.
 
 
 106        DATA _NULL_;
 107        RUN;
 
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 108        OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
 109        &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;this is my Log above and my Excel Datei you will see in the Attachments, thanks for trying help me Patrick.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 22:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586275#M167351</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-09-04T22:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586280#M167353</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286495"&gt;@MarthelF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking into your Excel it appears that the data only starts on row 4.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 161px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32217iC2669A392722F915/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The DATAROW=4 statement will instruct SAS to only analyze and read data from row 4. Without this statement Proc Import will read data from row 1 if getnames=no and from row 2 if getnames=yes. And if reading from row 1 or 2 already SAS will find for all columns at least one occurrence where there are strings in a cell and though read all the data as strings and create for all columns SAS character variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below code should read your Excel source as you need it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME REFFILE '/folders/myshortcuts/MyFolders/SaS_Stoxx300.xlsx';

PROC IMPORT DATAFILE=REFFILE
  DBMS=XLSX
  OUT=WORK.IMPORT
  replace;
  GETNAMES=yes;
  SHEET="LogReturn";
  datarow=4;
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You get the syntax error because you've got a PROC MEANS in your code which is not ended with a semicolon - and then an Options statement. For SAS this looks like you want to use a keyword of OPTIONS as something that belongs to the Proc Means procedure. ....and as no such keyword exists for Proc Means SAS tells you that it's a syntax error and then provides a list of valid keywords.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 94         
 95         proc means
 96         
 97         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
            _______
            22
            76
 ERROR 22-322: Syntaxfehler, erwartet wird eines der folgenden: ;, ALPHA, CHARTYPE, CLASSDATA, CLM, COMPLETETYPES, CSS, CV, DATA, 
               DESCEND, DESCENDING, DESCENDTYPES, EXCLNPWGT, EXCLNPWGTS, EXCLUSI&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 23:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586280#M167353</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-04T23:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586282#M167354</link>
      <description>&lt;P&gt;thanks you patrick&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; i didn´t know that, thanks so much.&amp;nbsp; i will bring on my Code this new command, sorry About the command Proc means to make another calcul of the volatility, i'm confused,&amp;nbsp; you mean i will end it with semicolumn right? thanks you in Advance. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 23:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586282#M167354</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-09-04T23:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586284#M167355</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286495"&gt;@MarthelF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is nothing to apologize for.&lt;/P&gt;
&lt;P&gt;You need to write a proper Proc Means block similar to your Proc Import. If you're new to SAS and using a client like SAS EG or SAS Studio then eventually use one of the tasks/wizard first to click "together" a report. This will generate you valid SAS syntax which you then still can change manually if required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 23:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586284#M167355</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-04T23:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586288#M167357</link>
      <description>&lt;P&gt;thanks Patrick, it's going well now with the semicolomn and i get this result below as you can see on my Attachments. the second step now will be which'Code will be needed to calcul my volatility and sort the data on the past 3 years volatility. i tried this after proc means in the follow Code but get this result with error.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         /* Generierter Code (IMPORT) */
 74         /* Quelldatei: SaS_Stoxx300.xlsx */
 75         /* Quellpfad: /folders/myshortcuts/MyFolders */
 76         /* Code generiert am: 04.09.19 23:51 */
 77         
 78         %web_drop_table(WORK.IMPORT);
 NOTE: Table WORK.IMPORT has been dropped.
 NOTE:  Verwendet wurde: PROZEDUR SQL - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 79         
 80         
 81         FILENAME REFFILE '/folders/myshortcuts/MyFolders/SaS_Stoxx300.xlsx';
 82         
 83         PROC IMPORT DATAFILE=REFFILE
 84         DBMS=XLSX
 85         OUT=WORK.IMPORT
 86         Replace;
 87         GETNAMES=NO;
 88         SHEET="LogReturn";
 89         datarow=4;
 90         
 91         RUN;
 
 NOTE: The import data set has 259 observations and 304 variables.
 NOTE: WORK.IMPORT data set was successfully created.
 NOTE:  Verwendet wurde: PROZEDUR IMPORT - (Gesamtverarbeitungszeit):
       real time           3.31 seconds
       cpu time            3.02 seconds
       
 
 92         
 93         PROC CONTENTS DATA=WORK.IMPORT; RUN;
 
 NOTE:  Verwendet wurde: PROZEDUR CONTENTS - (Gesamtverarbeitungszeit):
       real time           2.08 seconds
       cpu time            2.03 seconds
       
 
 94         
 95         
 96         %web_open_table(WORK.IMPORT);
 97         
 98         
 99         proc means;
 100        
 
 NOTE: There were 259 observations read from the data set WORK.IMPORT.
 NOTE:  Verwendet wurde: PROZEDUR MEANS - (Gesamtverarbeitungszeit):
       real time           5.72 seconds
       cpu time            5.72 seconds
       
 
 101        Proc summary data=rtnvol.rtnvol nway;
 ERROR: Libref RTNVOL ist nicht zugewiesen. ( that mean : Libref RTNVOL is not assigned)
 102        
 103        
 104        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 116        &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 00:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586288#M167357</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-09-05T00:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586289#M167358</link>
      <description>&lt;P&gt;The easiest way to answer your question:&lt;/P&gt;
&lt;P&gt;We've got your source data. Now show us exactly how the desired result should look like using this sample data. Please use the exactly same variable names. Just post a table with sufficient content that let's us understand how source maps to target.&lt;/P&gt;
&lt;P&gt;Provide also some narrative explaining the logic how you get from your source to your target.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 00:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586289#M167358</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-05T00:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586404#M167409</link>
      <description>&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying my Questions. i added on the Attachments the Excel-data and explained how i would like to have the result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for hear you soon.&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:41:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586404#M167409</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-09-05T12:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586573#M167445</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286495"&gt;@MarthelF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe you've missed that the last Proc Import I've posted didn't read in the data 100% how you need it. Especially the Firm names didn't make it into SAS. Below an amended version which should do the job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I won't be doing all the work for you. The code below covers the first and likely hardest bit for you. It returns the deciles per month and is close to your &lt;EM&gt;first table&lt;/EM&gt; sample. Please note that I'm transposing the data into a long format as this is in most cases a much better data structure to work with.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME REFFILE '/folders/myshortcuts/MyFolders/SaS_Stoxx300.xlsx';
PROC IMPORT DATAFILE=REFFILE
  DBMS=XLSX
  OUT=WORK.IMPORT
  replace;
  GETNAMES=yes;
  SHEET="LogReturn";
  RANGE='a3:zz99999999999'n;
RUN;

proc sort data=work.import(keep=_numeric_);
  by date;
run;

proc transpose 
      data=work.import  
      out=work.transposed(rename=(_label_=Firm Volatility1=Volatility) where=(not missing(Volatility)) drop=_name_)
      prefix=Volatility;
  by date;
run;

proc rank data=work.transposed groups=10 descending out=work.ranked;
  var Volatility;
  ranks Decile;
  by date;
run;

proc sort data=work.ranked;
  by date decile;
run;

proc print data=work.ranked;
  by date;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I didn't really understand why in your &lt;EM&gt;first table&lt;/EM&gt;&amp;nbsp;the volatility in D1 could be higher than in D10.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below what Proc Print returns. You can of course create more elaborate reports using Procedures like Proc Report or Proc Tabulate.&lt;/P&gt;
&lt;P&gt;Proc Rank returns the deciles with a number between 0-9. If you want these numbers to print as D1-D10 then create a format and apply this format to variable Decile for printing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 462px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32240iC56384ACDA40E9F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 00:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586573#M167445</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-06T00:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586592#M167459</link>
      <description>&lt;P&gt;thanks you so much&amp;nbsp; Patrick, you're someone Special!:)&amp;nbsp;&lt;/P&gt;&lt;P&gt;About your Question: " &lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 150%; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I didn't really understand why in your &lt;/SPAN&gt;&lt;EM&gt;first table&lt;/EM&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 150%; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp;the volatility in D1 could be higher than in D10." It was just some example taking by me, so for the volatility effect like the authors say.&amp;nbsp; the volatility of this Decil portfolio D1 should be smaller than of the volatility of the higher Decil Portfolio D10, so that is what i Need to prouve on my Thesis. i'm so grateful of your Help. so I'm trying now all the Code you sended me and come back to you by any other Questions because i Need for this founded result a descriptive Analysis. Thanks you and good day or night!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 01:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586592#M167459</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-09-06T01:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586594#M167460</link>
      <description>&lt;P&gt;If you have a follow-up question then please start this as a new question - eventually posting a reference link to what's here.&lt;/P&gt;
&lt;P&gt;If it's more of an analytics question then post it into the analytics forum - and same for reporting into a reporting forum.&lt;/P&gt;
&lt;P&gt;This gives you a better chance that the right people look into it.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 01:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586594#M167460</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-06T01:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586608#M167466</link>
      <description>&lt;P&gt;ok Patrick, thanks. Sorry but i verified and applied the Code, i think Maybe you have forgotten to calculate the Volatility. If i have very well unterstood the Code you have assigned at a new colomn the Name Volatility but when i checked the numeric data, they are remained unchanged. can't you please checked this? thanks you in Advance.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 03:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586608#M167466</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-09-06T03:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586617#M167472</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286495"&gt;@MarthelF&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought you've calculated the volatility already and now need just the ranking.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you're doing here is not really in my area of expertise so I suggest you split up your problem and then ask new questions one step at a time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd start with the transformed data structure (giving the Volatility column the appropriate name) and describe the logic you require to get from the "have" data to a column containing the volatility.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 04:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586617#M167472</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-06T04:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: create monthly decile Portfolios sorted on risk (3-years sorted by volatility)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586694#M167490</link>
      <description>&lt;P&gt;thanks for your Proposition Patrick. and many thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 10:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-monthly-decile-Portfolios-sorted-on-risk-3-years-sorted/m-p/586694#M167490</guid>
      <dc:creator>MarthelF</dc:creator>
      <dc:date>2019-09-06T10:52:16Z</dc:date>
    </item>
  </channel>
</rss>

