prof. daniel p. palomar · 3 portfolio basics 4 heuristic portfolios 5 markowitz’s modern...

74
Portfolio Optimization Prof. Daniel P. Palomar ELEC5470/IEDA6100A - Convex Optimization The Hong Kong University of Science and Technology (HKUST) Fall 2020-21

Upload: others

Post on 12-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Portfolio Optimization

Prof. Daniel P. Palomar

ELEC5470/IEDA6100A - Convex OptimizationThe Hong Kong University of Science and Technology (HKUST)

Fall 2020-21

Page 2: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 3: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 4: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Asset log-pricesLet pt be the price of an asset at (discrete) time index t.The fundamental model is based on modeling the log-prices yt ≜ log pt as a random walk:

yt = µ + yt−1 + ϵt

Jan 032007

Jan 022008

Jan 022009

Jan 042010

Jan 032011

Jan 032012

Jan 022013

Jan 022014

Jan 022015

Jan 042016

Jan 032017

Dec 292017

Log−prices of S&P 500 index 2007−01−03 / 2017−12−29

6.6

6.8

7.0

7.2

7.4

7.6

7.8

6.6

6.8

7.0

7.2

7.4

7.6

7.8

D. Palomar (HKUST) Portfolio Optimization 4 / 74

Page 5: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Asset returnsFor stocks, returns are used for the modeling since they are “stationary” (as opposed tothe previous random walk).Simple return (a.k.a. linear or net return) is

Rt ≜pt − pt−1

pt−1= pt

pt−1− 1.

Log-return (a.k.a. continuously compounded return) is

rt ≜ yt − yt−1 = log ptpt−1

= log (1 + Rt) .

Observe that the log-return is “stationary”:

rt = yt − yt−1 = µ + ϵt

Note that rt ≈ Rt when Rt is small (i.e., the changes in pt are small) (Ruppert 2010)1.1D. Ruppert, Statistics and Data Analysis for Financial Engineering. Springer, 2010.

D. Palomar (HKUST) Portfolio Optimization 5 / 74

Page 6: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

S&P 500 index - Log-returns

Jan 042007

Jan 022008

Jan 022009

Jan 042010

Jan 032011

Jan 032012

Jan 022013

Jan 022014

Jan 022015

Jan 042016

Jan 032017

Dec 292017

Log−returns of S&P 500 index 2007−01−04 / 2017−12−29

−0.05

0.00

0.05

0.10

−0.05

0.00

0.05

0.10

D. Palomar (HKUST) Portfolio Optimization 6 / 74

Page 7: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Non-Gaussianity and asymmetryHistograms of S&P 500 log-returns:

Histogram of daily log−returns

return

Den

sity

−0.10 −0.05 0.00 0.05 0.10

010

2030

4050

60

Histogram of weekly log−returns

return

Den

sity

−0.2 −0.1 0.0 0.1

05

1015

2025

Histogram of biweekly log−returns

return

Den

sity

−0.3 −0.2 −0.1 0.0 0.1 0.2

05

1015

20

Histogram of monthly log−returns

return

Den

sity

−0.3 −0.2 −0.1 0.0 0.1 0.2

02

46

810

1214

Histogram of bimonthly log−returns

return

Den

sity

−0.4 −0.2 0.0 0.2

02

46

8

Histogram of quarterly log−returns

return

Den

sity

−0.4 −0.2 0.0 0.2

02

46

810

D. Palomar (HKUST) Portfolio Optimization 7 / 74

Page 8: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Heavy-tailnessQQ plots of S&P 500 log-returns:

D. Palomar (HKUST) Portfolio Optimization 8 / 74

Page 9: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Volatility clusteringS&P 500 log-returns:

Jan 042007

Jan 022008

Jan 022009

Jan 042010

Jan 032011

Jan 032012

Jan 022013

Jan 022014

Jan 022015

Jan 042016

Jan 032017

Dec 292017

Log−returns of S&P 500 index 2007−01−04 / 2017−12−29

−0.05

0.00

0.05

0.10

−0.05

0.00

0.05

0.10

D. Palomar (HKUST) Portfolio Optimization 9 / 74

Page 10: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Volatility clustering removedStandardized S&P 500 log-returns:

Jan 042007

Jan 022008

Jan 022009

Jan 042010

Jan 032011

Jan 032012

Jan 022013

Jan 022014

Jan 022015

Jan 042016

Jan 032017

Dec 292017

Standardized log−returns of S&P 500 index 2007−01−04 / 2017−12−29

−4

−2

0

2

−4

−2

0

2

D. Palomar (HKUST) Portfolio Optimization 10 / 74

Page 11: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Frequency of data

Low frequency (weekly, monthly): Gaussian distributions seems to fit reality aftercorrecting for volatility clustering (except for the asymmetry), but the nonstationarity is abig issue

Medium frequency (daily): definitely heavy tails even after correcting for volatilityclustering, as well as asymmetry

High frequency (intraday, 30min, 5min, tick-data): below 5min the noisemicrostructure starts to reveal itself

D. Palomar (HKUST) Portfolio Optimization 11 / 74

Page 12: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 13: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Returns of the universe

