# Modern Portfolio Theory

Modern portfolio theory (MPT), introduced by Harry Markowitz in 1952, is a theory which attempts to create portfolios of assets by striking a balance between return and risk. In the basic terms, one can maximize the portfolio expected return given a certain risk, or equivalently minimize risk for a given level of return.

One of the main ideas of MPT is that a portfolio of assets should be composed not based on the performance of individual assets, but rather taking a holistically view of asset performance. This means that the internal risk-return dynamics of portfolios must be taken into consideration when evaluating them. The classic mathematical model of MPT uses mean return as a measure of expected return and the return variance as the risk measure.

Mean return and variance are regarded as the two primary return and risk measures of individual assets or collections of assets. These measures were used by Markowitz when he originally presented modern portfolio theory. To calculate them we start with asset prices. Given $$T\in\mathbb{N}_1$$$time periods and $$n\in\mathbb{N}_1$$ assets we can define the price time series of all assets in question as a matrix $$\mathbf{P}\in\mathbb{R}^{T+1\times n}_{\geq{0}}$$ consisting of price entries $$p_{ti}\in\mathbb{R}_{\geq{0}}$$, one for each asset $$i\in\{0,\cdots,n\}$$ at time period $$t\in\{0,\cdots,T+1\}$$. The row vectors of $$\mathbf{P}$$ can be viewed as price snapshots in time, or datapoints in a dataset, concepts that will be covered in section \ref{dataStructure}. From the price entries we can define the temporal (rate of) return development matrix $$\mathbf{R}\in\mathbb{R}^{T\times n}$$ with entries $$r_{ti}\in\mathbb{R}$$. \begin{equation} r_{ti} = \frac{p_{ti} – p_{(t-1)i}}{p_{(t-1)i}} \end{equation} ###### Mean Return The $$r_{ti}$$ entries can be collected into $$n$$ return column vectors $$\vec{r}_{i}\in\mathbb{R}^{T}$$ each representing a return time series of an asset $$i$$. This makes it possible to define the mean return for a single asset. \begin{equation} \bar{r}_i = \frac{1}{T}\vec{r}_{i}^\mathrm{T}\vec{1} \end{equation} These can be collecting into a mean return vector $$\vec{\bar{r}} = [\bar{r}_1\; \cdots\; \bar{r}_n]^\mathrm{T}\in\mathbb{R}^{n}$$ for all assets. A more succinct way to define the mean return vector is by matrix notation. \begin{equation} \vec{\bar{r}} = \frac{1}{T}R^\mathrm{T}\vec{1} \end{equation} ###### Return Variance For any two time series return vectors $$\vec{r}_i$$ and $$\vec{r}_j$$, and their means $$\bar{r}_i$$ and $$\bar{r}_j$$ we can compute their covariance. \begin{equation} \operatorname{cov}{\vec{r}_{i}}{\vec{r}_{j}} = \frac{1}{T}(\vec{r}_{i}-\bar{r}_i)^\mathrm{T}(\vec{r}_{j}-\bar{r}_j) \label{eq:covariance} \end{equation} Using this it is possible to retain all possible covariance computations in a symmetric covariance matrix$\mathbf{\Sigma}$as defined by (\ref{eq:covarianceMatrix}). \begin{equation} \mathbf{\Sigma} = \left[ \begin{array}{ccc} \operatorname{cov}{\vec{r}_{1}}{\vec{r}_{1}} & \cdots & \operatorname{cov}{\vec{r}_{1}}{\vec{r}_{n}}\\ \vdots & \ddots & \vdots\\ \operatorname{cov}{\vec{r}_{n}}{\vec{r}_{1}} & \cdots & \operatorname{cov}{\vec{r}_{n}}{\vec{r}_{n}} \end{array} \right] \label{eq:covarianceMatrix} \end{equation} Alternatively, it is possible to show that the covariance matrix can be computed directly. \begin{equation} \mathbf{\Sigma} = \frac{1}{T-1}(R-\frac{1}{T}\vec{1}\vec{1}^\mathrm{T}R)^\mathrm{T}(R-\frac{1}{T}\vec{1}\vec{1}^\mathrm{T}R) \label{eq:fancyCovarianceMatrix} \end{equation} ###### Expected Return and Risk of a Portfolio Before we can state the various versions of the MPT optimization problem we need to review how to measure the portfolio expected return and risk as a function of mean return and variance. Let $$\vec{w}\in[0,1]^{n}$$ with the constraint $$\vec{1}^\mathrm{T}\vec{w} = 1$$ be the distribution over $$n$$ assets determining how much should be invested in each asset, then the return $$r_p$$ from such a portfolio distribution can be computed. \begin{equation} r_{\vec{w}} = \vec{\bar{r}}^\mathrm{T}\vec{w} \label{eq:portfolioReturn} \end{equation} The variance of the portfolio can be computed from a doubly weighted covariance matrix. \begin{equation} \sigma_{\vec{w}}^2 = \vec{w}^\mathrm{T}\mathbf{\Sigma}\vec{w} \label{eq:portfolioVar} \end{equation} ###### Expressing MPT as a Mathematical Model There are different ways to express MPT as a mathematical optimization model, each with subtle differences. What we want is to maximize $$r_{\vec{w}}$$ or minimize $$\sigma_{\vec{w}}^2$$ by adjusting the portfolio distribution $$\vec{w}$$. However, since these are two concurrent objectives we cannot optimize them at the same time. What we can do is fix one at a desired level and optimize the other. The first optimization task constraints risk and maximizing return. \begin{equation} \begin{array}{rlcl} \max_{\vec{w}} & r_{\vec{w}} & = & \vec{\bar{r}}^\mathrm{T}\vec{w} \\ \textrm{s.t.}& \vec{w}^\mathrm{T}\mathbf{\Sigma}\vec{w} & \leq & \sigma_p^2 \\ &\vec{1}^\mathrm{T}\vec{w} & = & 1\\ &\vec{w} & \geq & 0\\ \end{array} \label{eq:mptMax} \end{equation} The alternative is to constrain return and minimizing risk. \begin{equation} \begin{array}{rlcl} \min_{\vec{w}} & \sigma_{\vec{w}}^2 & = & \vec{w}^\mathrm{T}\mathbf{\Sigma}\vec{w} \\ \textrm{s.t.}&\vec{\bar{r}}^\mathrm{T}\vec{w} & \geq & r_p \\ &\vec{1}^\mathrm{T}\vec{w} & = & 1\\ &\vec{w} & \geq & 0\\ \end{array} \label{eq:mptMin} \end{equation} Notice the lower bound constraints on the portfolio $$\vec{w} \geq 0$$. Removing these will allow the optimization task to short stocks; however, this behavior is outside the scope of this thesis. The two optimization problems can be solved using Lagrange multipliers thus reducing the problem to a quadratic, i.e., convex, optimization problem. ###### Applying a Model of Risk Aversion An alternative to fixing one of the performance measures is to apply an utility function $$U(\vec{w})$$ that converts the two dimensional performance measures to a single dimension. There are many ways to do this, however, a main constraint is that it must conform to rationality (A simple definition of rationality says that rational agents wanting more rather than less of a good. Of course this is a gross simplification of rational choice theory, yet it will suffice due to being outside of the scope of this thesis). With ordinal utility we can say that some portfolios stochastically dominate others, however, for some portfolio pairs only a utility function can settle the preference. For A in the example above the ordinal utility says that$E > A > C$, but nothing about$B$and$D$relative to$A$. A utility function will remove any ambiguity, and in this case states that$E > B > A > D > C\$ which is a special case of the ordinal utility.

