financial engineering: portfolio optimizationpalomar/elec5470_lectures/18/slides_portfolio.pdf ·...

Post on 06-Mar-2018

227 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Financial Engineering: PortfolioOptimization

Daniel P. Palomar

Hong Kong University of Science and Technology (HKUST)

ELEC5470 - Convex Optimization

Fall 2017-18, HKUST, Hong Kong

Outline of Lecture

• Data model

• Return, risk measures, and Sharpe ratio

• Basic mean-variance portfolio formulation

• Max Sharpe ratio portfolio formulation

• CVaR portfolio formulation

• Robust portfolio design

• Index replication with `1-norm minimization

Daniel P. Palomar 1

Data Model

• Consider M financial assets, e.g., stocks of a major index such as

S&P 500 and Hang Seng Index.

• Denote the absolute prices at time t by pm,t, m = 1, . . . ,M .

• The simple (linear) and continuously-compounded (logarithmic) re-

turns arerm,t = (pm,t − pm,t−1) /pm,t−1ym,t = log (pm,t)− log (pm,t−1) .

• Observe that, for small values of the return, we have ym,t ≈ rm,t.

• We will mainly use linear returns, stacked as rt ∈ RM , and assume

that they are i.i.d. random variables with mean µ ∈ RM and

covariance matrix Σ ∈ RM×M .

Daniel P. Palomar 2

Return

• Suppose we invest 1$ in the mth asset at time t− 1, then at time t

we will have an amount of 1$× (pm,t/pm,t−1).

• The relative benefit or return will be (pm,t/pm,t−1 − 1) which is

precisely equal to rm,t.

• If now we invest 1$ distributed over the M assets according to the

portfolio weights w (with 1Tw = 1), then the overall return will be

wTrt.

• The key quantity is then the random return wTrt.

• The expected or mean return is wTµ and the variance is wTΣw.

Daniel P. Palomar 3

Risk Control

• In finance, the mean return is very relevant as it quantifies the

average benefit.

• However, in practice, the average performance is not good enough

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: a higher

variance means that there are large peaks in the distribution which

may cause a big loss.

• There are more sophisticated risk measures such as Value-at-Risk

(VaR) and Conditional VaR (CVaR).

Daniel P. Palomar 4

Mean-Variance Tradeoff

• The mean return wTµ and the variance (risk) 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. This is a

multi-objective optimization 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 or risk-averse the investor is.

Daniel P. Palomar 5

Daniel P. Palomar 6

Sharpe Ratio

• The Sharpe ratio is akin to the SINR in communication systems.

• It is defined as the ratio of the mean return (excess w.r.t. the return

of the risk-free asset rf) to the risk measured as the square root of

the variance (standard deviation):

S =wTµ− rf√

wTΣw.

• The Sharpe ratio can be understood as the expected return per unit

of risk.

• The portfolio w that maximizes the Sharpe ratio lies on the Pareto

curve.

Daniel P. Palomar 7

Mean-Variance Optimization (Markowitz, 1956)

• There are two obvious formulations for the portfolio optimization.

• Maximization of mean return:

maximizew

wTµ

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

• Minimization of risk:

minimizew

wTΣw

subject to wTµ ≥ β1Tw = 1.

Daniel P. Palomar 8

• Another obvious formulation is the scalarization of the multi-

objective optimization problem:

maximizew

wTµ− γwTΣw

subject to 1Tw = 1.

• These three formulations give different points on the Pareto optimal

curve.

• They all require knowledge of one parameter (α, β, and γ).

• If we consider the Sharpe ratio as a good measure of performance,

we could consider instead maximizing it directly.

• Additional constraints can be included such as w ≥ 0 to allow for

long-only transactions (no short-selling).

Daniel P. Palomar 9

Max Sharpe Ratio Portfolio Formulation

• Let’s start by formulating the maximization of the Sharpe ratio as

follows:minimize

w

√wTΣw/

(wTµ− rf

)subject to 1Tw = 1

w ≥ 0

• This is a quasi-convex problem as can be seen in the epigraph form:

minimizew,t

t

subject to t(wTµ− rf

)≥∥∥Σ1/2w

∥∥1Tw = 1

w ≥ 0

which can be solve by bisection over t.

Daniel P. Palomar 10

Sharpe Ratio Formulation in Convex Form

• Theorem: The maximization of the Sharpe ratio can be rewritten

in convex form as the QP

minimizew̃

w̃TΣw̃

subject to (µ− rf1)T

w̃ = 1

1T w̃ ≥ 0

w̃ ≥ 0.

Proof:

• Defining w̃ = tw with t = 1/(wTµ− rf

)> 0, the objective

becomes√

w̃TΣw̃, the sum constraint becomes 1T w̃ = t, and the

problem becomes

Daniel P. Palomar 11

minimizew,w̃,t

√w̃TΣw̃

subject to t = 1/(wTµ− rf

)> 0

w̃ = tw

1T w̃ = t > 0

w̃ ≥ 0.

• Observe that the first constraint 1/t = wTµ− rf can be rewritten

in terms of w̃ as 1 = (µ− rf1)T

w̃. So the problem becomes

minimizew,w̃,t

√w̃TΣw̃

subject to (µ− rf1)T

w̃ = 1

w̃ = tw

1T w̃ = t > 0

w̃ ≥ 0.

Daniel P. Palomar 12

• Note that the strict inequality t > 0 is equivalent to t ≥ 0 because

t = 0 can never happen as w̃ would be zero and the first constraint

would not be satisfied.

• We can now get rid of w and t in the formulation as they can be

directly obtained as w = w̃/t and t = 1T w̃:

minimizew̃

w̃TΣw̃

subject to (µ− rf1)T

w̃ = 1

1T w̃ ≥ 0

w̃ ≥ 0.

• QED!

Daniel P. Palomar 13

Value-at-Risk (VaR & CVaR) Models

• Mean-variance model penalizes up-side and down-side risk equally,

whereas most investors don’t mind up-side risk.

• Solution: use alternative risk measures (not variance).

• VaR denotes the maximum loss with a specified confidence level

(e.g., confidence level = 95%, period = 1 day).

• Let ξ be a random variable representing the loss from a portfolio

over some period of time:

VaRα = min {ξ0 : Pr (ξ ≤ ξ0) ≥ α} .

• Undesirable properties of VaR: does not take into account risks

exceeding VaR, is nonconvex, is not sub-additive.

Daniel P. Palomar 14

• The Conditional VaR (CVaR) takes into account the shape of the

losses exceeding the VaR through the average:

CVaRα = E [ξ | ξ ≥ VaRα] .

Daniel P. Palomar 15

CVaR Portfolio Formulation

• Dealing directly with VaR and CVaR quantities is not tractable.

• Let f (w, r) be an arbitrary cost function, where w is the optimiza-

tion variable (portfolio) and r denotes the random parameters (asset

returns). Example: f (w, r) = −wTr.

• Consider, for example, the maximization of the mean return subject

to a CVaR risk constraint on the loss:

maximizew

wTµ

subject to CVaRα (f (w, r)) ≤ c1Tw = 1

where

CVaRα (f (w, r)) = E [f (w, r) | f (w, r) ≥ VaRα (f (w, r))] .

Daniel P. Palomar 16

CVaR in Convex Form

• Theorem: Define the auxiliary function

Fα (w, ζ) = ζ +1

1− α

∫[f (w, r)− ζ]

+p (r) dr.

Then, we have the following two results:

(a) VaRα is a minimizer of Fα (w, ζ) with respect to ζ:

VaRα (f (w, r)) = arg minζFα (w, ζ)

(b) CVaRα equals minimal value (w.r.t. ζ) of Fα (w, ζ):

CVaRα (f (w, r)) = minζFα (w, ζ)

Daniel P. Palomar 17

Proof CVaR in Convex Form

(a) The minimizer ζ? of Fα (w, ζ) satisfies: 0 ∈ ∂ζFα (w, ζ?). For

example we choose the following subgradient:

sζFα (w, ζ?) = 1− 1

1− α

∫I (f (w, r) ≥ ζ?) p (r) dr

= 1− 1

1− αPr (f (w, r) ≥ ζ?) = 0

where I (·) is the indicator function. Consequently,

Pr (f (w, r) ≥ ζ?) = 1− α =⇒ ζ? = VaRα (f (w, r)) .

Daniel P. Palomar 18

Proof CVaR in Convex Form (cont’d)

(b)

minζFα (w, ζ) = Fα (w, ζ?) = ζ?+

1

1− α

∫[f (w, r)− ζ?]+ p (r) dr.

Recall that

CVaRα (f (w, r)) = E [f (w, r) | f (w, r) ≥ VaRα (f (w, r))]

=1

1− α

∫r:f(w,r)≥VaRα

f (w, r) p (r) dr

=1

1− α

∫[f (w, r)− VaRα]

+p (r) dr + VaRα

Daniel P. Palomar 19

CVaR in Convex Form (cont’d)

• Corollary:

minw

CVaRα (f (w, r)) = minw,ζ

Fα (w, ζ)

• In words, minimizing Fα (w, ζ) simultaneously calculates the optimal

CVaR and VaR.

• Corollary: If f (w, r) is convex in w for each r, then Fα (w, ζ) is

convex!

Proof:

Fα (w, ζ) = ζ +1

1− α

∫[f (w, r)− ζ]

+p (r) dr.

Daniel P. Palomar 20

Reduction of CVaR Optimization to LP

• We start by considering discrete distributions or approximating the

continuous one by a discrete one so that:

Fα (w, ζ) = ζ +1

1− α

N∑k=1

pk[f(w, rk

)− ζ]+.

• Then include dummy variables zk:

zk ≥[f(w, rk

)− ζ]+

=⇒ zk ≥ f(w, rk

)− ζ, zk ≥ 0

Daniel P. Palomar 21

• The problem of minimizing the CVaR reduces to the following LP:

minimizew,ζ,z

ζ + 11−α

∑Nk=1 pkzk

subject to f(w, rk

)− ζ ≤ zk ≥ 0

1Tw = 1

where the cost function is assumed linear in w: f (w, r) = −wTr.

• The maximization of the mean return subject to a CVaR constraint

becomes:maximize

w,ζ,zwTµ

subject to ζ + 11−α

∑Nk=1 pkzk ≤ c

f(w, rk

)− ζ ≤ zk ≥ 0

1Tw = 1.

Daniel P. Palomar 22

Robust Porfolio Design

• In practice, as usual, the parameters defining the optimization

problem are not always perfectly known. Hence, the concept of

robust design. We will consider worst-case robust design.

• There are many ways to formulate a worst-case design for the

portfolio design. For example, we could consider a robust mean-

variance formulation:minimize

wmaxΣ∈SΣ

wTΣw

subject to minµ∈Sµ

wTµ ≥ β

1Tw = 1.

• Now, depending how we define the uncertainty sets for the mean

return vector Sµ and for the covariance matrix SΣ, the problem may

be convex or not.

Daniel P. Palomar 23

• We will consider one particular example based on modeling the

returns via a factor model:

r = µ+ VT f + ε

where f denotes the random factors distributed according to f ∼N (0,F) and ε denotes the a random residual error with uncorrelated

elements distributed according to ε ∼ N (0,D) with D = diag (d).

• The returns are then distributed according to r ∼N(µ,VTFV + D

)and the obtained return using portfolio w has

mean µTw and variance wT(VTFV + D

)w.

• We will consider uncertainty in the knowledge of µ, V, and D,

while F is assumed know; in fact, we consider F = I.

Daniel P. Palomar 24

• We can then formulate the robust mean-variance problem as

minimizew

maxV∈SV,D∈SD

wT(VTV + D

)w

subject to minµ∈Sµ

wTµ ≥ β

1Tw = 1.

• We will define the uncertainty as follows:

Sµ = {µ | µ = µ0 + δ, |δi| ≤ γi, i− 1, . . . ,M}SV = {V | V = V0 + ∆, ‖∆‖F ≤ ρ}SD =

{D | D = diag (d) , di ∈

[di, di

], i− 1, . . . ,M

}.

• Let’s now elaborate on each of the inner optimizations...

Daniel P. Palomar 25

• First, consider the worst case mean return:

minµ∈Sµ

µTw = µT0 w + min|δi|≤γi

δTw = µT0 w − γT |w|

which is a concave function.

• Second, let’s turn to the second term of the worst-case variance:

maxD∈SD

wTDw = maxdi∈[di,di]

∑Mi=1 diw

2i =

∑Mi=1 diw

2i = wTDw

• Finally, let’s focus on the first term of the worst-case variance:

maxV∈SV

wTVTVw ≡ max‖∆‖F≤ρ

‖V0w + ∆w‖ = ‖V0w‖+ ρ ‖w‖

Daniel P. Palomar 26

• Proof: From the triangle inequality we have

‖V0w + ∆w‖ ≤ ‖V0w‖+ ‖∆w‖≤ ‖V0w‖+

√wT∆T∆w

≤ ‖V0w‖+ ‖w‖ ‖∆‖F≤ ‖V0w‖+ ‖w‖ ρ

but this upper bound is achievable by the worst-case variable

∆ = uwT

‖w‖ρ

where

u =

{V0w‖V0w‖ if V0w 6= 0

any unitary vector otherwise.

Daniel P. Palomar 27

• Finally, the robust portfolio formulation is

minimizew

(‖V0w‖+ ρ ‖w‖)2 + wTDw

subject to µT0 w − γT |w| ≥ β1Tw = 1.

or, better, as the SOCP

minimizew,t

t2 + wTDw

subject to t ≥ ‖V0w‖+ ρ ‖w‖µT0 w ≥ β + γT |w|1Tw = 1.

Daniel P. Palomar 28

Index Replication

• Index tracking or benchmark replication is an strategy investment

aimed at mimicking the risk/return profile of a financial instrument.

• For practical reasons, the strategy focuses on a reduced basket of

representative securities.

• This problem is also regarded as portfolio compression and it is

intimately related to compressed sensing and `1-norm minimization

