Portfolios and linear programming 4

From UBC Wiki

You have $100 to invest in aviation, locomotive, submarine, or automotive companies. Money not invested will be placed in an account with 3% return and no risk. The average risk of the portfolio must be no more than 5.

The Toy Model

Company Return (%) Risk Rating
Aviation 17 9
Locomotive 14 7
Submarine 10 5
Automotive 8 2


Dual


Solve


Optimal Solution:

We invest $38.6 into aviation, $10 into locomotive, and $51.4 into automotive. We invest nothing into submarines and all money is invested. With this division of money we earn a profit of $12.07.

Shadow Price

The primal constraint
sets the average investment risk to be less than 5. The negatives of the coefficients ci of the variables xi (i =1,2,4) represent the shadow prices for the risk, which shows that the variables with corresponding ci < 0 would decrease risk while the variables with corresponding ci > 0 would increase risk. This constraint was obtained using the equation:


Risk Method Discussion

<html><head><meta http-equiv=Content-Type content="text/html; charset=windows-1252"><meta name=Generator content="Microsoft Word 12 (filtered)"><style></style></head><body lang=EN-CA>

In the second part of the project, a

portfolio optimization is illustrated. The idea behind a portfolio optimization is to give investors an option to best allocate their investments, i.e. choose the optimal weights for every asset that they wish to invest in a portfolio. The idea will be demonstrated by using the Markowitz Mean-Variance Portfolio optimization. After simulating and analyzing the results, the effect of introducing constraints to the optimization problem will be demonstrated, which

will result in a much better optimal solution for the investor to invest.

The inputs to this problem are:

(i)                  The expected return for each asset.

(ii)                The standard deviation of each asset (a measure of risk)

(iii)               The correlation matrix between these assets

The output of this problem is:

(i)                  The mean-efficient frontier, which will illustrate the portfolio set with a greater expected return with the minimal risk given the current set of assets.

The return (%) for the following assets over a period of 1 year are shown below:

 

In order to optimize this portfolio, the following two assumptions are made

(i)                  The return values for the next one periodic year (June 2015 – May 2016) is assumed to be very much consistent with the historical return values from June 2014 – May 2015.

(ii)                No Short selling is allowed. (this will be allowed in the next part)

 

The Matlab code starts here

%Asset names:

%A = Amundi ETF MSCI World Energy EUR A/I  CWE: Sector Equity Energy

%B = Amundi ETF MSCI World ex EMU A/I  CM9: Global Large-Cap Blend Equity

%C = Amundi ETF MSCI World Financials EUR A/I  540M: Sector Equity

%Financial services

%D = Amundi ETF NASDAQ-100 EUR A/I  ANX: US Large-Cap Growth equity

%E = Amundi ETF S&P Global Luxury EUR A/I  GLUX: Sector Equity Consumer

%Goods and Services

%F = Amundi ETF US Treasury 7-10  US7: USD Government Bond

%G = AdvisorShares Morg Crk Glbl Tacticl ETF  GTAA : Tactical Allocation

%H = Amundi ETF Euro Inflation  18MU: Eurozone Large-Cap Equity

%I = Amundi ETF CAC 40 C  C40: France Large-Cap Equity

 

 

% Table imported from excel spreadsheet & stored as ‘data’

m=mean(data);

c=cov(data);

stdev=std(data);

 

%-- calculate efficient frontier portfolio --

[PortRisk, PortReturn, PortWts]=portopt(m,c)

PortRisk;

PortReturn;

PortWts;

 

%-- plotting the efficient frontier portolio --

scatter(stdev, m)

hold on

grid on

title('Mean-Variance-Efficient Frontier')

xlabel('Risk (Standard Deviation)')

ylabel('Expected Return')

figure(gcf)

plot(PortRisk,PortReturn,'DisplayName',...

    'PortReturn vs PortRisk','XDataSource','PortRisk','YDataSource',...

'PortReturn');

 

 