In practice, we don’t just deal with one asset but with a whole universe of N assets.We denote the log-returns of the N assets at time t with the vector rt ∈ RN.The time index t can denote any arbitrary period such as days, weeks, months, 5-minintervals, etc.Ft−1 denotes the previous historical data.Econometrics aims at modeling rt conditional on Ft−1.rt is a multivariate stochastic process with conditional mean and covariance matrixdenoted as (Feng and Palomar 2016)2

µt ≜ E [rt | Ft−1]

Σt ≜ Cov [rt | Ft−1] = E[(rt − µt)(rt − µt)T | Ft−1

].

2Y. Feng and D. P. Palomar, A Signal Processing Perspective on Financial Engineering. Foundations andTrends in Signal Processing, Now Publishers, 2016.

D. Palomar (HKUST) Portfolio Optimization 13 / 74

Page 14: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

i.i.d. model

For simplicity we will assume that rt follows an i.i.d. distribution (which is not veryinnacurate in general).

That is, both the conditional mean and conditional covariance are constant:

µt = µ,

Σt = Σ.

Very simple model, however, it is one of the most fundamental assumptions for manyimportant works, e.g., the Nobel prize-winning Markowitz’s portfolio theory (Markowitz1952)3.

3H. Markowitz, “Portfolio selection,” J. Financ., vol. 7, no. 1, pp. 77–91, 1952.D. Palomar (HKUST) Portfolio Optimization 14 / 74

Page 15: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Factor models

Factor models are special cases of the i.i.d. model with the covariance matrix beingdecomposed into two parts: low dimensional factors and marginal noise.The factor model is

rt = α + Bft + wt,

whereα denotes a constant vectorft ∈ RK with K≪ N is a vector of a few factors that are responsible for most of therandomness in the marketB ∈ RN×K denotes how the low dimensional factors affect the higher dimensional marketassetswt is a white noise residual vector that has only a marginal effect.

The factors can be explicit or implicit.Widely used by practitioners (they buy factors at a high premium).Connections with Principal Component Analysis (PCA) (Jolliffe 2002)4.

4I. Jolliffe, Principal Component Analysis. Springer-Verlag, 2002.D. Palomar (HKUST) Portfolio Optimization 15 / 74

Page 16: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Time-series modelsThe previous models are i.i.d., but there are hundreds of other models attempting tocapture the time correlation or time structure of the returns, as well as the volatilityclustering or heteroskedasticity.To capture the time correlation we have mean models: VAR, VMA, VARMA, VARIMA,VECM, etc.To capture the volatility clustering we have covariance models: ARCH, GARCH, VEC,DVEC, BEKK, CCC, DCC, etc.Standard textbook references (Lütkepohl 2007; Tsay 2005, 2013):

H. Lutkepohl. New Introduction to Multiple Time Series Analysis. Springer, 2007.R. S. Tsay. Multivariate Time Series Analysis: With R and Financial Applications.

John Wiley & Sons, 2013.

Simple introductory reference (Feng and Palomar 2016):Y. Feng and D. P. Palomar. A Signal Processing Perspective on Financial Engi-

neering. Foundations and Trends in Signal Processing, Now Publishers, 2016.D. Palomar (HKUST) Portfolio Optimization 16 / 74

Page 17: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Sample estimates

Consider the i.i.d. model:rt = µ + wt,

where µ ∈ RN is the mean and wt ∈ RN is an i.i.d. process with zero mean and constantcovariance matrix Σ.The mean vector µ and covariance matrix Σ have to be estimated in practice based on Tobservations.The simplest estimators are the sample estimators:

sample mean: µ = 1T

∑Tt=1 rt

sample covariance matrix: Σ = 1T−1

∑Tt=1(rt − µ)(rt − µ)T.

Note that the factor 1/ (T− 1) is used instead of 1/T to get an unbiased estimator(asymptotically for T→∞ they coincide).

Many more sophisticated estimators exist, namely: shrinkage estimators, Black-Littermanestimators, etc.

D. Palomar (HKUST) Portfolio Optimization 17 / 74

Page 18: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Least-Square (LS) estimator

Minimize the least-square error in the T observed i.i.d. samples:

minimizeµ

1T

T∑t=1∥rt − µ∥22 .

The optimal solution is the sample mean:

µ = 1T

T∑t=1

rt.

The sample covariance of the residuals wt = rt − µ is the sample covariance matrix:

Σ = 1T− 1

T∑t=1

(rt − µ) (rt − µ)T .

D. Palomar (HKUST) Portfolio Optimization 18 / 74

Page 19: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Maximum Likelihood Estimator (MLE)

Assume rt are i.i.d. and follow a Gaussian distribution:

f(r) = 1√(2π)N |Σ|

e− 12 (r−µ)TΣ−1(r−µ).

whereµ ∈ RN is a mean vector that gives the locationΣ ∈ RN×N is a positive definite covariance matrix that defines the shape.

D. Palomar (HKUST) Portfolio Optimization 19 / 74

Page 20: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

MLE

Given the T i.i.d. samples rt, t = 1, . . . , T, the negative log-likelihood function is

ℓ(µ, Σ) = − logT∏

t=1f(rt)

= T2 log |Σ|+

T∑t=1

12(rt − µ)TΣ−1(rt − µ) + const.

Setting the derivative of ℓ(µ, Σ) w.r.t. µ and Σ−1 to zeros and solving the equationsyield:

µ = 1T

T∑t=1

rt

