A typical problem to solve

The problem is to calculate the tangency portfolio for a given set of possible investment assets.

What is the efficient frontier?

You need to find the efficient frontier of a given set of investment assets. You can find an article on this subject here: http://en.wikipedia.org/wiki/Modern_portfolio_theory#The_efficient_frontier.

Let I be a given set of investment assets, indexed by i=1..I. The ROI vector for those investments is a random variable vector R. The random variable for investment asset i is R(i). The expected values are E(R(i))=r(i) and the covariance matrix for R is COV. For each investment, we assume we know its expected return r(i), and we also know COV the covariance of R. So for each i,j investment, COV(i,j) is the covariance of R(i) with R(j), and COV(i,i) is the variance of R(i).

An investor is interested in investing her wealth, 100, by mixing the various assets and obtaining a portfolio whose risk is lower than any of the individual investment assets. She does this by playing on the negative covariance of the combined assets. This mix is represented by the vector (X1,…, Xi,…XI).

Equation to maximize ROI and minimize risk in the investment assets example

Unfortunately, the two objectives are contradictory, because maximize TR also maximizes TV and vice versa. So the idea is to find a compromise ρ, and maximize TR-(ρ/2).TV.

When ρ=0, it means that the investor is not concerned about risk, when ρ=1, it means that both objectives are equally important. The ½ coefficient is a normalization factor. Beyond ρ=1, it means that minimizing the risk is more important than maximizing the return on investment. In this problem, we are only interested in ρ in [0,1].

r represents the variance penalty.

In modern portfolio theory, the set of all possible (TV,TR) for a given investment asset set I is called the “possible portfolio set”. The upper edge of this region of space (TV,TR) is more interesting than any point below because it allows better expected return on investment for a given risk TV, so any investor would want to choose a point on this frontier.

Graph of possible portfolio set

(The graph is from the article http://en.wikipedia.org/wiki/Modern_portfolio_theory#The_efficient_frontier.)

When we maximize TR-ρTV for a given ρ, under the constraints expressed by the previous equations, we indeed obtain a point on the efficient frontier. Note that TV is a quadratic term, and TV is convex because COV is a semi-positive, as defined by a covariance matrix (all Xi are in [0,100]). So quadratic programming addresses this problem.

Calculating the efficient frontier

In order to calculate N points on the efficient frontier, we vary ρ from 0 to 1, by increments of 1/(N-1). That is:

Equation to calculate the efficient frontier

Calculating the tangency portfolio

The N optimal points resulting from the optimization problems stated previously, and noted (TVp,TRp), are on the efficiency frontier.

The tangency portfolio is of interest to the investor. Let RFR be the best risk free investment asset known. This means that TV=0 for RFR. Point (0,RFR) can be plotted on the last diagram. The tangency portfolio (TVt,TRt) is defined by the intersection of the efficiency frontier with the tangent straight line including the risk free point. This point has the best marginal gain ratio Formula for the best marginal gain ratio of any possible portfolio (TV,TR) and will be chosen by our investor. It can be calculated with precision N with our N points (TVp,TRp).

We choose q in {1,..N} such that Maximal marginal gain ratio is maximal.

All N optimization problems p are independent and thus can be treated in parallel.

In the following flowchart, the input data is taken from the example:

<Install_dir\opl\examples\opl_interfaces\java\ConcurrentProcessing\portfolio.mod

Figure 1. How to calculate the tangency point
Flow chart showing how to calculate the tangency point