techniques.

• One example is the replication of an index, e.g., Hang Seng index,

based on a reduced set of assets.

Daniel P. Palomar 29

Tracking Error

• Let c ∈ RM represent the actual benchmark weight vector and let

w ∈ RM denote the replicating portfolio.

• Investment managers seek to minimize the following tracking errorperformance measure:

TE1 (w) =

√(c−w)

TΣ (c−w).

• In practice, however, the benchmark weight vector c is unknown and

the error measure is defined in terms of market observations.

Daniel P. Palomar 30

Empirical Tracking Error

• Let rc ∈ RN contain N temporal observations of the returns of the

benchmark or index and let matrix R =[

r1 · · · rN]∈ RM×N

contain column-wise the returns of the individual assets over time.

• The empirical tracking error can be defined as

TE2 (w) =∥∥rc −RTw

∥∥2.

• We can then formulate the sparse index replication problem as

minimizew

TE2 (w) + γcard (w)

subject to w ≥ 0

1Tw = 1.

Daniel P. Palomar 31

Index Replication with `1-Norm Minimization

• The cardinality operator is nonconvex and can be approximated in

a number of ways.

• The simplest approximation is based on the `1-norm:

minimizew

∥∥rc −RTw∥∥2

+ γ ‖w‖1subject to w ≥ 0