After the simulation is run, the graph for efficient frontier is shown below

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<img width=531 height=328 src="project-340-second-part_files/image001.jpg" align=left hspace=12>

 

 

 

 

 

The efficient frontier illustrates the return that an investor can expected if he/she takes the risk. The PortRisk and PortReturn function outputs the percentage of risk vs return for the above set of assets. The PortWt function outputs the weight of investment on each assets to get the returns.

 

 

For example, to get a return of 3.22% the

budget of investment on each asset should be as follows: 14.3% on A, 86.7% on

D.

The next section will illustrate how adding constraints to the optimization problem above can result in a better return percentage for the same amount of risk taken.

The constraints added are:

(i)                  The maximum weight allocated for each asset investment is 40%

(ii)                Risk Aversion is considered

(iii)               Short selling is allowed

 

The optimal risky portfolio is evaluated somewhere in the middle of the curve of efficient frontier as the higher up the curve you go the more risk you take for a lower incremental return. This is based on the risk-free rate, borrowing rate and investor’s degree of risk aversion. The risk aversion

The <a href="http://www.mathworks.com/help/finance/portalloc.html">portalloc</a> function in Matlab returns the fraction of the complete portfolio allocated to the risky portfolio, and the variance (OverallRisk) and expected return (OverallReturn) of the optimal overall portfolio. The overall portfolio combines investments in the risk-free asset and in the risky portfolio. The actual proportion assigned to each of these two investments is determined by the degree of risk aversion characterizing the investor.

If the value of RiskyAversion is taken to be more than 1, it means that the risk tolerance specified will enable the investor to borrow money to invest in the risky portfolio, and no money will be invested in the risk-free asset. This borrowed money is actually added to the original capital for investment. The idea of risk aversion is the unwillingness of the investor to accept a portfolio that will have slightly higher risk for slightly higher return. The value is taken as how much more risk the investor actually enjoys. If he/she is a ‘risky’ investor then he/she will more likely invest on a portfolio that will have a slightly better return for slightly more risk. If the investor is less risky and more of a safe-type, then he/she will choose to invest on a portfolio that has the least risk for a more or less similar return.

The Matlab code is now modified to include these constraints:

AssetBounds = [-0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 ;...

    0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4];

RisklessRate=0.01;

BorrowRate = 0.01;

RiskAversion = 1;

portalloc(PortRisk, PortReturn, PortWts, RisklessRate,...

    BorrowRate, RiskAversion);

[PortRisk, PortReturn, PortWts]=frontcon(m,c, [],[],AssetBounds)

 

The AssetBounds mean that the maximum a person can invest or short sell on a particular asset in a portfolio is 40%. The RiskAversion is explained above.

<img width=385 height=241 src="project-340-second-part_files/image002.jpg" align=left hspace=12>The results of the simulation without (LHS) and with (RHS) maximum fixed weights (40%) have been shown below. Both results consider Risk Aversion of 100%.

<img width=380 height=233 src="project-340-second-part_files/image003.jpg" align=left hspace=12>

It can be observed that the RHS efficient frontier graph with the fixed maximum allocation of weights (40%), gives a better return for the same risk taken. For instance 1.8% risk taken will return 3.5% for a portfolio which has a fixed maximum (no minimum) allocation for any asset whereas if the same risk is taken for the portfolio with any weight allocation gives a return of only 3.1%. Even though the return difference may look in number, this is because a random set of assets were taken for simulation. If the correct mixed equity of assets is chosen then the difference will be larger.The results of the constrained optimization problem and their weight allocation is tabulated below:

 

CONCLUSION:

In the portfolio optimization it was

observed that the introduction of constraints can improve the optimum solution. Of course a set of assumptions were made as share prices can always fluctuate without notice, but the principles of Markowitz portfolio optimization will always

hold valid.

 

 

 

 

   

 

 

 

 

 

 

 

 

</body></html>