<?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: VaR and Optimization Code in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/VaR-and-Optimization-Code/m-p/44234#M356</link>
    <description>Hi Steve,&lt;BR /&gt;
&lt;BR /&gt;
I am not exactly sure what you are doing in the codes but I cannot find the expected return statement/constraint anywhere. Can you advise me on your product list as I think VAR should be computed external of this optimization run.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Murphy</description>
    <pubDate>Thu, 14 Apr 2011 06:27:04 GMT</pubDate>
    <dc:creator>goladin</dc:creator>
    <dc:date>2011-04-14T06:27:04Z</dc:date>
    <item>
      <title>VaR and Optimization Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/VaR-and-Optimization-Code/m-p/44233#M355</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am having trouble with coming up with the correct code to find VaR and&lt;BR /&gt;
the optimal solution using proc optmodel.  I have attached below the code I am using for a mean/variance approach to the optimal solution, but I'd like to use the mean/VaR approach as well. The code includes the expected returns and the&lt;BR /&gt;
covariance matrix.&lt;BR /&gt;
&lt;BR /&gt;
Could anyone help me in modifying my code to include finding VaR at the .05 level and to find the optimal allocation to each region?&lt;BR /&gt;
&lt;BR /&gt;
proc optmodel;&lt;BR /&gt;
   /* x1, x2, x3 amount of available resources allocated to each of the three&lt;BR /&gt;
region */&lt;BR /&gt;
   var x{1..3} &amp;gt;= 0;&lt;BR /&gt;
&lt;BR /&gt;
   num coeff{1..3, 1..3} = [0.0168011611 0.0164661727 0.0179412346&lt;BR /&gt;
                            0.0164661727 0.0254631245 0.0178165208&lt;BR /&gt;
                            0.0179412346 0.0178165208 0.0289536036];&lt;BR /&gt;
   &lt;BR /&gt;
num r{1..3}=[-0.0903476 -0.1342186 -0.1498193];&lt;BR /&gt;
&lt;BR /&gt;
   /* Minimize variance */&lt;BR /&gt;
   min f = sum{i in 1..3, j in 1..3} coeff[i,j]*x&lt;I&gt;*x&lt;J&gt;;&lt;BR /&gt;
&lt;BR /&gt;
   /* subject to the following constraints */&lt;BR /&gt;
        /* Total resources in 2006*/&lt;BR /&gt;
           con BUDGET: sum{i in 1..3}x&lt;I&gt; = 56288890475;&lt;BR /&gt;
&lt;BR /&gt;
        solve with qp;&lt;BR /&gt;
&lt;BR /&gt;
   /* print the optimal solution */&lt;BR /&gt;
   print x 20.0;&lt;BR /&gt;
&lt;BR /&gt;
Thank you so much for your help,&lt;BR /&gt;
&lt;BR /&gt;
Steve Leon&lt;/I&gt;&lt;/J&gt;&lt;/I&gt;</description>
      <pubDate>Fri, 03 Dec 2010 20:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/VaR-and-Optimization-Code/m-p/44233#M355</guid>
      <dc:creator>TLNDSU</dc:creator>
      <dc:date>2010-12-03T20:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: VaR and Optimization Code</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/VaR-and-Optimization-Code/m-p/44234#M356</link>
      <description>Hi Steve,&lt;BR /&gt;
&lt;BR /&gt;
I am not exactly sure what you are doing in the codes but I cannot find the expected return statement/constraint anywhere. Can you advise me on your product list as I think VAR should be computed external of this optimization run.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Murphy</description>
      <pubDate>Thu, 14 Apr 2011 06:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/VaR-and-Optimization-Code/m-p/44234#M356</guid>
      <dc:creator>goladin</dc:creator>
      <dc:date>2011-04-14T06:27:04Z</dc:date>
    </item>
  </channel>
</rss>

