• No results found

Portfolio Inversion

N/A
N/A
Protected

Academic year: 2021

Share "Portfolio Inversion"

Copied!
15
0
0

Loading.... (view fulltext now)

Full text

(1)

IN

DEGREE PROJECT TECHNOLOGY, FIRST CYCLE, 15 CREDITS

STOCKHOLM SWEDEN 2018,

Portfolio Inversion

Finding Market State Probabilities From Optimal Portfolios

GUSTAV EKMAN FREDRIK RUBIN

KTH ROYAL INSTITUTE OF TECHNOLOGY

SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

(2)

www.kth.se

(3)

INOM

EXAMENSARBETE TEKNIK, GRUNDNIVÅ, 15 HP

STOCKHOLM SVERIGE 2018,

Portföljinvertering

Sannolikheter för olika marknadstillstånd givet optimala portföljer

GUSTAV EKMAN FREDRIK RUBIN

KTH

SKOLAN FÖR ELEKTROTEKNIK OCH DATAVETENSKAP

(4)

www.kth.se

(5)

Sammanfattning

Målet med detta projekt var att utveckla en metod som givet en optimal portfölj returnerar sannolikheter för tjur-/björnmarknad. Dessa sannolikheter är faktorer i en faktormodell, vilken modellerar tillgångars förväntade avkastning samt variansen i deras avkastning. Den föreslagna metoden härleddes från Karush- Kuhn-Tucker-villkoren som uppfylls av optimala lösningar till det konvexa Markowitz-problemet. För syntetiska data där alla nödvändiga parametrar var kända exakt kunde metoden ge undre och övre gränser för faktorernas värden. Exakta värden för faktorerna erhölls i de fall då blankning var tillåten, samt i enskilda fall då blankning var förbjuden. Metoden tillämpades även på riktiga data utan entydiga resultat, möjligtvis till följd av skattningsfel samt ogiltiga antaganden om investerarens modell.

(6)

C2A: PORTFOLIO INVERSION

Portfolio Inversion: Finding Market State Probabilities From Optimal Portfolios

Gustav Ekman and Fredrik Rubin

Abstract—In this project, we aim to find a method for obtaining the factors in a bull/bear market factor model for asset return and variance, given an optimal portfolio. The proposed method was derived using the Karush-Kuhn-Tucker (KKT) conditions for optimal solutions to the convex Markowitz portfolio selection problem. For synthetic data where all necessary parameters were known exactly, the method could give bounds on the factors. The exact values of the factors were obtained when short selling was allowed, and in some instances when short selling was forbidden.

The method was evaluated on real-world data with varying results, possibly due to estimation errors and invalid assumptions about the model of the investor.

I. INTRODUCTION

A. Background

An important problem in investment science is portfolio selection, i.e., what assets should be invested in and how much of the investor’s capital should be allocated to each available asset. There have been several attempts to formulate the portfolio selection problem in mathematical terms, and one of the most well-known models is the mean-variance model introduced by Harry Markowitz [1]. The Markowitz mean-variance model makes the assumptions that investors desire a high return on their portfolios, while also being risk- averse, i.e., wanting the return to have a low variance [1], [2].

There is a trade-off between high expected return and low variance on the return, meaning that in order to increase the expected return, an investor must be willing to accept a greater uncertainty in the return [3]. The Markowitz problem is to find an optimal portfolio that maximizes the expected return while minimizing the variance of the return. The balance between an investor’s preferences for high return and low risk is described by a risk aversion parameter, which is a measure of how much the investor avoids variance in the return.

There have been several extensions to the Markowitz mean- variance model. One such extension is to use the semivariance instead of the variance as a measure of risk, i.e. only penalizing returns that are lower than expected, while positive fluctuations in the return are ignored [4]. Another is to account for possible transaction costs and tax effects [5]. Methods for finding portfolios that perform better in the presence of estimation errors have also been developed [6]–[8]. However, the analysis in this project will be based on the classical Markowitz mean- variance model.

B. Project motivation

In order to use this model for finding the optimal portfolio, the expected return vector and covariance matrix of the avail- able assets must be known. The actual values of the expected

return vector and covariance matrix are usually not known exactly in real-world applications, and a challenge thus lies in estimating them.

One way to estimate the expected return vector and covari- ance matrix is to use a factor model, which postulates that they both depend linearly on a number of factors, weighted by their associated probabilities. One example is a two-regime model, which is based on the assumption that the market can be in two different states: growth (bull market) or decline (bear market).

In this model, each market state has a different expected return vector and covariance matrix. If these state specific parameters are estimated from historic data for the two types of market states, the difficulty lies in determining the probabilities of the different market states, in order to obtain the expected values of the expected return vector and covariance matrix for the current market.

The Markowitz problem is a convex optimization problem [9], i.e., it involves the minimization of a convex function on a convex set. Convex optimization problems have a number of useful properties that do not hold for general optimization problems, such as any local minimum also being a global minimum. For any convex optimization problem, a set of conditions called the Karush-Kuhn-Tucker (KKT) conditions must be satisfied by the optimal solutions [9]. The KKT conditions thus provide criteria for whether a solution is optimal or not. It should be possible to rewrite the KKT conditions and solve for the factors in the factor model, using the fact that an optimal portfolio should be a solution to the convex Markowitz problem. This would result in an alternative problem (which will sometimes be referred to as the “inverse problem/method” in this report), the solution of which will yield the factors in the factor model (the “inverse solution”).