Σ = 1T

T∑t=1

(rt − µ) (rt − µ)T .

D. Palomar (HKUST) Portfolio Optimization 20 / 74

Page 21: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 22: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Portfolio return

Suppose the capital budget is B dollars.The portfolio w ∈ RN denotes the normalized dollar weights of the N assets such that1Tw = 1 (so Bw denotes dollars invested in the assets).For each asset i, the initial wealth is Bwi and the end wealth is

Bwi (pi,t/pi,t−1) = Bwi (Rit + 1) .

Then the portfolio return is

Rpt =

∑Ni=1 Bwi (Rit + 1)− B

B =N∑

i=1wiRit ≈

N∑i=1

wirit = wTrt

The portfolio expected return and variance are wTµ and wTΣw, respectively.

D. Palomar (HKUST) Portfolio Optimization 22 / 74

Page 23: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Performance measuresExpected return: wTµVolatility:

√wTΣw

Sharpe Ratio (SR): expected excess return per unit of risk

SR = wTµ− rf√wTΣw

where rf is the risk-free rate (e.g., interest rate on a three-month U.S. Treasury bill).Information Ratio (IR): SR with respect to a benchmark (e.g., the market index):IR = E[wTrt−rb,t]√

Var[wTrt−rb,t].

Drawdown: decline from a historical peak of the cumulative profit X(t):D(T) = max

t∈[0,T]X(t)− X(T)

VaR (Value at Risk): quantile of the loss.ES (Expected Shortfall) or CVaR (Conditional Value at Risk): expected value of theloss above some quantile.

D. Palomar (HKUST) Portfolio Optimization 23 / 74

Page 24: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Practical constraints

Capital budget constraint:1Tw = 1.

Long-only constraint:w ≥ 0.

Dollar-neutral or self-financing constraint:

1Tw = 0.

Holding constraint:l ≤ w ≤ u

where l ∈ RN and u ∈ RN are lower and upper bounds of the asset positions, respectively.

D. Palomar (HKUST) Portfolio Optimization 24 / 74

Page 25: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Practical constraints

Leverage constraint:∥w∥1 ≤ L.

Cardinality constraint:∥w∥0 ≤ K.

Turnover constraint:∥w−w0∥1 ≤ u

where w0 is the currently held portfolio.

Market-neutral constraint:βTw = 0.

D. Palomar (HKUST) Portfolio Optimization 25 / 74

Page 26: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 27: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Heuristic portfolios

Heuristic portfolios are not formally derived from a sound mathematical foundation.Instead, they are intuitive and based on common sense.

We will explore the following simple and heuristic portfolios:Buy & Hold (B&H)Buy & Rebalanceequally weighted portfolio (EWP) or 1/N portfolioquintile portfolioglobal maximum return portfolio (GMRP).

D. Palomar (HKUST) Portfolio Optimization 27 / 74

Page 28: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Buy & Hold (B&H)

The simplest investment strategy consists of selecting just one asset, allocating the wholebudget B to it:

Buy & Hold (B&H): chooses one asset and sticks to it forever.Buy & Rebalance: chooses one asset but it reevaluates that choice regularly.

The belief behind such investment is that the asset will increase gradually in value overthe investment period.There is no diversification in this strategy.One can use different methods (like fundamental analysis or technical analysis) to makethe choice.Mathematically, it can be expressed as

w = ei

where ei denotes the canonical vector with a 1 on the ith position and 0 elsewhere.

D. Palomar (HKUST) Portfolio Optimization 28 / 74

Page 29: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Buy & Hold (B&H)Cumulative PnL of 9 possible B&H for 9 assets:

Jan 032013

Jul 012013

Jan 022014

Jul 012014

Jan 022015

Jul 012015

Jan 042016

Jul 012016

Dec 302016

Buy & Hold performance 2013−01−03 / 2016−12−30

1

2

3

4

AAPLAMDADIABBVAEZSAAPDAACF

D. Palomar (HKUST) Portfolio Optimization 29 / 74

Page 30: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Equally weighted portfolio (EWP) or 1/N portfolioOne of the most important goals of quantitative portfolio management is to realize thegoal of diversification across different assets in a portfolio.A simple way to achieve diversification is by allocating the capital equally across all theassets.This strategy is called equally weighted portfolio (EWP), 1/N portfolio, uniformportfolio, or maximum deconcentration portfolio:

w = 1N1.

It has been called “Talmudic rule” (Duchin and Levy 2009) since the Babylonian Talmudrecommended this strategy approximately 1,500 years ago: “A man should always placehis money, one third in land, a third in merchandise, and keep a third in hand.”It has gained much interest due to superior historical performance and the emergence ofseveral equally weighted ETFs (DeMiguel et al. 2009). For example, Standard & Poor’shas developed many S&P 500 equal weighted indices.

D. Palomar (HKUST) Portfolio Optimization 30 / 74

Page 31: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Quintile Portfolio

The quintile portfolio is widely used by practitioners.Two types: long-only quintile portfolio and long-short quintile portfolio.Basic idea: 1) rank the N stocks according to some criterion, 2) divide them into fiveparts, and 3) long the top part (and possibly short the bottom part).One can rank the stocks in a multitude of ways (typically based on expensive factors thatinvestment funds buy at a premium price).If we restric to price data, three common possible rankings are according to:

1 µ

diag(Σ)3

µ√diag(Σ)

D. Palomar (HKUST) Portfolio Optimization 31 / 74

Page 32: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Global maximum return portfolio (GMRP)

Another simple way to make an investment from the N assets is to only invest on the onewith the highest return.Mathematically, the global maximum return portfolio (GMRP) is formulated as

maximizew

wTµ

subject to 1Tw = 1, w ≥ 0.

This problem is convex and can be optimally solved, but of course the solution is trivial:to allocate all the budget to the asset with maximum return.However, this seemingly good portfolio lacks diversification and performs poorly becausepast performance is not a guarantee of future performance.In addition, the estimation of µ is extremely noisy in practice (Chopra and Ziemba 1993)5.

5V. Chopra and W. Ziemba, “The effect of errors in means, variances and covariances on optimal portfoliochoice,” Journal of Portfolio Management, 1993.

D. Palomar (HKUST) Portfolio Optimization 32 / 74

Page 33: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

ExampleDollar allocation for EWP, QuintP, and GMRP:

D. Palomar (HKUST) Portfolio Optimization 33 / 74

Page 34: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 35: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Risk control

In finance, the expected return wTµ is very relevant as it quantifies the average benefit.

However, in practice, the average performance is not enough to characterize aninvestment and one needs to control the probability of going bankrupt.

Risk measures control how risky an investment strategy is.

The most basic measure of risk is given by the variance (Markowitz 1952)6: a highervariance means that there are large peaks in the distribution which may cause a big loss.

There are more sophisticated risk measures such as downside risk, VaR, ES, etc.

6H. Markowitz, “Portfolio selection,” J. Financ., vol. 7, no. 1, pp. 77–91, 1952.D. Palomar (HKUST) Portfolio Optimization 35 / 74

Page 36: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 37: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Mean-variance tradeoff

The mean return wTµ and the variance (risk) wTΣw (equivalently, the standarddeviation or volatility

√wTΣw) constitute two important performance measures.

Usually, the higher the mean return the higher the variance and vice-versa.

Thus, we are faced with two objectives to be optimized: it is a multi-objectiveoptimization problem.

They define a fundamental mean-variance tradeoff curve (Pareto curve).

The choice of a specific point in this tradeoff curve depends on how agressive orrisk-averse the investor is.

D. Palomar (HKUST) Portfolio Optimization 37 / 74

Page 38: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Mean-variance tradeoff

D. Palomar (HKUST) Portfolio Optimization 38 / 74

Page 39: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Markowitz’s mean-variance portfolio (1952)

The idea of Markowitz’s mean-variance portfolio (MVP) (Markowitz 1952)7 is to finda trade-off between the expected return wTµ and the risk of the portfolio measured bythe variance wTΣw:

maximizew

wTµ− λwTΣwsubject to 1Tw = 1

where wT1 = 1 is the capital budget constraint and λ is a parameter that controls howrisk-averse the investor is.This is also referred to as Modern Portfolio Theory (MPT).

This is a convex quadratic problem (QP) with only one linear constraint which admits aclosed-form solution:

wMVP = 12λ

Σ−1 (µ + ν1) ,

where ν is the optimal dual variable ν = 2λ−1TΣ−1µ1TΣ−11 .

7H. Markowitz, “Portfolio selection,” J. Financ., vol. 7, no. 1, pp. 77–91, 1952.D. Palomar (HKUST) Portfolio Optimization 39 / 74

Page 40: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Markowitz’s mean-variance portfolio (1952)

There are two alternative obvious reformulations for Markowitz’s portfolio.Maximization of mean return:

maximizew

wTµ

subject to wTΣw ≤ α1Tw = 1.

Minimization of risk:minimize

wwTΣw

subject to wTµ ≥ β1Tw = 1.

The three formulations give different points on the Pareto optimal curve.They all require choosing one parameter (α, β, or λ).By sweeping over this parameter, one can recover the whole Pareto optimal curve.

D. Palomar (HKUST) Portfolio Optimization 40 / 74

Page 41: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Efficient frontierThe previous three problems result in the same mean-variance trade-off curve (Pareto curve):

D. Palomar (HKUST) Portfolio Optimization 41 / 74

Page 42: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Markowitz’s portfolio with practical constraints

A general Markowitz’s portfolio with practical constraints could be:

maximizew

wTµ− λwTΣwsubject to wT1 = 1 budget

w ≥ 0 no shorting∥w∥1 ≤ γ leverage∥w−w0∥1 ≤ τ turnover∥w∥∞ ≤ u max position∥w∥0 ≤ K sparsity

where:γ ≥ 1 controls the amount of shorting and leveragingτ > 0 controls the turnover (to control the transaction costs in the rebalancing)u limits the position in each stockK controls the cardinality of the portfolio (to select a small set of stocks from the universe).

Without the sparsity constraint, the problem can be rewritten as a QP.D. Palomar (HKUST) Portfolio Optimization 42 / 74

Page 43: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Markowitz’s MVP as a regression

Interestingly, the MVP formulation can be interpreted as a regression.The key observation is that the variance of the portfolio can be seen as an ℓ2-norm errorterm:

wTΣw = wTE[(rt − µ)(rt − µ)T

]w

= E[(wT(rt − µ))2

]= E