1Tw = 1.

• Of course, there are more sophisticated methods such as the

reweighted `1-norm approximation based on a successive convex

approximation (see lecture on `1-norm minimization for details).

Daniel P. Palomar 32

Simulations of Sparse Index Replication

Daniel P. Palomar 33

Summary

• We have introduced basic concepts and data model for portfolio

optimization.

• Then, we have considered different formulations for the portfolio

optimization problem:

– basic mean-variance formulations

– Sharpe ratio maximization in convex form

– CVaR optimization in convex form

– worst-case robust designs in convex form

• Finally, we have studied related problem such as the index replication

based on the `1-norm.

Daniel P. Palomar 34

References

• Yiyong Feng and Daniel P. Palomar, A Signal Processing Perspec-

tive on Financial Engineering, Foundations and Trends® in Signal

Processing, Now Publishers, vol. 9, no. 1-2, 2016.

• D. Luenberger, Investment Science, Oxford Univ. Press, 1997.

• D. Ruppert, Statistics and Data Analysis for Financial Engineer-

ing, Springer Texts in Statistics, 2010.

• G. Cornuejols and R. Tutuncu, Optimization Methods in Finance,

Cambridge Univ. Press, 2007.

• F. Fabozzi, P. Kolm, D. Pachamanova, S. Focardi, Robust Portfolio

Optimization and Management, Wiley Finance, 2007.

Daniel P. Palomar 35

top related