<?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: After breaking through the historical high, calculate the six-month return of that stock in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923784#M363667</link>
    <description>&lt;P&gt;You can't use LAST.Breakhigh because it isn't established yet in the code. In other words, it does not exist in your CSRP data set. The variable exists in HIGHS, so you would need to use FIRST/LAST on the next data set you create. This comes down to how the &lt;A href="https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/TASS/Mehatab-DataStepPDV.pdf" target="_self"&gt;PDV works&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FIRST/LAST processing can occur when the variable exists on the input data set, you have sorted it by the desired variables, and you include it on the BY statement after the SET statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please provide usable data for us. You can use the &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;data to data step macro&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2024 12:43:57 GMT</pubDate>
    <dc:creator>maguiremq</dc:creator>
    <dc:date>2024-04-10T12:43:57Z</dc:date>
    <item>
      <title>After breaking through the historical high, calculate the six-month return of that stock</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923758#M363656</link>
      <description>&lt;P&gt;1.May I know why Variable 'last.breakhigh'n is uninitialized?&lt;/P&gt;&lt;P&gt;2.How may I solve MERGE statement has more than one data set with repeats of BY values?&lt;/P&gt;&lt;P&gt;Thx!!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="擷取.JPG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95284i2B81A127E8B024E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="擷取.JPG" alt="擷取.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;DM'LOG; CLEAR; OUT; CLEAR; ODSRESULTS; CLEAR;';&lt;/P&gt;&lt;P&gt;%let folder=%str(C:\Users\SC\Desktop\HIGH);&lt;/P&gt;&lt;P&gt;LIBNAME HIGH "&amp;amp;folder";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt; CRSP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET&amp;nbsp;&amp;nbsp; HIGH.DAILY;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt; CRSP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET&amp;nbsp; CRSP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRC=ABS(PRC);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF SHRCD^=&lt;STRONG&gt;10&lt;/STRONG&gt; AND SHRCD^=&lt;STRONG&gt;11&lt;/STRONG&gt; THEN DELETE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF RET=-&lt;STRONG&gt;66&lt;/STRONG&gt; THEN RET=&lt;STRONG&gt;.&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF RET=-&lt;STRONG&gt;77&lt;/STRONG&gt; THEN RET=&lt;STRONG&gt;.&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF RET=-&lt;STRONG&gt;88&lt;/STRONG&gt; THEN RET=&lt;STRONG&gt;.&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF RET=-&lt;STRONG&gt;99&lt;/STRONG&gt; THEN RET=&lt;STRONG&gt;.&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KEEP PERMNO DATE PRC RET;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;SORT&lt;/STRONG&gt; DATA= CRSP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BY PERMNO DATE;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; highs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set CRSP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by PERMNO date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; retain highest &lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if first.PERMNO then highest = PRC;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else highest = max(highest, PRC);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if PRC &amp;gt; highest then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BREAKHIGH = &lt;STRONG&gt;1&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; six_months_later = intnx('month', date, &lt;STRONG&gt;6&lt;/STRONG&gt;, 'same');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else BREAKHIGH = &lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if BREAKHIGH = &lt;STRONG&gt;1&lt;/STRONG&gt; then last_break_date = date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else if last.breakhigh then last_break_date = &lt;STRONG&gt;.&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; Returns;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge highs(in=a) CRSP(in=b rename=(date=date_future PRC=PRC_future));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by PERMNO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if a and b and intck('month', last_break_date, date_future) = &lt;STRONG&gt;6&lt;/STRONG&gt; then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; six_month_return = (PRC_future - PRC) / PRC;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 08:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923758#M363656</guid>
      <dc:creator>Irenelee</dc:creator>
      <dc:date>2024-04-10T08:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: After breaking through the historical high, calculate the six-month return of that stock</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923784#M363667</link>
      <description>&lt;P&gt;You can't use LAST.Breakhigh because it isn't established yet in the code. In other words, it does not exist in your CSRP data set. The variable exists in HIGHS, so you would need to use FIRST/LAST on the next data set you create. This comes down to how the &lt;A href="https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/TASS/Mehatab-DataStepPDV.pdf" target="_self"&gt;PDV works&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FIRST/LAST processing can occur when the variable exists on the input data set, you have sorted it by the desired variables, and you include it on the BY statement after the SET statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please provide usable data for us. You can use the &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;data to data step macro&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 12:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923784#M363667</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2024-04-10T12:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: After breaking through the historical high, calculate the six-month return of that stock</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923793#M363671</link>
      <description>&lt;P&gt;Thank you for your reply, data to data step macro seem hard to me to understand how to create, sry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I further know how to define last.breakhigh would be ok?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 14:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923793#M363671</guid>
      <dc:creator>Irenelee</dc:creator>
      <dc:date>2024-04-10T14:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: After breaking through the historical high, calculate the six-month return of that stock</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923809#M363672</link>
      <description>&lt;P&gt;I put short version data via google, is it easier for help? Thx a lot!&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1ayhUMgH0j2IuIykNpgUt6WbPg-7Gx-JA/view" target="_blank"&gt;https://drive.google.com/file/d/1ayhUMgH0j2IuIykNpgUt6WbPg-7Gx-JA/view&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 14:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923809#M363672</guid>
      <dc:creator>Irenelee</dc:creator>
      <dc:date>2024-04-10T14:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: After breaking through the historical high, calculate the six-month return of that stock</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923848#M363684</link>
      <description>&lt;P&gt;There are a number of issues with your management of the CRSP data, some minor, some major.&amp;nbsp; Here's a couple:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&amp;nbsp; (Minor):&amp;nbsp; Instead of copying dataset high.daily to dataset work.crsp, and then modifying work.crsp with a second data step, do the second data step with a SET HIGH.DAILY instead of SET CRSP statement.&amp;nbsp; &amp;nbsp;Save resources.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;(Major):&amp;nbsp; Your code below is meant to make a dummy variable BREAKHIGH, but it will never get a value of 1.&amp;nbsp; The code you present is:&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data highs;
    set CRSP;
    by PERMNO date;

    retain highest 0;
    if first.PERMNO then highest = PRC;

    else highest = max(highest, PRC);
    if PRC &amp;gt; highest then do;
        BREAKHIGH = 1;
        six_months_later = intnx('month', date, 6, 'same');
    end;
    else BREAKHIGH = 0;

    if BREAKHIGH = 1 then last_break_date = date;
    else if last.breakhigh then last_break_date = .;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Since you set PRC to max(highest,PRC) &lt;EM&gt;&lt;STRONG&gt;prior&lt;/STRONG&gt;&lt;/EM&gt; to your "if PRC &amp;gt; highest then do;" statement, the if test is never true.&amp;nbsp; And breakthrough will never take the value of 1, nor will you ever assign a value to six_months_later.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;So here are some questions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I assume that breakthrough high means "highest PRC so far", yes?&amp;nbsp; In other words, you want to compare PRC to the highest &lt;EM&gt;&lt;STRONG&gt;PRECEDING&lt;/STRONG&gt;&lt;/EM&gt; PRC, correct?&lt;/LI&gt;
