Technical Analysis with Optimal Trader

Portfolio Optimization

Introduction

Portfolio Optimization is a risk management tool in Optimal Trader based on Modern Portfolio Theory for which Harry Markowitz was awarded the Nobel Price in 1990. This application will help you to optimize your portfolio with regard to the risk of the individual assets, the correlation between the assets and the expected returns of your assets. Portfolio Optimization is a powerful and easy to use risk management feature in Optimal Trader which will help you to allocate assets optimally in your portfolio.

 

Expected Returns and Risk

The returns an investor will get in the end can deviate considerably from the the returns that were expected. But investment decisions must be made in advance, based on expectations of an uncertain future. It is not sufficient to base these decisions on expected returns alone because expected returns alone provide an incomplete description of the future. A further factor which is of equal importance for a well-analyzed decision is the risk of the investment, that is, a measure of how certain we can be that the expected return will be realized.

Afterwards when we know the outcome, a higher return is always preferred before a lower return, irrespective whether this has been achieved with a high or low level of risk. But hindsight is not an option when making investment decisions. Well-analyzed investment decisions are always based on both expected returns and risk, because this will describe a more complete picture of the future.

More about risk

The risk(volatility) of an equity is measured by the standard deviation of the equity's rate of return. You can think of the standard deviation as measuring how far away from the expected return the realized return is likely to be. The greater the standard deviation, the more variable the rate of return.

The 68-95 rule states that most returns lie within 2 standard deviations of the expected return. About 68% of the returns lie within one standard deviation of the expected return (between the expected return minus one standard deviation and the expected return plus one standard deviation). About 95% of the returns lie within two standard deviation of the expected return. For example, if the standard deviation is 0.5%/day and the expected price for the next day is $85, then there is a probability of 68% that the next day's price will lie in the range $84.50-$85.50.

Correlation

When estimating the risk of a portfolio it is not sufficient to estimate the risk for all individual assets in the portfolio. The risk of a portfolio also depends on the correlation between all assets. Correlation is a measure of the degree to which two assets (or investments) move together.

The correlation between two assets lies between -100% and 100%. The higher the correlation is between two assets, the more similar are the price movements of the assets. A high correlation, for example 60%, means that the assets tend to move in the same direction. If there is no relationship between the movements of two assets, then the correlation is zero and the relationship is governed by randomness. If correlation is negative the assets tend to move in opposite direction. The correlation will be closer to -100% if the negative relationship is strong and closer to zero if the relationship is weak.

 

Portfolio Risk and Correlation

If correlation is less than 100% the risk of the portfolio will be less than the average of the risk of the assets. Risk, measured with portfolio standard deviation, falls with correlation. The lower correlations are between assets of a portfolio, the lower the risk is of the portfolio. Diversification will thus be profitable (meaning we will get a higher return for a certain level of risk) when combining assets which are not entirely the same.

How Do We Combine Assets Into A Well-Balanced Portfolio?

A well-balanced portfolio consisting of many stocks not strongly correlated will always produce a lower risk for a certain expected return rate, but how do we combine such a portfolio?

For every level of expected return, there is one optimal asset combination which offers the lowest possible risk, and for every level of risk, there is one optimal combination which offers the highest expected return. These optimal combinations are called efficient portfolios. An efficient portfolio is one which has the smallest attainable portfolio risk for a given level of expected return (or the largest expected return for a given level of risk).

There are two demands on an efficient portfolio:

  • There is no other combination of assets which offers the same expected return for a smaller portfolio risk.
  • There is no other combination of assets which offers a higher expected return for a given portfolio risk.

These optimal combinations can be plotted on a graph, and the resulting line is called the efficient frontier.

The efficient frontier begins on the left side of the chart with the portfolio which has the smallest attainable risk of all efficient portfolios. There is no other combination of assets which can achieve a smaller portfolio risk. This portfolio is selected by default with a red solid circle in Optimal Trader. In the upper left table you will find the asset weights for that important optimal portfolio.

Which efficient portfolio you select depends on your acceptable level of risk. But irrespective of your risk tolerance it is always superior to select an optimal combination of expected return and risk, that is, a portfolio on the efficient frontier.

 

Portfolio Optimization in Optimal Trader

Portfolio Optimization

In the upper left table you can select which stocks Optimal Trader will include when calculating the efficient frontier. You can edit expected returns, minimum allowed weights and maximum allowed weights for each stock. If you want to return to the default settings, simply click the "Default"-checkbox. The column on the right edge of the table shows you the optimal weights of your stocks expressed in percentage of the total portfolio.