C. Project aim

The aim of this project is to find a method for determining the factors in a bull/bear market factor model by examining a portfolio optimized using the classical Markowitz mean- variance model. The derivation of the method will be based on rewriting the KKT conditions, and the method should take the optimal portfolio, the market state specific asset parameters, and the risk aversion parameter as input.

D. Report outline

Section II introduces the notation used in the report, as well as the theory required to understand the procedure and the results of the project. At the end of Section II a formal problem statement is given. In Section III, we derive the inverse methods by rewriting the KKT conditions, and explain

(7)

C2A: PORTFOLIO INVERSION

how real-world market parameters will be estimated from historic data. The results of our inverse method are presented in Section IV, for applications to both synthetic and real data.

In Section V, the results obtained when applying the inverse method, as well as possible sources of error and areas of further research, will be discussed. Lastly, a summary of the report and the main conclusions are presented in Section VI.

II. PRELIMINARIES

A. Notation

µis the expected return vector for the current market state, i.e., the vector whose j:th element is the expected return of asset j. µi denotes the expected return vector for market state iin the factor model used. Σ is the covariance matrix for the current market state, i.e., the symmetric matrix whose element in the j:th row and k:th column is the covariance of assets j and k. Σi denotes the covariance matrix for market state i in the factor model. ω is the vector of portfolio weights, i.e., the i:th element of ω is the fraction of the capital that is invested in asset i. Note that the sum of all elements in ω is one. N is the number of different assets in the portfolio. E is the expected return of a portfolio or an asset. V is the variance on the return of a portfolio or an asset. λ is the risk aversion parameter. ρ and ν are dual variables.

π = [π1, π2, . . . , πX] is the posterior distribution. The element πi is defined by πi = P (market state = i | D), i.e., the probability of market state i conditioned on the available data D. The expected values of µ and Σ will be determined using these probabilities. X is the number of factors in the factor model.

edenotes the vector whose all elements are one. The length of the vector will depend on the context it is used in. [x]i

will denote the i:th element of x if x is a vector, and the i:th column of x if x is a matrix. Note that for the posterior distribution π, we will often write πiwithout brackets. col(A) is the column space of a matrix A. Values that are optimal will be denoted by an asterisk. For example, xis the optimal value of variable x.

B. Convex optimization

Convex optimization problems guarantee global optimum points and can be solved numerically by several efficient algorithms [9]. A function f : IRn → IR is convex if

f (θx + (1− θ)y) ≤ θf(x) + (1 − θ)f(y), (1) for any x, y ∈ IRnand θ ∈ [0, 1] [10]. A convex optimization problem can be written on standard form as

minx f0(x) (2)

s.t. fi(x)≤ 0, i = 1, . . . , m, hj(x) = 0, j = 1, . . . , p ,

where f0, . . . , fm are convex functions (f0 is called the

“objective function”) and h1, . . . , hp are affine functions (i.e.

the infinite line between any two points in the set must itself lie in the set) [9]. This means that the feasible set, and also the optimal set, to the problem is convex [9].

The dual problem is defined as

maxρ,ν g(ρ, ν) (3)

s.t. ρ ≥ 0,

g(ρ, ν) = min

x L(x, ρ, ν), L(x, ρ, ν) = f0(x) +

Xm i=1

ρifi(x) + Xp j=1

νjhj(x) , where

g(ρ, ν) = min

x L(x, ρ, ν), and

L(x, ρ, ν) = f0(x) + Xm i=1

ρifi(x) + Xp j=1

νjhj(x) . We denote the dual optimal value d= max

ρ,ν g(ρ, ν) [9]. The dual function yields a lower bound for the optimal value p to the primal problem

d≤ p. (4)

Strong duality occurs for problems where d = p. The Strong Duality Theorem [11] provides sufficient criteria for strong duality to hold: for the problem (2), strong duality holds if there exists a point ˜x such that fi(˜x) < 0for i ∈ 1, 2, . . . , m and hj(˜x) = 0for i ∈ 1, 2, . . . , p.

For convex problems where strong duality holds, a set of conditions called the KKT conditions must hold. The conditions are as follows [10],

Primal feasibility (PF): fi(x)≤ 0, hj(x) = 0 , Dual feasibility (DF): ρi ≥ 0 ,

Complementary slackness (CS): ρifi(x) = 0, ∀i , Stationarity (S): ∇xL(x, υ, ρ) = 0 ,

where fi are the inequality constraints, hj are the equality constraints, x the solution to the primal problem, and (ρ, ν) the solution to the dual problem.

If the problem is convex, the KKT conditions also ensure that any pair of points that satisfies the conditions must be both primal and dual optimal. In other words, if there exists any point (ρ,ν) that together with x fulfills the KKT conditions, then x = x is optimal. [9]

C. Portfolio optimization

For every possible expected return that can be obtained by investing in the available assets, there will be a portfolio with this expected return and a minimal variance. Conversely, for every possible variance in the return, there will be a portfolio that maximizes the expected return for that variance. Such portfolios are said to be “efficient”, and this set of portfolios that maximize expected return E and minimize variance V is called the efficient frontier [3]. Figure 1 illustrates the efficient frontier for a certain set of assets, where the E and V of the assets are plotted for comparison. Note that it is possible

(8)

C2A: PORTFOLIO INVERSION