[(wTrt − ρ)2

]where ρ = wTµ.The sample approximation of the expected value is

E[(wTrt − ρ)2

]≈ 1

T

T∑t=1

(wTrt − ρ)2 = 1T∥Rw− ρ1∥2

where R ≜ [r1, . . . , rT]T.D. Palomar (HKUST) Portfolio Optimization 43 / 74

Page 44: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Markowitz’s MVP as a regression

Let’s start by rewritting the MVP as a minimization:

minimizew

wTΣw− 1λwTµ

subject to 1Tw = 1

Thus, we can finally write the MVP as the regression

minimizew,ρ

1T∥Rw− ρ1∥2 − 1

λρ

subject to ρ = wTµ1Tw = 1

If instead of the mean-variance formulation, we fix the expected return to some value andminimize the variance, then ρ simply becomes a fixed value rather than a variable.Intuitively, this reformulation is trying to achieve the expected return ρ with minimimumvariance in the ℓ2-norm sense.

D. Palomar (HKUST) Portfolio Optimization 44 / 74

Page 45: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 46: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Global minimum variance portfolio (GMVP)Recall the risk minimization formulation:

minimizew

wTΣwsubject to wTµ ≥ β

1Tw = 1.

The global minimum variance portfolio (GMVP) ignores the expected return and focuseson the risk only:

minimizew

wTΣwsubject to 1Tw = 1.

It is a simple convex QP with solution

wGMVP = 11TΣ−11

Σ−11.

It is widely used in academic papers for simplicity of evaluation and comparison ofdifferent estimators of the covariance matrix Σ (while ignoring the estimation of µ).

D. Palomar (HKUST) Portfolio Optimization 46 / 74

Page 47: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

GMVP with leverage constraints

The GMVP is typically considered with no-short constraints w ≥ 0:

minimizew

wTΣwsubject to 1Tw = 1, w ≥ 0.

However, if short-selling is allowed, one needs to limit the amount of leverage to avoidimpractical solutions with very large positive and negative weights that cancel out.A sensible GMVP formulation with leverage is

minimizew

wTΣwsubject to 1Tw = 1, ∥w∥1 ≤ γ

where γ ≥ 1 is a parameter that controls the amount of leverage:γ = 1 means no shorting (so equivalent to w ≥ 0)γ > 1 allows some shorting as well as leverage in the longs, e.g., γ = 1.5 would allow theportfolio w = (1.25,−0.25).

D. Palomar (HKUST) Portfolio Optimization 47 / 74

Page 48: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Outline

1 Primer on Financial Data

2 Modeling the Returns

3 Portfolio Basics

4 Heuristic Portfolios

5 Markowitz’s Modern Portfolio Theory (MPT)

Mean-variance portfolio (MVP)Global minimum variance portfolio (GMVP)Maximum Sharpe ratio portfolio (MSRP)

Page 49: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Maximum Sharpe ratio portfolio (MSRP)

Markowitz’s mean-variance framework provides portfolios along the Pareto-optimalfrontier and the choice depends on the risk-aversion of the investor.But typically one measures an investment with the Sharpe ratio: only one portfolio on thePareto-optimal frontier achieves the maximum Sharpe ratio.Precisely, Sharpe (1966)8 first proposed the maximization of the Sharpe ratio:

maximizew

wTµ− rf√wTΣw

subject to 1Tw = 1, (w ≥ 0)

where rf is the return of a risk-free asset.However, this problem is not convex!This problem belong to the class of fractional programming (FP) with many methodsavailable for its resolution.

8W. F. Sharpe, “Mutual fund performance,” The Journal of Business, vol. 39, no. 1, pp. 119–138, 1966.D. Palomar (HKUST) Portfolio Optimization 49 / 74

Page 50: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Fractional Programming (FP)Fractional programming (FP) is a family of optimization problems involving ratios.Its history can be traced back to a paper on economic expansion by von Neumann(1937).9It has since inspired the studies in economics, management science, optics, informationtheory, communication systems, graph theory, computer science, etc.Given functions f(x) ≥ 0 and g(x) > 0, a single-ratio FP is

maximizex

f(x)g(x)

subject to x ∈ X .

FP has been widely studied and extended to deal with multiple ratios such asmaximize

xmini

fi(x)gi(x)

subject to x ∈ X .

9J. von Neumann, “Uber ein okonomisches gleichgewichtssystem und eine verallgemeinerung desbrouwerschen fixpunktsatzes,” Ergebnisse eines Mathematischen Kolloquiums, vol. 8, pp. 73–83, 1937.

D. Palomar (HKUST) Portfolio Optimization 50 / 74

Page 51: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: How to solve FP

FPs are nonconvex problems, so in principle they are tough to solve (Stancu-Minasian1992).10

However, the so-called concave-convex FP can be easibly solved in different ways.We will focus on the concave-convex single-ratio FP:

maximizex

f(x)g(x)

subject to x ∈ X .

where f(x) ≥ 0 is concave and g(x) > 0 is convex.Main approaches:

via bisection method (aka sandwich technique)via Dinkelbach transformvia Schaible transform (Charnes-Cooper transform for the linear FP case)

10I. M. Stancu-Minasian, Fractional Programming: Theory, Methods and Applications. Kluwer AcademicPublishers, 1992.

D. Palomar (HKUST) Portfolio Optimization 51 / 74