&lt;LI&gt;Can the first obs be a breakthrough high (since there is no preceding history)?&lt;/LI&gt;
&lt;LI&gt;What is the purpose of the code below?&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if BREAKHIGH = 1 then last_break_date = date;
    else if last.breakhigh then last_break_date = .;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Finaly please provide an example of what you want the OUTPUT to look like.&amp;nbsp; I can't tell whether you need dataset HIGHs to only have breakthrough=1 obs, or needs to have all obs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 17:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923848#M363684</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2024-04-10T17:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: After breaking through the historical high, calculate the six-month return of that stock</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923959#M363704</link>
      <description>&lt;P&gt;Thank you for your reply!&lt;/P&gt;&lt;P&gt;yes, breakthrough high means "highest PRC so far",&lt;/P&gt;&lt;P&gt;I want to compare PRC to the highest&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;PRECEDING&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;PRC,and divide into 2 group.&lt;/P&gt;&lt;P&gt;and run the excess return by 3 factor model by this two group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first obs be a breakthrough high should be after one year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What the output I want to produce is as below, instead of by breakthough 52-weeks high, but by historical high. Thx!!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95466iDF72BCCC66833BCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 13:21:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923959#M363704</guid>
      <dc:creator>Irenelee</dc:creator>
      <dc:date>2024-04-11T13:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: After breaking through the historical high, calculate the six-month return of that stock</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923971#M363705</link>
      <description>&lt;P&gt;Thank you!&lt;BR /&gt;&lt;BR /&gt;I want SAS program that define the highest historical prices of each stock from 1963 to 2023, and create a new variable BREAKHIGH to represent when the closing price breaks through the historical high. After breaking through the historical high, calculate the six-month return of that stock. I want to divide into 2 group by breakthrough historical high and the rest,and run the excess return by 3/4/5 factor model by this two group.&lt;BR /&gt;the first obs be a breakthrough high should be after one year historical data.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 14:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/923971#M363705</guid>
      <dc:creator>Irenelee</dc:creator>
      <dc:date>2024-04-11T14:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: After breaking through the historical high, calculate the six-month return of that stock</title>
      <link>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/924016#M363730</link>
      <description>&lt;P&gt;More comments:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Stocks can split, or similar events can take place over the stock price history.&amp;nbsp; CRSP has a variable CFACPR (cumulative adjustment for prices) which would allow you to adjust prices so that you don't get a misleading return when such an event happens.&amp;nbsp; Why are you not adjusting prices?&amp;nbsp; If there is a stock split (say 2 for 1), the new stock would have to exceed TWICE the previous historic high to qualify as a breakthrough in the absence of such a n adjustment.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Presumably a stock can have multiple breakthrough high's over its history.&amp;nbsp; Do you want 6-month returns for each such event?&amp;nbsp; &amp;nbsp; What if there is a 5-day sequence of consecutive break throughs?&amp;nbsp; Do you want a six-month return for each (i.e. 5 overlapping 6 month returns)?&amp;nbsp; Or for only the last one?&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;You apparently want to compare six-month returns for historical highs vs "the rest".&amp;nbsp; How will you select the rest?&amp;nbsp; Do you plan on generating tens of thousands of (overlapping) six-month returns for all the other dates?&amp;nbsp; Or will you be more selective?&amp;nbsp; Will "the rest" be prohibited from overlapping any six-month period after a historic high?&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;What if a historical high occurs less than 6 months prior to your last date?&amp;nbsp; Will such dates be ignored?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 11 Apr 2024 18:24:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/After-breaking-through-the-historical-high-calculate-the-six/m-p/924016#M363730</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2024-04-11T18:24:10Z</dc:date>
    </item>
  </channel>
</rss>

