title: Bound constraints ignored Matlab
body: <p>I have the following code working out the efficient frontier for a portfolio of assets:</p>
  
  <pre><code>lb=Bounds(:,1);
  ub=Bounds(:,2);
  
  P = Portfolio('AssetList', AssetList,'LowerBound', lb, 'UpperBound', ub, 'Budget', 1);
  P = P.estimateAssetMoments(AssetReturns)
  [Passetmean, Passetcovar] = P.getAssetMoments
  
  pwgt = P.estimateFrontier(20);
  [prsk, pret] = P.estimatePortMoments(pwgt);
  </code></pre>
  
  <p>It works fine apart from the fact that it ignores the constraints to some extent (results below). How do I set the constraints to be hard constraints- i.e. prevent it from ignoring an upper bound of zero? For example, when I set an upper and lower bound to zero (i.e. I do not want a particular asset to be included in a portfolio) I still get values in the calculated portfolio weights for that asset, albeit very small ones, coming out as part of the optimised portfolio.
  Lower bounds (lb), upper bounds (ub), and one of the portfolio weights (pwgt) are set out below:</p>
  
  <pre><code>lb                  ub                     pwgt(:,1)
  0                   0                   1.06685493772574e-16
  0                   0                   4.17200995972422e-16
  0                   0                   0
  0                   0                   2.76688394418301e-16
  0                   0                   3.39138439553466e-16
  0.192222222222222   0.252222222222222   0.192222222222222
  0.0811111111111111  0.141111111111111   0.105624956477606
  0.0912121212121212  0.151212121212121   0.0912121212121212
  0.0912121212121212  0.151212121212121   0.0912121212121212
  0.0306060606060606  0.0906060606060606  0.0306060606060606
  0.0306060606060606  0.0906060606060606  0.0306060606060606
  0.121515151515152   0.181515151515152   0.181515151515152
  0.0508080808080808  0.110808080808081   0.110808080808081
  0.00367003367003366 0.0636700336700337  0.0388531580005063
  0.00367003367003366 0.0636700336700337  0.0636700336700338
  0.00367003367003366 0.0636700336700337  0.0636700336700337
  0                   0                   0
  0                   0                   0
  0                   0                   1.29236898960272e-16
  </code></pre>
  
  <p>I could use something like: <code>pwgt=floor(pwgt*1000)/1000;</code>, but is there not a more elegant solution than this?</p>