The upper right chart displays price movements for all selected stocks normalized to the same starting point. Keep your mouse above a curve and a tooltip will appear with the name of the corresponding stock.

The lower left table contains the correlation matrix with correlations between all selected stocks. The correlation lies between -100% and 100%. As you can see the correlation is always 100% when correlating a stock with itself.

The lower right chart shows all stocks in a risk-return space and the efficient frontier. Risk increases as you move to the right in the chart and expected returns increase as you move upwards in the chart.

Expected returns in Optimal Trader are by default estimated by calculating the geometric mean of the historical daily percentual returns, but can also be estimated with Portfolio Scan results. There are limitations to expected returns estimation which are discussed in the next chapter.

Every colored dot corresponds to a stock in your portfolio placed at its standard deviation and it's averaged return. Keep your mouse above a dot to see the name of the corresponding stock in a tooltip. The same colors are applied to the dots in the lower right chart and the curves in the upper right chart for each stock.

The Efficient Frontier

The curve in the lower right chart is the efficient frontier, which is constituted of all optimal combinations of stocks. The curve begins on the left side with the optimal stock combinations which has the smallest attainable portfolio risk of all possible stock combinations. That portfolio is selected by default which is why a red solid circle is placed there. You can read the weights of that portfolio in the upper left table.

Click on another part of the curve to move the red solid circle and select another efficient portfolio. The weights in the upper left table will immediately adapt to your change.

The combination far out to the right on the efficient frontier only tries to maximize return without any risk consideration. That portfolio is solely constituted by the stock with the highest averaged return and is of course not a realistic portfolio combination.

 

Expected Returns Estimation

When calculating efficient portfolios on the efficient frontier, three measures are needed:

  1. Expected returns for all portfolio assets
  2. Risk for all portfolio assets
  3. Correlation between all portfolio assets

Risk and correlation are fairly constant measures and do usually not change much over time. Expected returns, on the other hand, is a much more difficult factor to handle in reality.

Traditionally and theoretically, expected returns are simply estimated by averaging historical daily returns for all stocks. Although that is not a reliable estimation it is often used because there are no good alternatives. But if a stock historically has yielded an average annualized return of 10% and another stock historically has yielded 5% it is bold to make the assumption that this relation will hold in the future.

For that reason some investors only use one efficient portfolio: the one with the lowest attainable risk. This portfolio is situated furthest to the left of the efficient frontier and is special because it does not consider expected returns at all. It is simply constituted by the portfolio which has the lowest attainable risk of all possible portfolios. This portfolio is selected by default in Optimal Trader when calculating the efficient frontier and is thus marked by a solid red circle by default.

To use this strategy you should include a limited number of equities, maybe 5-15 stocks which you are certain that you want to invest in. You can use Optimal Trader's Portfolio Scan to find stocks that meet you investment criteria.

 

Integration with Portfolio Scan

You can let the expected returns be proportional to Portfolio Scan results. Portfolio Scan is a feature in Optimal Trader which helps you to find stocks that meet your investment criteria and helps you to compare stocks. The result of Portfolio Scan is a value for each stock which will be larger the better the stock has performed with regard to your criteria.

Portfolio Optimization will allocate to assets in your portfolio with regard to Portfolio Scan scores of each stock, the risk of each stock and correlation between stocks. Portfolio Optimization combined with Portfolio Scan results is thus a very powerful investment tool.

This feature is found under the Options button and is named Expected returns: Portfolio Analysis. To return to traditional expected returns estimation select Expected returns: Default.

 

Tips

Tip 1

You can limit the weights in the upper left table. You could for instance limit the weights so that a minimum of 10% and a maximum 30% of all assets will be included in your portfolio. In that case a new efficient frontier will be calculated, optimal with regards to these constraints.

A lot of computer power is needed to identify the efficient frontier, but it will only take a couple of seconds in Optimal Trader to calculate it even for large portfolios with many stocks.

Tip 2

You can automatically deselect stocks in you portfolio where the first model (second chart from top, under the top model) is generating a sell signal (if you have run the Best Models and Settings function, the first model will be the best model). This will give you a portfolio consisting only of stocks which at the moment have a buy signal from the best model.

This function is found under the Options button and is named Deselect equities with sell signals from Model 1. The corresponding function also exists for the top model (neural network or Combined Analysis Model).

Do not forget to run Best Models and Settings and afterwards optimize your portfolio before selecting this option.

 

  Copyright © 2005-2008 Optimal Trader