Page 52: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Solving FP via bisectionThe idea is to realize that a concave-convex FP, while not convex, is quasi-convex.This can be easily seen by rewritting the problem in epigraph form:

maximizex,t

t

subject to t ≤ f(x)g(x)

x ∈ X .

If now we fix the variable t to some value (so it is not a variable anymore), then we canrewrite it as a convex problem:

maximizex

0subject to tg(x) ≤ f(x)

x ∈ X .

At this point, one can easily solve this convex problem optimally with a solver and thensolve for t via the bisection algorithm (aka sandwich technique). It converges to theglobal optimal solution.

D. Palomar (HKUST) Portfolio Optimization 52 / 74

Page 53: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Solving FP via bisectionRecall the quasi-convex problem we want to solve:

maximizex,t

tsubject to tg(x) ≤ f(x)

x ∈ X .

Algorithm 1: Bisection method (aka sandwich technique)Given upper- and lower-bounds on t: tub and tlb.

1. compute mid-point: t =(tub + tlb

)/2

2. solve the following feasibility problem:find xsubject to tg(x) ≤ f(x)

x ∈ X .

3. if feasible, then set tlb = t; otherwise set tub = t4. if tub − tlb > ϵ go to step 1; otherwise finish.

D. Palomar (HKUST) Portfolio Optimization 53 / 74

Page 54: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Solving FP via Dinkelbach tranformThe Dinkelbach transform was proposed in (Dinkelbach 1967)11.It reformulates the original concave-convex FP problem

maximizex

f(x)g(x)

subject to x ∈ X .

as the convex problemmaximize

xf(x)− yg(x)

subject to x ∈ Xwith a new auxiliary variable y, which is iteratively updated by

y(k) = f(x(k))g(x(k))

where k is the iteration index.11W. Dinkelbach, “On nonlinear fractional programming,” Manage. Sci., vol. 133, no. 7, pp. 492–498, 1967.

D. Palomar (HKUST) Portfolio Optimization 54 / 74

Page 55: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Solving FP via Dinkelbach transformAlgorithm 2: Dinkelbach methodSet k = 0 and initialize x(0)

repeatSet y(k) = f(x(k))

g(x(k))

Obtain next point x(k+1) by solvingmaximize

xf(x)− y(k)g(x)

subject to x ∈ X

k← k + 1until convergencereturn x(k)

Dinkelbach method can be shown to converge to the global optimum of the originalconcave-convex FP by carefully analyzing the increasingness of y(k) and the funtionF(y) = arg maxx f(x)− yg(x).

D. Palomar (HKUST) Portfolio Optimization 55 / 74

Page 56: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Solving Linear FP via Charnes-Cooper transform

The Charnes-Cooper transform was proposed in (Charnes and Cooper 1962)12 to solvethe linear FP (LFP) case (Bajalinov 2003)13:

maximizex

cTx + α

dTx + βsubject to Ax ≤ b

over the set {x | dTx + β > 0}.The Charnes-Cooper transform introduces two new variables

y = 1dTx + β

x, t = 1dTx + β

.

12A. Charnes and W. W. Cooper, “Programming with linear fractional functionals,” Naval Research LogisticsQuarterly, vol. 9, no. 3-4, pp. 181–186, 1962.

13E. B. Bajalinov, Linear-Fractional Programming: Theory, Methods, Applications and Software. KluwerAcademic Publishers, 2003.

D. Palomar (HKUST) Portfolio Optimization 56 / 74

Page 57: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Solving Linear FP via Charnes-Cooper transform

The LFP becomes then a linear program (LP):

maximizey,t

cTy + αtsubject to Ay ≤ bt

dTy + βt = 1t ≥ 0

The solution for y and t yields the solution of the original problem as

x = 1t y.

Note that the number of constraints in the LP formulation has increased.

D. Palomar (HKUST) Portfolio Optimization 57 / 74

Page 58: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Solving Linear FP via Charnes-Cooper transformProof:

Any feasible point x in the original LFP leads to a feasible point (y, t) in the LP (via theequations in the Charnes-Cooper transform) with the same objective value. The objectiveis

cTx + α

dTx + β= cTy/t + α

dTy/t + β= cTy + αt

dTy + βtand since it is scale invariant, we can choose to set the denominator equal to 1.Conversely, any feasible point (y, t) in the LP leads to a feasible point x in the originalLFP (via x = 1

t y). From the denominator constraint

dTy + βt = 1⇐⇒ dTy/t + β = 1/t⇐⇒ 1/(dTx + β) = t

which leads to the objective

cTy + αt = t(cTy/t + α) = t(cTx + α) = (cTx + α)/(dTx + β).D. Palomar (HKUST) Portfolio Optimization 58 / 74

Page 59: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Interlude: Solving FP via Schaible transformThe Schaible transform is a generalization of the Charnes-Cooper transform proposed in(Schaible 1974)14 to solve the concave-convex FP:

maximizex

f(x)g(x)

subject to x ∈ X .

The Schaible transform introduces two new variables (note that x = y/t):y = x

g(x) , t = 1g(x) .

The original concave-convex FP is equivalent to the convex problem:maximize

y,ttf

( yt)

subject to tg( y

t)≤ 1

t ≥ 0y/t ∈ X .