Fig. 1: The curve shown in the figure is called the efficient frontier, and is the set of optimal portfolios. The dots show the E and V for the individual assets. As can be seen, a better expected return for the same risk can be achieved by investing in an optimal portfolio instead of an individual asset.

to obtain a higher expected return for the same variance by investing into an optimal portfolio (i.e., a portfolio on the frontier) instead of an individual asset.

The Markowitz problem can be formulated mathematically as a optimization problem on the form [1]–[3], [12]

minω ωTΣω (5)

s.t. ωTµ = E, XN i=1

ωi= 1, ωi ≥ 0 .

The interpretation of the optimization problem stated above is thus to minimize the variance of the portfolio return V = ωTΣω[1]–[3] given a desired expected return. The constraint PN

i=1ωi= 1normalizes the weights, and the constraint ωi≥ 0 prevents short selling (i.e., selling assets that the investor does not currently own). In applications where short selling is allowed, this last constraint may be omitted. Note that these two cases need to be analyzed separately, since changes in the constraints result in a different optimization problem.

Using a Lagrange multiplier γ, the Markowitz problem can be rewritten [13] as

minω ωTΣω− γωTµ (6)

s.t.

XN i=1

ωi= 1, ωi≥ 0 , or equivalently

minω − (ωTµ− λωTΣω) (7) s.t.

XN i=1

ωi= 1, ωi≥ 0 ,

where λ = 1/γ is a “risk aversion parameter” that penalizes high variance. The higher λ is, the lower is the risk that the investor is willing to take. The problem (7) is a convex

optimization problem [9], and it can be shown that it fulfills the criteria in the Strong Duality Theorem presented in [11].

Consider the portfolio ω = [1/N, 1/N, . . . , 1/N]. Then,

−ωi< 0andPN

i=1ωi− 1 = 0, and thus strong duality holds.

This means that the KKT conditions also must hold.

D. Factor models

One of the challenges in the mean-variance approach is to obtain the necessary data µ and Σ for the assets. One approach to this challenge is to use a factor model that is based on the assumption that the market can be in one of several states, each with a state-specific expected return vector µi and covariance matrix Σi, and that the market switches between these states.

Such a model is called a regime-switching model, or a Markov switching model. The probability of the different states is given by the posterior distribution π whose i:th component is defined by πi = P (market state = i | D), where D is the available data. If the future state of the market was known, the problem could be solved using the correct µ = µiand Σ = Σi. However, since the future state is uncertain, the expected return and covariances need to be used instead. In the general case for an arbitrary number of factors X in the model, µ and Σ can be expressed as

µ = XX i=1

πiµi , (8)

and

Σ = XX i=1

πiΣi. (9)

The model above allows the expected µ and Σ to change as the market changes, depending on the probabilities of the different futures states. For the real world applications in this project we assume a two-regime model (X = 2) comprising bull market (growth) and bear market (decline) states. It is thus possible to model the assets by first determining µi and Σifor each possible state (bull/bear), and then weighting them by the corresponding state probabilities. This means that if the necessary µiand Σiare estimated, the remaining difficulty lies in finding the probabilities for the different states.

E. Formal problem statement

In this project we will use a factor model to model the assets, and reformulate the Markowitz portfolio selection by introducing the expressions for the expected values of µ and Σ given by the factor model. The aim of this project is to rewrite the KKT conditions for the reformulated Markowitz portfolio selection problem in order to derive a method that returns the market state probabilities πiwhen given an optimal portfolio ω optimized according to the factor model. To use this method, the market state specific values µi, Σi and the risk-aversion parameter λ that were used when optimizing the portfolio need to be known. When applying the method to real data we will assume that the real world market can be modelled by a two-regime model with bull (µ1, Σ1) and bear (µ2, Σ2) market states.

(9)

C2A: PORTFOLIO INVERSION

III. INVERSE METHODS

This section concerns the derivation of the inverse methods for the two cases when short selling is allowed and forbidden, as well as the estimation of market parameters. In Section III-A, we will derive the inverse method when short selling is allowed, i.e., there is no constraint on the sign of the elements in ω. In Section III-B, the inverse method when short selling is forbidden, i.e., with the constraint that ωi≥ 0 for all elements in ω, is derived. In Section III-C the method used to estimate µi and Σi from historic market data is presented.

A. Inverse for short selling allowed

Using a factor model with the posterior distribution π and Xfactors, the expected return µ and covariance matrix Σ can be expressed as µ = PX

i=1πiµi and Σ = PX

i=1πiΣi. The Markowitz problem can then be rewritten as

minω − XX

i=1

πi

ωTµi− λωTΣiω

(10)

s.t.

XN i=1

ωi= 1 , πi≥ 0 , XX i=1

πi= 1 , for which the Lagrangian is

L(ω, ν) = − XX i=1

πi

ωTµi− λωTΣiω + ν

XN i=1

ωi− 1

! . (11) The KKT conditions are then

PF:

XN i=1

ωi− 1 = 0 (12)

S: − XX

i=1

πii− 2λΣiω) + νe = 0 . (13) Introducing a matrix A defined by [A]i = µi− 2λΣiω, the stationarity condition (13) can be rewritten as

Aπ = νe . (14)

