help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Markowitz / Matlab


From: Julien Bect
Subject: Re: New Markowitz / Matlab
Date: Tue, 13 Jan 2015 16:43:51 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

*** Please keep the public mailing list in the loop ***

Le 13/01/2015 15:48, Vic Norton a écrit :
On Jan 12, 2015, at 2:38 PM, Julien Bect <address@hidden> wrote:

Le 12/01/2015 19:52, Vic Norton a écrit :
I appreciate your help, Julien, but don't waste a lot of time on this.
If you want me to run something in Matlab, please provide a Matlab script.
Hi Julien,

I've done a bit more research. In view of
   
http://www.mathworks.com/help/finance/estimate-efficient-portfolios_bswmb3d-1.html
the code (MatLab?)
   pM = Portfolio;
   pM = setAssetMoments(pM, E', V);
   pM = setDefaultConstraints(pM);
   pMwgt = estimateFrontierByReturn(pM, 0.15);
should produce something close to my portfolio pX0:
   The efficient, 2013-12-31-close portfolio with return 15.00% in 2014.
   This portfolio was selected from 243 exchange traded funds/notes with
   at least $1 billion in assets under management at the end of 2014.
   The funds are listed in decreasing order of assets under management.
    44.  0.00018  XLP  - Consumer Staples Select Sector SPDR ETF
    64.  0.07551  TLT  - iShares 20+ Year Treasury Bond
   112.  0.03723  ICF  - iShares Cohen & Steers REIT
   121.  0.09452  BNDX - Vanguard Total Intl Bd Idx ETF
   144.  0.16191  PGX  - PowerShares Preferred
   153.  0.02175  IYT  - iShares Transportation Average
   154.  0.00850  FXG  - First Trust Consumer Staples AlphaDEX
   158.  0.01427  EPI  - WisdomTree India Earnings
   159.  0.00433  FBT  - First Trust NYSE Arca Biotech Index
   194.  0.08284  HYD  - Market Vectors High-Yield Muni ETF
   195.  0.07967  PGF  - PowerShares Financial Preferred
   219.  0.23419  TFI  - SPDR Nuveen Barclays Capital Muni Bond
   239.  0.00782  EMLP - First Trust North American Energy Infras
   241.  0.17728  UUP  - PowerShares DB US Dollar Index Bullish
The first two columns here show to positive portfolio "weights".

This output depends on being able to compile
   [E, F, f0] = rtndecomp(R0, 0, 252);
   V = f0^2 + F' * F;
in MatLab, where rtndecomp function comes from the
   newmarkowitz-1.0.0.tar.gz
package inside of newmarkowitz-tests.tar.gz.

I am appending a script acrhive
   matlabtest01.m.zip
that will do this computation based on the above (MatLab?) code.
You should be able to run it in Octave or in MatLab, with
   doMatLabTest01 = 0;
When
   doMatLabTest01 = 1;
it tries to run the (MatLab?) code
   pM = Portfolio;
   pM = setAssetMoments(pM, E', V);
   pM = setDefaultConstraints(pM);
   pMwgt = estimateFrontierByReturn(pM, 0.15);

I hope this helps.

Regards,

Vic




reply via email to

[Prev in Thread] Current Thread [Next in Thread]