IntroductionThis blog post describes a custom R implementation and a backtest analysis of the Markowitz Global Minimum Variance (GMV) portfolio allocation strategy. In this post, we utilize a simple quadratic solver to perform the necessary optimizations and subsequently execute our backtests on historical data of two distinct portfolios:. the SPDR exchange traded funds.
A subset of the stocks that are currently included in the benchmark stock market index of Euronext Brussels (BEL20)It should be noted that it is well known that the Markowitz portfolio allocation model returns suboptimal results due to its underlying normality assumptions and its inability to robustify against parameter estimation errors and model uncertainty. Hence, this post serves as an introduction to more involved portfolio optimization techniques that take these issues into account in future posts.The accompanied source code can be retrieved from. Markowitz and the Efficient FrontierAccording to Markowitz, investors should perform portfolio allocations based upon on a trade-off between risk and expected returns of the assets under consideration. Expected returns are defined as the expected future price changes (including additional income such as dividends) divided by the current starting prices of the securities. On the other hand, risk should be measured by the variance of the returns, which is defined as the average squared deviation around the expected returns.Moreover, Markowitz argued that for any given level of expected portfolio return, a rational investor would choose the portfolio with minimum variance between the set of all possible portfolios. The set of possible portfolios is called the feasible set and the minimum variance portfolios are called the Mean-Variance efficient portfolios. The set of all mean-variance efficient portolios for different desired levels of expected return is called the efficient frontier.
Abstract We estimate the global minimum variance (GMV) portfolio in the high-dimensional case using results from random matrix theory. This approach leads to a shrinkage-type estimator which is distribution-free and it is optimal in the sense of minimizing the out-of-sample variance. Minimum-Variance Portfolio. A portfolio of individually risky assets that, when taken together, result in the lowest possible risk level for the of expected return. Such a portfolio hedges each investment with an offsetting investment; the individual investor's choice on how much to.
![Portfolio Portfolio](/uploads/1/2/5/6/125617413/264546764.jpg)
View the image in the sideline below for some additional insight.Curve II-III represents the portfolios on the efficient frontier. These portfolios offer the lowest level of standard deviation (and variance) for a given level of expected return. In this article we focus on the portfolio at point II, which is referred to as the global minimum variance (GMV) portfolio. It is the portfolio on the efficient frontier with the smallest overall variance.Mathematical Formulation of Markowitz and GMV PortfoliosLet’s suppose that an investor has a choice between risky assets. This choice is represented by an -vector of weights, where each weight i represents the percentage of the i-th asset held in the portfolio, and henceNow, let’s assume that the asset returns have expected returns and the covariance matrix between the returns is given by:where denotes the covariance between asset i and asset j such that and represents the correlation between asset i and asset j.
Under these assumptions, the return of a portfolio with weights is a random variable with expected return and variance given byNote that by choosing the portfolio weights, an investor effectively chooses between the available mean-variance pairs. To calculate the weights for one possible pair, we choose a target mean return,. If we follow Markowitz reasoning -as explained in the previous paragraph- the investment problem expresses itself as a constrained minimization problem in the sense that the investor must seeksubject to the constraintsThis problem expresses itself as a rather simple quadratic optimization problem with two equality constraints. Furthermore, as we already mentioned, in this article we are only interested in the GMV portfolio (point II on the efficient frontier in the above image). This implies that the problem can be further simplified by removing the first equality constraint from the formulation. In other words, we want to obtain the portfolio that obtains minimum variance without taking the associated expected portfolio return into account. R DemoIn this section we backtest a GMV portfolio strategy on two distinct portfolios.
![Example Example](http://webpage.pace.edu/pviswanath/notes/investments/gif/assetalloc71.gif)
The associated source code is. The reader can replicate the analysis and results locally by running the demo.R script. Assets Under ConsiderationIn this article, we consider the historical backadjusted openingprices of the SPDR ETF funds and 14 of the stocks underlying the BEL20 index. Note that backadjusted prices account for dividends, mergers and stock splits in such a way that the associated asset returns include all the required information.
The code snippet below loads the provided SPDR asset data into an xts timeseries object. The asset returns are subsequently calculated and a graphical representation of the historical stock prices is generated. View the code on.The images below illustrate the historical backadjusted stock prices of the underlying assets for both portfolios under consideration.Converting the GMV Formulation into a Quadratic ProgramWe use the solve.QP function from the to solve the GMV quadratic programming problem. The solve.QP routine implements the for solving problems of the following form:subject to the following constraintsThe required arguments of the function can be obtained from the package documentation. View the code on.
Backtesting the GMV Portfolio StrategyIn this section we perform an out of sample backtest of the GMV portfolio strategy that was implemented in the section above. The goal here is to first obtain the GMV weights for the available historical timestamps and subsequently compare the resulting portfolio allocations with the actual next-day realized returns of the assets. The out of sample results can then be plotted and analyzed. Furthermore, we also need to define an additional lookback setting to indicate how much historical data we want to use for our covariance matrix calculation.
It is important to note that we can only look at the data that is already available to us on any given timestamp in order to avoid any potential data-snooping bias.The backtest function is added in the code snippet below. Note that the procedure uses the foreach package to run the optimizations in parallel across multiple CPU’s.
In theory, we could form a portfolio made up of all investable assets, however, this is not practical and we must find a way of filtering the investable universe. A risk-averse investor wants to find the combination of portfolio assets that minimizes risk for a given level of return.
Minimum-variance FrontierAs we form a portfolio of assets, we can determine the portfolio return-risk characteristics that are a function of the characteristics of the underlying portfolio holdings and the correlation between the holdings. By varying the allocation to the underlying assets, we derive an investment opportunity set of different portfolio compositions. This is made up of the various combinations of risky assets that lead to specific portfolio risk-return characteristic which can be graphically plotted with portfolio expected return as the y-axis and portfolio standard deviation as the x-axis.For each level of return, the portfolio with the minimum risk will be selected by a risk-averse investor. This minimization of risk for each level of return creates a minimum-variance frontier – a collection of all the minimum-variance (minimum-standard deviation) portfolios. At a point along this minimum-variance frontier curve, there exists a minimum-variance portfolio which produces the highest returns per unit of risk. Global Minimum-variance PortfolioAlong the minimum-variance frontier, the left-most point is a portfolio with minimum variance when compared to all possible portfolios of risky assets. This is known as the global minimum-variance portfolio.
An investor cannot hold a portfolio of risky (note: risk-free assets are excluded at this point) assets with a lower risk than the global minimum-variance portfolio. Efficient FrontierThe portion of the minimum-variance curve that lies above and to the right of the global minimum variance portfolio is known as the Markowitz efficient frontier as it contains all portfolios that rational, risk-averse investors would choose.
We can also monitor the slope of the efficient frontier, the change in units of return per units of risk. As we move to higher levels of risk, the resulting increase in return begins to diminish. The slope begins to flatten. This means we cannot achieve ever-increasing returns as we take on more risk, quite the opposite. Investors experience a diminishing increase in potential returns as portfolio risk is increased.QuestionWhich statement best describes the global minimum-variance portfolio?A. The global minimum variance portfolio gives investors the highest levels of returnsB. The global minimum variance portfolio gives investors the lowest risk portfolio made up of risky assetsC.
The global minimum variance portfolio lies to the right of the efficient frontierSolutionThe correct answer is B.The global minimum variance portfolio lies to the far left of the efficient frontier and is made up of a portfolio of risky assets that produces the minimum risk for an investor.Reading 39 LOS 39g:Describe and interpret the minimum-variance and efficient frontiers of risky assets and the global minimum-variance portfolio.