The previous figure illustrates how different portfolios in the two dimensional risk-return space can be mapped to a one dimensional utility. Notice that some internal requirements to this mapping. From the perspective of portfolio $$A$$, we can qualitatively see that it stochastically dominates portfolio $$C$$, but without a utility function we cannot say anything about $$A$$’s ordering compared to $$B$$ and $$D$$. Likewise we see that portfolio A is stochastically dominated by portfolio $$E$$.
A widely used utility function is the weighted linear combination of the performance measures. Only one weight is needed, we will use a risk aversion factor $$\rho$$ that weights the risk component. This means that the utility is adversely affected as higher risk aversion is applied.

\begin{equation}
U(\vec{w};\rho) = U\left(r_{\vec{w}}, \sigma_{\vec{w}}^2;\rho\right) = \vec{\bar{r}}^\mathrm{T}\vec{w} – \rho\vec{w}^\mathrm{T}\mathbf{\Sigma}\vec{w}
\label{eq:utilityFunction}
\end{equation}

The resulting optimization problem is also quadratic and solvable in reasonable time. Using the mentioned utility function as an objective function we get the following optimziation problem.

\begin{equation}
\begin{array}{rlcl}
\max_{\vec{w}}& U(\vec{w}) & = & \vec{\bar{r}}^\mathrm{T}\vec{w} – \rho\vec{w}^\mathrm{T}\mathbf{\Sigma}\vec{w} \\
&\vec{1}^\mathrm{T}\vec{w} & = & 1\\
&\vec{w} & \geq & 0\\
\end{array}
\label{eq:mptMaxRiskAverse}
\end{equation}