14S. Schaible, “Parameter-free convex equivalent and dual programs of fractional programming problems,”Zeitschrift fur Operations Research, vol. 18, no. 5, pp. 187–196, 1974.

D. Palomar (HKUST) Portfolio Optimization 59 / 74

Page 60: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Solving the Maximum Sharpe ratio portfolio (MSRP)

Recall the maximization of the Sharpe ratio proposed in (Sharpe 1966)15:

maximizew

wTµ− rf√wTΣw

subject to 1Tw = 1, (w ≥ 0) .

This problem is nonconvex, but upon recognition as a fractional program (FP), we canconsider its resolution via:

bisection method (aka sandwich technique),Dinkelbach transform, andSchaible transform (aka Charnes-Cooper transform for the linear FP case).

15W. F. Sharpe, “Mutual fund performance,” The Journal of Business, vol. 39, no. 1, pp. 119–138, 1966.D. Palomar (HKUST) Portfolio Optimization 60 / 74

Page 61: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Maximum Sharpe ratio portfolio via bisectionThe idea is to realize that the problem, while not convex, is quasi-convex.This can be easily seen by rewritting the problem in epigraph form:

maximizew,t

t

subject to t ≤ wTµ− rf√wTΣw

1Tw = 1, (w ≥ 0) .

If now we fix the variable t to some value (so it is not a variable anymore), the problem iseasily recognized as a (convex) second order cone program (SOCP):

find wsubject to t

∥∥∥Σ1/2w∥∥∥

2≤ wTµ− rf

1Tw = 1, (w ≥ 0) .

At this point, one can easily solve the convex problem with an SOCP solver and thensolve for t via yhe bisection algorithm (aka sandwich technique).

D. Palomar (HKUST) Portfolio Optimization 61 / 74

Page 62: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Maximum Sharpe ratio portfolio via DinkelbachThe Dinkelbach transform proposed in (Dinkelbach 1967)16 reformulates the originalconcave-convex FP problem

maximizew

wTµ− rf√wTΣw

subject to 1Tw = 1, (w ≥ 0)

as the convex problemmaximize

wwTµ− y

√wTΣw

subject to 1Tw = 1, (w ≥ 0)

with a new auxiliary variable y, which is iteratively updated by

y(k) = w(k)Tµ− rf√w(k)TΣw(k)

where k is the iteration index.16W. Dinkelbach, “On nonlinear fractional programming,” Manage. Sci., vol. 133, no. 7, pp. 492–498, 1967.

D. Palomar (HKUST) Portfolio Optimization 62 / 74

Page 63: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Maximum Sharpe ratio portfolio via Dinkelbach

By noting that√

wTΣw =∥∥∥Σ1/2w

∥∥∥2, where Σ1/2 satisfies ΣT/2Σ1/2 = Σ, we can finally

rewrite the problem as a SOCP.The iterative Dinkelbach-based method obtains w(k+1) by solving the following problemat the kth iteration:

maximizew,t

wTµ− y(k)t

subject to t ≥∥∥∥Σ1/2w

∥∥∥2

1Tw = 1, (w ≥ 0)

wherey(k) = w(k)Tµ− rf√

w(k)TΣw(k).

D. Palomar (HKUST) Portfolio Optimization 63 / 74

Page 64: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Maximum Sharpe ratio portfolio via SchaibleThe Schaible transform is a generalization of the Charnes-Cooper transform proposed in(Schaible 1974)17 to solve a concave-convex FP:

maximizew

wTµ− rf√wTΣw

subject to 1Tw = 1, (w ≥ 0) .

The Schaible transform introduces two new variables (note that w = w/t):w = w√

wTΣw, t = 1√

wTΣw.

The original maximum Sharpe ratio portfolio is equivalent to the convex quadraticproblem (QP): maximize

w,twTµ− rft

subject to wTΣw ≤ 1t ≥ 01Tw = t, (w ≥ 0) .

17S. Schaible, “Parameter-free convex equivalent and dual programs of fractional programming problems,”Zeitschrift fur Operations Research, vol. 18, no. 5, pp. 187–196, 1974.

D. Palomar (HKUST) Portfolio Optimization 64 / 74

Page 65: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Maximum Sharpe ratio portfolio via Schaible

The previous problem can be simplified by eliminating the variable t = 1Tw:

maximizew

wT (µ− rf1)subject to wTΣw ≤ 1

1Tw ≥ 0, (w ≥ 0)

from which we can recover the original solution as w = w/t = w/(1Tw

).

Interestingly, we can get the following slightly different formulation by starting with aminimization of a ratio:

minimizew

wTΣwsubject to wT(µ− rf1) = 1

1Tw ≥ 0, (w ≥ 0) .

D. Palomar (HKUST) Portfolio Optimization 65 / 74

Page 66: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Proof of convex reformulation of MSRPStart with the original problem formulation:

maximizew

wTµ−rf√wTΣw

subject to 1Tw = 1(w ≥ 0)

⇐⇒minimize

w

√wTΣw

wT(µ−rf1)subject to 1Tw = 1

(w ≥ 0)Now, since the objective is scale invariant w.r.t. w, we can choose the proper scalingfactor for our convenience. We define w = tw with the scaling factort = 1/

(wTµ− rf

)> 0, so that the objective becomes wTΣw, the sum constraint

1Tw = t, and the problem isminimize

