**INTRODUCTION**

There are many instances in business where a portfolio of assets must be evaluated in terms of risk and rewards. The key questions may be:

**“How much should we invest?”**

**“What should we not invest in?”**

**“What is the risk of different budget allocations and what are the expected rewards?”**

**“What is the optimum allocation if we want to minimize risk?”**

**etc.**

Similarly the concept of an asset portfolio can take the form of:

**Assortment of clothing for a retailer**

**Chargebacks for a credit card ****processor**

**Scholarship recipients**

**Movies for a Hollywood studio**

**Collection of stocks**

**etc.**

The objective of this post is to introduce the concept of the Minimum Variance Portfolio. The Minimum Variance Portfolio is an optimum allocation of funds across risky assets where the risk (variance) is minimized in the optimization. The simplest example would be a 2 asset portfolio, such as a portfolio consisting of an ice cream shop businesses and a coffee shop businesses. In this scenario, during the summer people will buy more ice cream but coffee sales will be lower during warm temperatures but during winter the opposite will be true.If the mix of stores in this portfolio is chosen in a way to reduce variance in revenue due to weather, it is theoretically possible to hedge against the risk of weather. Basically, if one chooses the right number of coffee and ice cream store to minimize revenue risk, the weather risk is also minimized or reduced so revenue is the same regardless of weather.

In order to understand the risks of a portfolio of ice cream and coffee stores we need to understand the variability of each business individually. However in a portfolio situation understanding the individual risks isn’t enough, we also need to understand how the sales of ice cream and sales of coffee shops are correlated with each other. This is the concept of the variance of a portfolio, it is the big picture few of variability of a collection of assets. Once the portfolio variance is understood and quantified, the next step may be to minimize this portfolio variance to hedge against risk. One can extend the concept of portfolio variance beyond 2 assets to any number of assets.

**MATHEMATICS OF MINIMUM VARIANCE PORTFOLIO CALCULATIONS**

The following example consist of 2 assets to illustrate the concept of minimizing the variance of a portfolio of assets, here is the formula that describes the expected portfolio return and the portfolio variance that we are trying to minimize.

To minimize the portfolio one would need to set up a Lagrangian Optimization problem with the constraint being that the weights of the investment sum to 1, to return a budget with the % of funds are allocated in a meaningful way. This is a normalization technique, but if necessary one could change the weights to represent a budget constraint of say $1,000, but the results will be the same in terms of % allocated, so we will stick to this convention.

**R CODE TO RUN THE OPTIMIZATION**

The following R code solves the problem above by downloading data from the web and running a quadratic programming problem that solves the Lagrangian optimization problem above to return the Minimum Variance Portfolio, click the images to see a larger view or click here to download the code.

**OPTIMUM PORTFOLIO – BASED ON R CODE ABOVE**

The optimum allocation based on the minimum variance portfolio is

The expected annual return of this allocation is 22%. Note that past performance does not guarantee future performance.

This is very interesting. I am trying to replicate this but I must be doing some thing wrong. Can you re-post the link to download the code (its not working).

Thank You