Awill be a N ×X matrix, and commonly N > X since in most cases, the number of assets in the portfolio will be greater than the number of factors used in the model. This would result in (14) being an overdetermined system. In order for the solution of this system to be unique and exact, two requirements need to be placed on (14). Firstly, the solution is unique only if the column vectors in A are linearly independent [14]. Secondly, the solution is exact if νe ∈ col(A), since it will then be possible to exactly construct νefrom a linear combination of the columns of A. Since the KKT conditions should hold for the optimal solution, the correct value of π is such that the stationarity condition (13) holds, and thus νe∈ col(A) must

be true. If both these conditions hold, π can be exactly found as the least-squares solution [14]

π = (ATA)−1ATνe . (15) The uniqueness of the solution enables the use of the least- squares method, and the fact that νe∈ col(A) ensures that the least-squares error is zero. Taking the scalar product of the appropriate e and each side of (15) yields the equation

eTπ = eT(ATA)−1ATνe = 1 , (16) where the last equation is a result of the condition eTπ = PX

i=1πi = 1 since the probabilities must add to one. From (16), ν is obtained as

ν= 1

eT(ATA)−1ATe. (17) Introducing (17) in (15) yields an explicit formula for the posterior distribution

π = 1

eT(ATA)−1ATe(ATA)−1ATe . (18) Given expected return vectors µi, covariance matrices Σi, and the risk aversion parameter λ, as well as the corresponding solution to the Markowitz problem when short selling is allowed, it should thus be possible to use (18) to find the πthat was used to find the solution.

B. Inverse for short selling forbidden

When short selling is forbidden, the additional constraints ωi ≥ 0 ⇐⇒ −ωi ≤ 0 for i = 1, ..., N need to be added to the problem (10). The KKT conditions then become

PF:

XN i=1

ωi − 1 = 0 , (19)

DF: ρ≥ 0 , (20)

CS: ρiωi = 0 , (21)

S: ∇ωL(ω, ρ, ν) = 0 , (22) where the Lagrangian L = L(ω, ρ, ν) is

L = − XX i=1

πi

ωTµi−λωTΣiω

− XN i=1

ρiωi+ν XN i=1

ωi−1

! . (23) The stationarity condition thus becomes

− XX i=1

πii− 2λΣiω)− ρ+ νe = 0 . (24) Taking the scalar product of both sides of (24) with ω yields the equation

− XX i=1

πi∗Tµi− 2λω∗TΣiω)− ω∗Tρ+ νω∗Te = 0 . (25) Using the complementary slackness condition ρiωi = 0 and the primal feasibility condition ω∗Te = 1, (25) simplifies to

ν= XX i=1

πi∗Tµi− 2λω∗TΣiω) . (26)

(10)

C2A: PORTFOLIO INVERSION

Introducing this expression for ν in (24) gives XX

i=1

πi

h(ω∗Tµi−2λω∗TΣiω)e−(µi−2λΣiω)i

= ρ. (27) Introducing a matrix B defined by

[B]i= (ω∗Tµi− 2λω∗TΣiω)e− (µi− 2λΣiω) , (28) equation (27) can be rewritten as

Bπ = ρ. (29)

This equation is not as readily solved as in the case when short selling was allowed, since the vector ρ is unknown.

However, a result of the complementary slackness condition is that whenever ωi> 0, the corresponding ρi must be zero.

Otherwise, ρi ≥ 0. Looking at the i:th component [Bπ]i of the vector Bπ, it can be concluded that

 ωi> 0 =⇒ [Bπ]i= 0 , (30a) ωi= 0 =⇒ [Bπ]i≥ 0 . (30b) Any π that fulfills the conditions (30a) and (30b) (subject to πi ≥ 0 and PX

i=1πi = 1) could have been used when obtaining the solution to the Markowitz problem, and these conditions thus define a region of possible inverse solutions in π-space. Unless this region is a single point, it will not be possible to find an exact and unique π. Nevertheless, it is in this case possible to find lower and upper bounds on the components of π, by minimizing/maximizing each component using a linear program, constrained to the region of inverted π in π-space.

Without any market information, the only things that can be said about π is that πi ≥ 0 and that PX

i=1πi = 1, two conditions that define a simplex in π-space, which we will henceforth refer to as the “π-simplex”. A measurement of how much information can be obtained from the method presented above is to compare the size of the region in π-space constrained by the method to the size of the simplex. A small ratio means that the method has narrowed down the true value of π to a small region in π-space. Quantitatively, a measure of the precision of the method can be obtained by carrying out a Monte Carlo simulation, in order to numerically estimate the sizes of the two different regions.

C. Estimation of parameters

The parameters µi and Σi can be estimated from historic data. By calculating the return on the stocks over time for each market state i, µi can be estimated as the mean of the returns and Σi as the covariance of the returns.

The risk-aversion parameter λ is unknown, meaning that in order to find definite lower and upper bounds on the components of π, different values of λ need to be tried. By iterating the inverse method over several λ, and then taking the global maxima and minima of the components, it is possible to obtain limits on the components that will hold regardless of what λ the investor actually used.

Figure 2 shows the Standard & Poor’s 500 stock market index (S&P 500) from 1980 to 2018 [15], where the dates when the market switches state are marked. The periods

Fig. 2: Shown is the S&P 500 stock market index from 1980 to 2018. The data labels in the figure show the dates that in this report are deemed as points where the market changes state.

between the chosen dates where the overall trend is downward are considered bear markets, while the upward periods are considered bull markets.

IV. INVERSION RESULTS