w,w,t

√wTΣw

subject to t = 1/wT(µ− rf1) > 0w = tw1Tw = t > 0(w ≥ 0) .

D. Palomar (HKUST) Portfolio Optimization 66 / 74

Page 67: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Proof of convex reformulation of MSRP

The constraint t = 1/wT(µ− rf1) can be rewritten in terms of w as 1 = wT(µ− rf1). Sothe problem becomes

minimizew,w,t

wTΣwsubject to wT(µ− rf1) = 1

w = tw1Tw = t > 0(w ≥ 0) .

Now, note that the strict inequality t > 0 is equivalent to t ≥ 0 because t = 0 can neverhappen as w would would be zero and the first constraint would not be satisfied.

D. Palomar (HKUST) Portfolio Optimization 67 / 74

Page 68: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Proof of convex reformulation of MSRP

Finally, we can now get rid of w and t in the formulation as they can be directly obtainedas t = 1Tw and w = w/t:

minimizew

wTΣwsubject to wT(µ− rf1) = 1

1Tw ≥ 0(w ≥ 0) .

QED!Recall that the portfolio is then obtained with the correct scaling factor as w = w/(1Tw).

D. Palomar (HKUST) Portfolio Optimization 68 / 74

Page 69: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Sharpe ratio portfolio in the efficient frontier

D. Palomar (HKUST) Portfolio Optimization 69 / 74

Page 70: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Basic references

Textbook on financial data (Ruppert and Matteson 2015):D. Ruppert and D. Matteson. Statistics and Data Analysis for Financial Engineering:

With R Examples. Springer, 2015.

Textbooks on portfolio optimization (Cornuejols and Tütüncü 2006; Fabozzi 2007; Fengand Palomar 2016):

G. Cornuejols and R. Tutuncu. Optimization Methods in Finance. CambridgeUniversity Press, 2006.

F. J. Fabozzi. Robust Portfolio Optimization and Management. Wiley, 2007.Y. Feng and D. P. Palomar. A Signal Processing Perspective on Financial Engi-

neering. Foundations and Trends in Signal Processing, Now Publishers, 2016.

D. Palomar (HKUST) Portfolio Optimization 70 / 74

Page 71: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

Thanks

For more information visit:

https://www.danielppalomar.com

Page 72: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

References I

Bajalinov, E. B. (2003). Linear-fractional programming: Theory, methods, applications andsoftware. Kluwer Academic Publishers.Charnes, A., & Cooper, W. W. (1962). Programming with linear fractional functionals. NavalResearch Logistics Quarterly, 9(3-4), 181–186.Chopra, V., & Ziemba, W. (1993). The effect of errors in means, variances and covariances onoptimal portfolio choice. Journal of Portfolio Management.Cornuejols, G., & Tütüncü, R. (2006). Optimization methods in finance. Cambridge UniversityPress.DeMiguel, V., Garlappi, L., & Uppal, R. (2009). Optimal versus naive diversification: Howinefficient is the 1/n portfolio strategy? The Review of Financial Studies.Dinkelbach, W. (1967). On nonlinear fractional programming. Manage. Sci., 133(7), 492–498.

D. Palomar (HKUST) Portfolio Optimization 72 / 74

Page 73: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

References II

Duchin, R., & Levy, H. (2009). Markowitz versus the talmudic portfolio diversificationstrategies. Journal of Portfolio Management, 35(2), 71.Fabozzi, F. J. (2007). Robust portfolio optimization and management. Wiley.Feng, Y., & Palomar, D. P. (2016). A Signal Processing Perspective on Financial Engineering.Foundations; Trends in Signal Processing, Now Publishers.Jolliffe, I. (2002). Principal component analysis. Springer-Verlag.Lütkepohl, H. (2007). New introduction to multiple time series analysis. Springer.Markowitz, H. (1952). Portfolio selection. J. Financ., 7(1), 77–91.Ruppert, D. (2010). Statistics and data analysis for financial engineering. Springer.Ruppert, D., & Matteson, D. (2015). Statistics and data analysis for financial engineering(2nd Ed.). Springer.

D. Palomar (HKUST) Portfolio Optimization 73 / 74

Page 74: Prof. Daniel P. Palomar · 3 Portfolio Basics 4 Heuristic Portfolios 5 Markowitz’s Modern Portfolio Theory (MPT) Mean-variance portfolio (MVP) Global minimum variance portfolio

References III

Schaible, S. (1974). Parameter-free convex equivalent and dual programs of fractionalprogramming problems. Zeitschrift fur Operations Research, 18(5), 187–196.Sharpe, W. F. (1966). Mutual fund performance. The Journal of Business, 39(1), 119–138.Stancu-Minasian, I. M. (1992). Fractional programming: Theory, methods and applications.Kluwer Academic Publishers.Tsay, R. S. (2005). Analysis of financial time series (3rd ed.). John Wiley & Sons.Tsay, R. S. (2013). Multivariate time series analysis: With r and financial applications. JohnWiley & Sons.von Neumann, J. (1937). Uber ein okonomisches gleichgewichtssystem und eineverallgemeinerung des brouwerschen fixpunktsatzes. Ergebnisse eines MathematischenKolloquiums, 8, 73–83.

D. Palomar (HKUST) Portfolio Optimization 74 / 74