###### The Efficient Frontier

In the optimization problems above the user must choose some parameter $$\sigma_p^2$$, $$r_p$$ or $$\rho$$ which reflects their preference. A way of analyzing the effect of changing the parameters is to look at the efficient frontier characteristics of the problems. The efficient frontier was coined by Harry Markowitz\cite{Markowitz1952}, and can be defined by the optimal solution space, i.e., optimal portfolios $$\vec{w}$$, that exist for all parameter settings that yield feasible solutions. It can be visualized as an upper-half hyperbola in the mean-variance space created by the optimal portfolios. Two efficient frontiers, the hyperbolic frontier does not have a risk free asset, while the linear does.

Efficient portfolios are portfolios with the highest risk-return ratios given any parameter setting. This means that it is always possible to select a portfolio in the efficient frontier that stochastically dominates any non-efficient portfolio.

###### Adding a Risk Free Asset

Introducing a risk free asset creates a special case where the efficient frontier becomes linear between the risk free asset and the tangency portfolio. The tangency portfolio is a special portfolio which if used with the risk free asset can produce risk-return trade-offs which stochastically dominate any other efficient portfolio lacking the risk free asset. Portfolios that have mean return less than the tangency portfolio lend money at the risk free rate, while portfolios that have larger mean return than the tangency portfolio borrows at the risk free rate. In this thesis borrowing and shorting is not allowed. The chart shows the efficient frontiers of the Dow Jones Industrial Index using daily sampling from 2000 to 2012. Risk free asset is 5 year US Treasury bond. The chart shows the efficient frontiers of the 25 most liquid stocks of Oslo Stock Exchange (OBX) using daily sampling from 2006 to 2012. Risk free asset is cash in NOK.

###### Efficient Market Hypothesis

The efficient market hypothesis (EMH) was first developed by Fama in his PhD thesis during the 1960s. The hypothesis asserts that financial markets are informationally efficient, in other words, prices reflect all relevant information. This means that changes in price are reactions to unpredictable events, i.e., price movements are nothing more than random walks. The EHM assumes that all actors in the market act rationally according to Expected Utility Hypothesis.

There are three major versions of EMH.

• Weak EMH claims that prices on traded assets already reflect all past publicly available information.
• Semi-strong EMH claims both that prices reflect all publicly available information and that prices instantly change to reflect new public information.
• Strong EMH additionally claims that prices instantly reflect even hidden or “insider” information.

The efficient market hypothesis was widely accepted until the 1990s when behavioral economics started to gained ground. Empirical analysis has consistently found faults with EHM. In spite of consistent substantial inefficiency and controversy it is still widely considered a valid starting point. The EHM laid the foundation for modern portfolio theory.