In Section IV-A and Section IV-B we present the results when the inverse method was applied to synthetic data for short selling allowed and forbidden respectively, and in Section IV-C we present the results when it was applied to real data.

To evaluate the method, it was tested on synthetic data to ensure that it returned correct results. The analysis was carried out for both short selling allowed and forbidden. Since the parameters of the simulated data were known, it was possible to compare these to the results of the inversion. The methods derived are applicable to factor models with an arbitrary num- ber of factors X, as long as X is less than the number of assets N. In this project, asset parameters µiand Σifor a model with 3 factors and 5 assets were simulated using random number generators in MATLAB. When generating the variances and covariances, it was made sure that important mathematical properties, such as the covariance of two assets never being greater than either of the asset variances, were fulfilled. An arbitrary risk aversion parameter λ was chosen for the data set. Optimal portfolios were computed by solving problem (7) in MATLABusing the CVX convex optimization modeling system [16], [17]. A similar data set with synthetic data for 20 assets and 5 factors, which was generated independently by another project group, was received. These two data sets contained data for both short selling allowed and forbidden.

A. Inversion of synthetic data when short selling is allowed The explicit formula (18) was used on the two sets of synthetic data. The posterior distribution used in the 3-factor data set was π = [0.3, 0.5, 0.2], and for the 5-factor data set it was π = [0.0226, 0.1306, 0.2554, 0.2924, 0.2990]. µi, Σi, and the corresponding solution ω was known exactly for both data sets, and for both data sets the exact values of π were obtained from the inverse method.

(11)

C2A: PORTFOLIO INVERSION

TABLE I: The true values of the components of the π- vector for the synthetic 3-factor data set when short selling is forbidden, as well as the lower and upper bounds obtained by the inverse method.

Component of π True value Lower bound Upper bound

1 0.4000 0.3870 0.4692

2 0.5000 0.4942 0.5308

3 0.1000 0.0000 0.1187

TABLE II: The true values of the components of the π- vector for the synthetic 5-factor data set when short selling is forbidden, as well as the lower and upper bounds obtained by the inverse method.

Component of π True value Lower bound Upper bound

1 0.2559 0.2559 0.2559

2 0.1702 0.1702 0.1702

3 0.1363 0.1363 0.1363

4 0.1619 0.1619 0.1619

5 0.2757 0.2757 0.2757

B. Inversion of synthetic data when short selling is forbidden The method was then applied to synthetic data when short selling is forbidden. In order to find lower and upper bounds on each component of π in the region of possible inverse solutions, restricted by the conditions (30a) and (30b), convex optimization was used. Each component πiwas minimized and maximized in this region. Figure 3 shows a visualization of the constraints for the 3-factor data set, and how they restrict the set of possible π.

The π-vector used to generate the 3-factor data set when short selling is allowed is shown in Table I, together with the lower and upper bounds obtained by the inverse method.

The method returned a region of inverted π with a size approximately 7% of the size of the π-simplex, shown in Figure 3d. The π and its bounds for the 5-factor data set are shown in Table II. For the 5-factor data set, all lower and upper bounds were the same, meaning that the allowed set of πis a single point in π-space. Figures 4 and 5 show graphical representations of the bounds on the components of π, and how well they enclose the true value of π, for the 3-factor and 5-factor data sets respectively.

Modifying the 3-factor data set by choosing new values for λand finding the corresponding optimal portfolios resulted in inversion results with different interval lengths for the bounds on the components of π. The general rule was that a lower λ resulted in larger bounding intervals, while sufficiently large λcaused the intervals to converge to specific points.

C. Inversion of real data

The inverse method was applied to the institutional portfolio from Berkshire Hathaway Inc. (reported 2017-12-31, see Ap- pendix) [18]. Historic data for the assets in the portfolio were retrieved from Yahoo Finance [19]. Since the method requires estimates of both bull and bear market parameters, assets that were introduced to the market too recently and which did not

have sufficient historic data were excluded from the portfolio.

This yielded a modified portfolio, consisting only of assets which have existed in both bull and bear markets. The weights of the modified portfolio were then determined.

From the historic stock data, the parameters µi and Σi

were estimated. The inverse method was then applied to the modified portfolio weights and the estimated parameters, for different guesses of the risk aversion parameter λ.

The problem was not solvable when all constraints were applied simultaneously. In order to obtain a solution, only one constraint at a time could be applied, and the solutions obtained for different constraints were not compatible, i.e., the intersection of the different bounding intervals was zero.

V. DISCUSSION

In this section, the results of the inverse method will be discussed. Section V-A concerns the results for synthetic data, while Section V-B concerns the results for real data.

A. Discussion of results for synthetic data

The proposed method for obtaining π when short selling was allowed gave exact inversion results when the exact values of all necessary data were known. This is expected, since the method is a closed form formula derived analytically. In reality, some data would need to be estimated, which may result in a non-exact result. However, this was not tested in this project, and the sensitivity of this method could thus be studied in future projects.

In the more mathematically challenging case when short selling is forbidden, the precision of the method depended on the data it was given. For the inversion of the simulated data set with 3-factors, with the value of all necessary parameters known exactly, the method returned intervals bounding the components of π. The lengths of the intervals varied between the components, meaning that some components were more uncertain than others. Nevertheless, the intervals enclosed the true values. For the 5-factor data set, however, the exact value of π was obtained without any uncertainty, i.e. the lower and upper bounds were the same.

