<?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: MA(2) in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255190#M2608</link>
    <description>&lt;P&gt;Suggest you post it at here&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="https://communities.sas.com/t5/Forecasting-and-Econometrics/bd-p/forecasting_econometrics" target="_blank"&gt;Forecasting and Econometrics&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Forecasting-and-Econometrics/bd-p/forecasting_econometrics" target="_blank"&gt;https://communities.sas.com/t5/Forecasting-and-Econometrics/bd-p/forecasting_econometrics&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since it is a question related to SAS/ETS&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2016 08:42:00 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-03-08T08:42:00Z</dc:date>
    <item>
      <title>MA(2)</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/254914#M2605</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am hoping this would be my last question,&lt;/P&gt;&lt;P&gt;I am trying to&amp;nbsp;measure a fund’s asset liquidity, which is estimated based&lt;BR /&gt;on an MA(2) model of returns (moving average model with two lags) and is between 0 and1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date &amp;nbsp; &amp;nbsp; &amp;nbsp; Return &amp;nbsp; &amp;nbsp; AUM &amp;nbsp; &amp;nbsp;mainstrategy&lt;/P&gt;&lt;P&gt;199512 &amp;nbsp; -0.0055 &amp;nbsp; 26.9 &amp;nbsp; &amp;nbsp; Relative value&lt;/P&gt;&lt;P&gt;199601 &amp;nbsp; &amp;nbsp;0.0048 &amp;nbsp; 27.1 &amp;nbsp; &amp;nbsp; &amp;nbsp;Relative value&lt;/P&gt;&lt;P&gt;199602 &amp;nbsp; &amp;nbsp;0.0089 &amp;nbsp; 30.7 &amp;nbsp; &amp;nbsp; &amp;nbsp;CTA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12355i91D30C2AA592A2FD/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Untitled.png" title="Untitled.png" /&gt;</description>
      <pubDate>Mon, 07 Mar 2016 11:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/254914#M2605</guid>
      <dc:creator>bukky09</dc:creator>
      <dc:date>2016-03-07T11:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: MA(2)</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255190#M2608</link>
      <description>&lt;P&gt;Suggest you post it at here&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="https://communities.sas.com/t5/Forecasting-and-Econometrics/bd-p/forecasting_econometrics" target="_blank"&gt;Forecasting and Econometrics&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Forecasting-and-Econometrics/bd-p/forecasting_econometrics" target="_blank"&gt;https://communities.sas.com/t5/Forecasting-and-Econometrics/bd-p/forecasting_econometrics&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since it is a question related to SAS/ETS&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 08:42:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255190#M2608</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-08T08:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: MA(2)</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255226#M2609</link>
      <description>&lt;P&gt;What tools do you want to use to solve this problem? You posted to the SAS/IML discussion forum, but your question is not directly related to matrix programming.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 13:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255226#M2609</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-03-08T13:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: MA(2)</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255229#M2610</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;I posted to the wrong forum. I posted it again to the appropriate forum. However I will be glad if you could help me.&lt;/P&gt;&lt;P&gt;proc arima data = sample ;&lt;BR /&gt;by mainstrategy;&lt;/P&gt;&lt;P&gt;identify var=returns nlag=6 outcov=acf noprint ;&lt;/P&gt;&lt;P&gt;estimate q=2;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;Is there a problem with using the by statement in arima procedure. Is there another way to achieve the same results without using the by statement. I am applying a second order moving average process (MA(2)) to uncover the&lt;BR /&gt;unobserved returns.&lt;/P&gt;&lt;P&gt;𝑅𝑡0 = 𝜃0𝑅𝑡 + 𝜃1𝑅𝑡−1 + 𝜃2𝑅𝑡−2, (1)&lt;BR /&gt;with 𝜃𝑗 ∈ [0,1], 𝑗 = 0,1,2, (2)&lt;BR /&gt;and 1 = 𝜃0 + 𝜃1 + 𝜃2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to estimate the parameters of the model for each hedge fund strategy by maximum likeli-&lt;BR /&gt;hood. Then the estimated parameters will be used to desmooth returns.&lt;/P&gt;&lt;P&gt;How do i go about this last part. You help would be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 13:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255229#M2610</guid>
      <dc:creator>bukky09</dc:creator>
      <dc:date>2016-03-08T13:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: MA(2)</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255423#M2611</link>
      <description>&lt;P&gt;OK. Here is what I got . IML is awesome .&lt;/P&gt;
&lt;P&gt;I use OLS to estimate theta0+theta1+theta2=1 . Not ML , I think both could be accepted.&lt;/P&gt;
&lt;P&gt;Good Luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data have;
call streaminit(1234);
length 	mainstrategy $ 20;
 do mainstrategy='Relative value','CTA';
  do year=1990 to 2010;
   do month=1 to 12;
    date=mdy(month,1,year);
	return=rand('normal');
	noise=rand('normal');
    output;
   end;
  end;
 end;
 drop year month ;
 format date yymmn6.;
run;

proc iml;
use have nobs nobs;
read all var{mainstrategy date return noise};
close;


start_end=t(loc( mainstrategy^=t( {' '}||remove(mainstrategy,nobs) ) ))||
          t(loc( mainstrategy^=t( remove(mainstrategy,1)||{' '}) ) );
          
theta0=j(nobs,1,.);
theta1=j(nobs,1,.);
theta2=j(nobs,1,.);

do i=1 to nrow(start_end);
 do j=start_end[i,1] to start_end[i,2]-2-5*12;
 
   x=return[j:j+5*12]||noise[j:j+5*12]||noise[j+1:j+1+5*12]||noise[j+2:j+2+5*12];
 
   create temp from x[c={y noise0 noise1 noise2}];
   append from x;
   close;
   
   submit;
    proc reg data=temp outest=est noprint;
     model y=noise0 noise1 noise2;
     restrict noise0+noise1+noise2=1;
    run;
   endsubmit;
   
   use est;
   read all var{noise0 noise1 noise2};
   close;
   
   theta0[j,1]=noise0[1];
   theta1[j,1]=noise1[1];
   theta2[j,1]=noise2[1];

 end;
end;

create MA2 var{mainstrategy date return noise theta0 theta1 theta2};
append;
close;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Mar 2016 03:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255423#M2611</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-09T03:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: MA(2)</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255572#M2612</link>
      <description>HI XIa,&lt;BR /&gt;Thanks for the rely but i was wondering is it appropriate to use the ml method? since i am estimating the parameters by maximum likelihood?</description>
      <pubDate>Wed, 09 Mar 2016 16:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255572#M2612</guid>
      <dc:creator>bukky09</dc:creator>
      <dc:date>2016-03-09T16:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: MA(2)</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255708#M2613</link>
      <description>&lt;P&gt;No. I don't know how to use ML(proc genmod) to estimate theta0+theta1+theta2=1 .&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 01:15:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/MA-2/m-p/255708#M2613</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-10T01:15:42Z</dc:date>
    </item>
  </channel>
</rss>