Two possible explanations as to why the inversion results were exact for the 5-factor data set, while the results for the 3-factor data set were not, have to do with the value of λ (in relation to µ and Σ), and the number of assets.

The first explanation is connected to the behavior observed when the λ of the 3-factor data set was modified. Lowering λ caused less precise inversion results, while large values of λ caused the inversion to be exact. It is therefore possible that the λ of the 5-factor data set is sufficiently large to make the inversion results exact, whereas the (non-modified) λ of the 3-factor data set is too low to remove the uncertainty in the inversion, and that this is the reason why the inversion results of the 5-factor data set are more exact than those for the 3- factor data set. λ affects the conditions 30a and 30b (which govern how the region of possible inverse solutions in π- space is restricted) by increasing the significance of the terms related to the covariance matrix Σ. This relation between λ and

(12)

C2A: PORTFOLIO INVERSION

(a) (b)

(c) (d)

Fig. 3: (a)-(c) show visualizations of three of the constraints based on Monte Carlo methods. The black dots designate points that fulfill the constraints, while white dots show points that do not. (d) shows the points which fulfill all constraints. All plots were created based on 5000 Monte Carlo iterations each.

Fig. 4: The dashed lines between the crosses show the possible values for each component of π for the 3-factor data set. The horizontal lines show the true value.

the shape of the region in π-space has not been investigated quantitatively, and it is thus an area of future work.

The second explanation relies on the fact that as more

Fig. 5: The dashed lines between the crosses show the possible values for each component of π for the 5-factor data set. The horizontal lines show the true value.

constraints are applied, the more restricted the set of possible solutions becomes. The conditions 30a and 30b restrict the region of possible inverse solutions in π-space, and there

(13)

C2A: PORTFOLIO INVERSION

will be one such equation for each asset in the portfolio. By increasing the number of assets in the portfolio, the number of conditions that π must satisfy increases. Consequently, each additional asset makes the allowed region in π-space more restricted. For the 5-factor data set, 20 assets were simulated, compared to the 5 assets in the 3-factor data set. Thus, the larger number of constraints for the 5-factor data set could explain why the inverse results for this set were more precise.

B. Discussion of results for real data

The inversion of real data did not succeed, since only a single constraint could be applied at a time and the bounding intervals for some constraints did not overlap, meaning that there is no feasible solution to the problem. This may be caused by several factors, two of which are:

1) The estimates of the asset parameters are inaccurate 2) The assumptions about the model used are invalid The methods used to estimate µi and Σi (i.e. calculating the mean and covariance of historic returns) are probably too simplistic to yield sufficiently accurate estimates. It is nearly impossible to get accurate estimates of the return vector µ using historic data [3], [20]. The main reasons why is that in order to increase the number of data points for the estimate, the time-step must be decreased. However, decreasing the time- step yields data points that are less reliable. In order to get accurate estimates, a long history of returns is needed, and it is highly likely that the return would change during this period. The variances and covariances, on the other hand, can be estimated rather accurately from historic data [3]. Although variances and covariances can be estimated rather accurately from historic data, small errors in the estimates of them may lead to portfolios with very different content [21].

It is thus likely that the estimate obtained for the return vector is inaccurate. As suggested above, the larger the number of assets is, the more conditions do the possible π need to meet. As the number of assets becomes very large, there may be a smaller room for errors in the data, since deviations from the true values may cause some conditions to not be met. The large number of assets could thus amplify the consequences of having inaccurate estimates. As shown in [22], an increase of 11.6 percent per year in the mean return for an individual asset will result in an optimal portfolio with half the assets from the original one. Despite this dramatically changed portfolio the expected return and standard deviation will only change 2 percent. One solution to this problem is to use a more sophisticated method to estimate µi, e.g. using a factor model with factors that are easily measured and that describe the behavior well [3].

Furthermore, the proposed method relies on the fact that the portfolio is an optimal solution to the Markowitz problem obtained when a bull/bear market factor model is used. If the investor has optimized his portfolio for some other portfolio selection problem, the KKT conditions used here do not necessarily hold. This means that if some inversion result could be obtained for a portfolio that is suboptimal for the Markowitz problem (should this be possible at all), it does not have to reflect the true value of π. The fact that the portfolio

was modified by excluding assets with insufficient historic data makes it even more likely that the portfolio is suboptimal.

Since the method used here for inverting real portfolios relies on guessing λ and taking the global maxima and minima of the resulting bounds, the results may be unnecessarily pessimistic and unspecific. If the observed behavior that the uncertainty increases with lower λ holds, then guessing on a too low λ will significantly lower the precision of the inversion results. In order to obtain more precise results, a more sophisticated method to handle the problem of not knowing λ than guessing and taking the extremes should be used. Since there is a connection between λ and the risk of the portfolio (lower λ allow larger risks), it might be possible to find upper and lower bounds on λ if the risk (e.g. standard deviation) of the portfolio return is known. This is something that could be further studied.

VI. CONCLUSIONS

In this project, we studied the possibility to determine the posterior distribution in a factor model used to model the assets in a portfolio, based on the information in the portfolio. In particular, we derived methods for obtaining the market state probabilities underlying a factor model by rewriting the KKT conditions. The derived methods take portfolios optimized by the factor model (as well as estimates of necessary parameters) as input, and return the market state probabilities, both when short selling is allowed and forbidden.

For exact simulated data, the inverse method gave exact results for short selling allowed, whereas the method for short selling forbidden could give either bounds on the components of π or the exact value of π, depending on the values of the parameters. The risk aversion parameter λ seems to affect the certainty of the inversion results, where lower λ tended to give less precise bound on the components of π. The real portfolio was not successfully inverted, which is probably due to estimation errors and invalid assumptions about the model used by the investor.

A. Future work

Possible improvements that can be made to the method include the use of more sophisticated methods for estimating the necessary parameters (e.g. by using factor models), and to develop a method to find bounds on the value of the risk aversion parameter λ used by the investor. Properties of the method that can be further investigated include quantitatively testing the robustness of the inversion methods, and analyzing the relation between λ and the shape of the region of possible πin π-space.

ACKNOWLEDGEMENT

The authors would like to thank their supervisors Cristian R.

Rojas, Robert Mattila, and Sarit Khirirat for their unwavering dedication to the project, their valuable advice, and for al- ways being available throughout the project. Their continuous feedback and well-structured seminars significantly aided the progress of this project.

(14)

C2A: PORTFOLIO INVERSION

REFERENCES

[1] H. Markowitz, “Portfolio selection,” The Journal of Finance, vol. 7, no. 1, pp. 77–91, 1952.

[2] H. M. Markowitz, “Portfolio Selection: Efficient Diversification of Investments”. New Haven: Yale University Press, 1959.

[3] D. G. Luenberger, “Investment science”. New York: Oxford University Press, 1998.

[4] D. Nawrocki, “A Brief History of Downside Risk Measures,” The Journal of Investing, vol. 8, Mar. 2000.

[5] P. N. Kolm, R. T¨ut¨unc¨u, and F. J. Fabozzi, “60 Years of portfolio optimization: Practical challenges and current trends,” European Journal of Operational Research, vol. 234, no. 2, pp. 356–371, Apr. 2014.

[6] O. Ledoit and M. Wolf, “Improved estimation of the covariance matrix of stock returns with an application to portfolio selection,” Journal of Empirical Finance, vol. 10, pp. 603–621, Jan. 2001.

[7] R. Jagannathan and T. Ma, “Risk Reduction in Large Portfolios: Why Imposing the Wrong Constraints Helps,” National Bureau of Economic Research, Working Paper 8922, May 2002.

[8] V. DeMiguel, L. Garlappi, F. J. Nogales, and R. Uppal, “A Generalized Approach to Portfolio Optimization: Improving Performance by Con- straining Portfolio Norms,” Management Science, vol. 55, no. 5, pp.

798–812, Mar. 2009.

[9] S. Boyd and L. Vandenberghe, “Convex Optimization”. New York, NY, USA: Cambridge University Press, 2004, ch. 5, pp. 215–271.

[10] H. R. Miller, “Optimization: Foundations and Applications”. Hoboken, NJ: Wiley-Interscience, 1999.

[11] D. G. Luenberger and Y. Ye, “Linear and Nonlinear Programming”.

New York: Springer Publishing Company, Incorporated, 2015.

[12] H. Tanaka, P. Guo, and I. T¨urksen, “Portfolio selection based on fuzzy probabilities and possibility distributions,” Fuzzy Sets and Systems, vol.

111, no. 3, pp. 387 – 397, 2000.

[13] R. C. Merton, “An Analytic Derivation of the Efficient Portfolio Fron- tier,” The Journal of Financial and Quantitative Analysis, vol. 7, no. 4, pp. 1851–1872, 1972.

[14] D. C. Lay, “Linear Algebra and Its Applications”, 3rd ed., J. Ha, W. Hoffman, K. Wernholm, and E. Portwood, Eds. Reading, MA:

Addison-Wesley, 2006.

[15] (2018, March) S&P 500 - Yahoo Finance. Yahoo Inc., Sunnyvale, CA, USA. [Online]. Available: https://finance.yahoo.com/quote/%5EGSPC/

history?p=%5EGSPC

[16] M. Grant and S. Boyd. (2014, Mar.) CVX: Matlab software for disciplined convex programming, version 2.1. [Online]. Available:

http://cvxr.com/cvx

[17] M. Grant and S. Boyd, “Graph implementations for nonsmooth convex programs,” in Recent Advances in Learning and Control, ser. Lecture Notes in Control and Information Sciences, V. Blondel, S. Boyd, and H. Kimura, Eds. Springer-Verlag Limited, 2008, pp. 95–110. [Online].

Available: https://web.stanford.edu/boyd/papers/graph dcp.html [18] (2018, April) BERKSHIRE HATHAWAY INC Institutional Portfolio.

The NASDAQ Stock Market, New York, NY, USA. [Online].

Available: https://www.nasdaq.com/quotes/institutional-portfolio/

berkshire-hathaway-inc-54239?sortname=companyname&sorttype=0&

page=3

[19] (2018, March) Yahoo Finance - Business Finance, Stock Market, Quotes, News. Yahoo Inc., Sunnyvale, CA, USA. [Online]. Available:

https://finance.yahoo.com/

[20] C. Stein, “Inadmissibility of the usual estimator for the mean of a multivariate normal distribution,” in Proceedings of the Third Berke- ley Symposium on Mathematical Statistics and Probability, Volume 1:

Contributions to the Theory of Statistics. Berkeley, Calif.: University of California Press, 1956, pp. 197–206.

[21] R. O. Michaud, “The Markowitz optimization enigma: Is ’optimized’

optimal?” Financial Analysts Journal, vol. 45, no. 1, pp. 31–42, 1989.

[22] M. J. Best and R. R. Grauer, “On the sensitivity of mean-variance- efficient portfolios to changes in asset means: Some analytical and computational results,” The Review of Financial Studies, vol. 4, no. 2, pp. 315–342, 1991.

(15)

C2A: PORTFOLIO INVERSION

APPENDIX

BERKSHIREHATHAWAY INSTITUTIONAL PORTFOLIO

The portfolio below is the Berkshire Hathaway institutional portfolio (reported 2017-12-31) that was used to test the inverse method on real data. The data for the portfolio was retrieved from the NASDAQ Stock Market’s website [18].

Company Class Value of Shares ($1,000s) Shares Held

AMERICAN AIRLS GROUP INC COM 2 081 500 46 000 000

AMERICAN EXPRESS CO COM 14 976 105 151 610 700

APPLE INC COM 27 056 903 165 333 962

AXALTA COATING SYS LTD COM 716 980 23 324 000

BANK AMER CORP COM 20 465 060 679 000 000

BANK NEW YORK MELLON CORP COM 3 369 361 60 818 783

CHARTER COMMUNICATIONS INC NEW CL A 2 549 789 8 489 391

COCA COLA CO COM 16 972 000 400 000 000

COSTCO WHSL CORP NEW COM 840 542 4 333 363

DAVITA INC COM 2 441 201 38 565 570

DELTA AIR LINES INC DEL COM NEW 2 902 483 53 110 395

GENERAL MTRS CO COM 1 905 500 50 000 000

GOLDMAN SACHS GROUP INC COM 2 621 846 10 959 519

GRAHAM HLDGS CO COM 65 449 107 575

INTERNATIONAL BUSINESS MACHS COM 298 892 2 048 045

JOHNSON & JOHNSON COM 41 463 327 100

KRAFT HEINZ CO COM 18 512 339 325 634 818

LIBERTY GLOBAL PLC SHS CL A 656 081 20 180 897

LIBERTY GLOBAL PLC SHS CL C 230 621 7 346 968

LIBERTY LATIN AMERICA LTD COM CL C 24 936 1 284 020

LIBERTY LATIN AMERICA LTD COM CL A 52 913 2 714 854

LIBERTY MEDIA CORP DELAWARE COM C SIRIUSXM 1 310 485 31 090 985

LIBERTY MEDIA CORP DELAWARE COM A SIRIUSXM 627 256 14 860 360

M & T BK CORP COM 982 007 5 382 040

MASTERCARD INCORPORATED CL A 879 176 4 934 756

MONDELEZ INTL INC CL A 22 987 578 000

MONSANTO CO NEW COM 1 463 476 11 708 747

MOODYS CORP COM 4 062 619 24 669 778

PHILLIPS 66 COM 9 079 227 80 689 892

PROCTER AND GAMBLE CO COM 22 945 315 400

RESTAURANT BRANDS INTL INC COM 459 630 8 438 225

SANOFI SPONSORED ADR 156 537 3 878 524

SIRIUS XM HLDGS INC COM 870 248 137 915 729

SOUTHWEST AIRLS CO COM 2 540 249 47 659 456

STORE CAP CORP COM 467 590 18 621 674

SYNCHRONY FINL COM 692 740 20 803 000

TEVA PHARMACEUTICAL INDS LTD SPONSORED ADR 333 534 18 875 721

TORCHMARK CORP COM 551 313 6 353 727

U S G CORP COM NEW 1 568 271 39 002 016

UNITED CONTL HLDGS INC COM 1 879 454 28 211 563

UNITED PARCEL SERVICE INC CL B 6 729 59 400

US BANCORP DEL COM NEW 4 420 850 87 058 877

VERISIGN INC COM 1 565 987 12 952 745

VERISK ANALYTICS INC COM 166 725 1 563 434

VERIZON COMMUNICATIONS INC COM 46 928

VISA INC COM CL A 1 342 277 10 562 460

WALMART INC COM 122 546 1 393 513

WELLS FARGO CO NEW COM 24 029 700 458 232 268

References

Related documents

Enligt mig visar uppsatsen att Nordirland är så pass polariserat att ett sådant hänsynstagande krävs vid besvarandet av forskningsfrågan och att Sinn Féin

This paper examines the effect of the ban on the banned stocks in terms of returns and market quality measured by abnormal returns, volatility, bid-ask spreads and volumes

The research question of this thesis is “how does short selling affect the Swedish stock market?” with the purpose to examine the positive and negative contributions of

We conclude by showing that existence of generalised weak simple products in the subcategory of projectives is equivalent to the cartesian closure of the exact category, thus

while considering that the given matrix A is diagonalizable with eigenvalues having identical geometric and algebraic multiplicities, the columns of the matrix Q evalu- ated as

As to investigate this, we will examine the differences in stock price returns after both domestic and foreign investors have taken on short positions in stocks on the

Landau damping simulation Figure 3 (left) with the adaptive number of Hermite mode takes 46.7 s while the reference simulation that uses fixed number of Hermite modes takes 56.3 s..

This has the purpose of gaining a great deal of information regarding an individual expert’s thresholds by ask- ing her to code many different cases that utilize a wide variety