CSCI 1951-G Optimization Methods in Finance Part 07 ...Maximizing the Sharpe ratio To find the...
Transcript of CSCI 1951-G Optimization Methods in Finance Part 07 ...Maximizing the Sharpe ratio To find the...
CSCI 1951-G – Optimization Methods in FinancePart 07:
Portfolio Optimization
March 9–16, 2018
1 / 19
The portfolio optimization problem
How to best allocate our money to n risky assets S1, . . . , Sn withrandom returns?• µi: expected return of asset i in a time interval;
Stocks Bonds Money Marketµi 0.1073 0.0737 0.0627
• Σ: variance-covariance n× n matrix of returns, with:• σii: variance of the return of asset i;• σij : covariance of the returns of assets i and j.
Covariance Stocks Bonds MMStocks 0.02778 0.00387 0.00021Bonds 0.00387 0.01112 -0.00020MM 0.00021 -0.00020 0.00115
2 / 19
The portfolio optimization problem
Portfolio x = (x1, . . . , xn), wherexi: proportion of money invested in asset i.
Expected return: E[x] = µ1x1 + · · ·+ µnxn = µTx
Variance: Var[x] =∑
i,j σijxixj = xTΣxVar[x] ≥ 0, so Σ . . . is positive semidefinite
(we assume positive definite)
Feasible portfolios: set X = {x : Ax = b, Cx ≥ d}One constraint is
n∑i=1
xi = 1
3 / 19
The portfolio optimization problem
E�icient portfolio w.r.t. R > 0: the portfolio with minimum varianceamong all those with expected return at least R.
(variants possible, e.g., )
Markowitz’ mean-variance optimization: find the e�icient portfolio:
min xTΣx
s.t. µTx ≥ RAx = b
Cx ≥ d
This optimization problem is . . . convex.We assumed Σ ≥ 0, so the optimal solution is . . . unique.
4 / 19
The portfolio optimization problem
Stocks Bonds MMµi 0.1073 0.0737 0.0627
Covariance Stocks Bonds MMStocks 0.02778 0.00387 0.00021Bonds 0.00387 0.01112 -0.00020MM 0.00021 -0.00020 0.00115
min 0.02778x2S + 2 · 0.00387xSxB + 2 · 0.00021xSxM
+ 0.01112x2B − 2 · 0.00020xBxM + 0.00115x2M
s.t. 0.1073xS + 0.0737xB + 0.0627xM ≥ RxS + xB + xM = 1
xS ≥ 0, xB ≥ 0, xM ≥ 0
5 / 19
The portfolio optimization problem8.1. MEAN-VARIANCE OPTIMIZATION 147
Rate of Return R Variance Stocks Bonds MM0.065 0.0010 0.03 0.10 0.870.070 0.0014 0.13 0.12 0.750.075 0.0026 0.24 0.14 0.620.080 0.0044 0.35 0.16 0.490.085 0.0070 0.45 0.18 0.370.090 0.0102 0.56 0.20 0.240.095 0.0142 0.67 0.22 0.110.100 0.0189 0.78 0.22 00.105 0.0246 0.93 0.07 0
Table 8.1: Efficient Portfolios
2 4 6 8 10 12 14 166.5
7
7.5
8
8.5
9
9.5
10
10.5
Standard Deviation (%)
Expe
cted
Ret
urn
(%)
6.5 7 7.5 8 8.5 9 9.5 10 10.50
10
20
30
40
50
60
70
80
90
100
Expected return of efficient portfolios (%)
Perc
ent i
nves
ted
in d
iffer
ent a
sset
cla
sses
StocksBondsMM
Figure 8.1: Efficient Frontier and the Composition of Efficient Portfolios
Exercise 8.3 Solve Markowitz’s MVO model for constructing a portfolioof US stocks, bonds and cash using arithmetic means, instead of geometricmeans as above. Vary R from 6.5 % to 12 % with increments of 0.5 % .Compare with the results obtained above.
Exercise 8.4 In addition to the three securities given earlier (S&P 500Index, 10-year Treasury Bond Index and Money Market), consider a 4thsecurity (the NASDAQ Composite Index) with following “Total Return”:
8.1. MEAN-VARIANCE OPTIMIZATION 147
Rate of Return R Variance Stocks Bonds MM0.065 0.0010 0.03 0.10 0.870.070 0.0014 0.13 0.12 0.750.075 0.0026 0.24 0.14 0.620.080 0.0044 0.35 0.16 0.490.085 0.0070 0.45 0.18 0.370.090 0.0102 0.56 0.20 0.240.095 0.0142 0.67 0.22 0.110.100 0.0189 0.78 0.22 00.105 0.0246 0.93 0.07 0
Table 8.1: Efficient Portfolios
2 4 6 8 10 12 14 166.5
7
7.5
8
8.5
9
9.5
10
10.5
Standard Deviation (%)
Expe
cted
Ret
urn
(%)
6.5 7 7.5 8 8.5 9 9.5 10 10.50
10
20
30
40
50
60
70
80
90
100
Expected return of efficient portfolios (%)
Perc
ent i
nves
ted
in d
iffer
ent a
sset
cla
sses
StocksBondsMM
Figure 8.1: Efficient Frontier and the Composition of Efficient Portfolios
Exercise 8.3 Solve Markowitz’s MVO model for constructing a portfolioof US stocks, bonds and cash using arithmetic means, instead of geometricmeans as above. Vary R from 6.5 % to 12 % with increments of 0.5 % .Compare with the results obtained above.
Exercise 8.4 In addition to the three securities given earlier (S&P 500Index, 10-year Treasury Bond Index and Money Market), consider a 4thsecurity (the NASDAQ Composite Index) with following “Total Return”:
6 / 19
The e�icient frontier
Rmin, Rmax: minimum and maximum expected returns for e�icientportfolios.
σ(R) : [Rmin, Rmax]→ R, σ(R) =(xTRΣxR
)1/2where xR is the e�icient portfolio w.r.t. R ∈ [Rmin, Rmax].
The e�icient frontier is the graph
E = {(R, σ(R)) : R ∈ [Rmin, Rmax]}
7 / 19
Maximizing the Sharpe ratioConsider a riskless asset with deterministic return rf ≤ Rmin
(why does it make sense?)Consider convex combinations between a risky portfolio x with theriskless asset
xθ = [(1− θ)x θ]T
As θ varies, (for fixed x) the combinations form a line on thestdev/mean plot:
158 CHAPTER 8. QP MODELS: PORTFOLIO OPTIMIZATION
8.2 Maximizing the Sharpe Ratio
Consider the setting in Section 8.1. Recall that we denote with Rmin andRmax the minimum and maximum expected returns for efficient portfolios.Let us define the function
σ(R) : [Rmin, Rmax] → IR, σ(R) := (xTRΣxR)1/2,
where xR denotes the unique solution of problem (8.1). Since we assumedthat Σ is positive definite, it is easy to show that the function σ(R) is strictlyconvex in its domain. The efficient frontier is the graph
E = {(R, σ(R)) : R ∈ [Rmin, Rmax]}.
We now consider a riskless asset whose return is rf ≥ 0 with probability1. We will assume that rf < Rmin, which is natural since the portfolio xmin
has a positive risk associated with it while the riskless asset does not.Return/risk profiles of different combinations of a risky portfolio with
the riskless asset can be represented as a straight line—a capital allocationline (CAL)—on the standard deviation vs. mean graph; see Figure 8.4. Theoptimal CAL is the CAL that lies below all the other CALs for R > rf sincethe corresponding portfolios will have the lowest standard deviation for anygiven value of R > rf . Then, it follows that this optimal CAL goes througha point on the efficient frontier and never goes above a point on the efficientfrontier. In other words, the slope of the optimal CAL is a sub-derivativeof the function σ(R) that defines the efficient frontier. The point where theoptimal CAL touches the efficient frontier corresponds to the optimal riskyportfolio.
Mean
Variance
CAL
rf
Figure 8.4: Capital Allocation Line
Alternatively, one can think of the optimal CAL as the CAL with thesmallest slope. Mathematically, this can be expressed as the portfolio x thatmaximizes the quantity
h(x) =µT x − rf
(xT Σx)1/2,
For di�erent choices of x, the slope of the line changes. 8 / 19
Maximizing the Sharpe ratio
Which Capital Allocation Line (CAL) is the best?
158 CHAPTER 8. QP MODELS: PORTFOLIO OPTIMIZATION
8.2 Maximizing the Sharpe Ratio
Consider the setting in Section 8.1. Recall that we denote with Rmin andRmax the minimum and maximum expected returns for efficient portfolios.Let us define the function
σ(R) : [Rmin, Rmax] → IR, σ(R) := (xTRΣxR)1/2,
where xR denotes the unique solution of problem (8.1). Since we assumedthat Σ is positive definite, it is easy to show that the function σ(R) is strictlyconvex in its domain. The efficient frontier is the graph
E = {(R, σ(R)) : R ∈ [Rmin, Rmax]}.
We now consider a riskless asset whose return is rf ≥ 0 with probability1. We will assume that rf < Rmin, which is natural since the portfolio xmin
has a positive risk associated with it while the riskless asset does not.Return/risk profiles of different combinations of a risky portfolio with
the riskless asset can be represented as a straight line—a capital allocationline (CAL)—on the standard deviation vs. mean graph; see Figure 8.4. Theoptimal CAL is the CAL that lies below all the other CALs for R > rf sincethe corresponding portfolios will have the lowest standard deviation for anygiven value of R > rf . Then, it follows that this optimal CAL goes througha point on the efficient frontier and never goes above a point on the efficientfrontier. In other words, the slope of the optimal CAL is a sub-derivativeof the function σ(R) that defines the efficient frontier. The point where theoptimal CAL touches the efficient frontier corresponds to the optimal riskyportfolio.
Mean
Variance
CAL
rf
Figure 8.4: Capital Allocation Line
Alternatively, one can think of the optimal CAL as the CAL with thesmallest slope. Mathematically, this can be expressed as the portfolio x thatmaximizes the quantity
h(x) =µT x − rf
(xT Σx)1/2,
The CAL with the largest slope: the corresponding portfolio willhave the lowest stdev for any given value of R ≥ rf .
9 / 19
Maximizing the Sharpe ratio
To which portfolio x does the optimal CAL corresponds to?The feasible x that maximizes the slope:
h(x) =µTx− rf(xTΣx)1/2
The quantity h(x) is known as the Sharpe ratio or thereward-to-volatility ratio.
10 / 19
Maximizing the Sharpe ratio
To find the optimal risky portfolio we solve
maxµTx− rf(xTΣx)1/2
s.t. Ax = b
Cx ≥ d
The feasible region is polyhedral, but the objective function may benon-concave.
Let’s build an equivalent convex quadratic program.
11 / 19
Maximizing the Sharpe ratio
X = {x : Ax = b, Cx ≥ d}(includes full alloc. const., assumes ∃x̂ ∈ X s.t. µTx̂ > rf )
X+ = {(x, k) : x ∈ Rn, k ∈ R++,xk ∈ X} ∪ {(0, 0}
The optimal risky portfolio is x∗ = y∗/k∗ where (y∗, k∗) is theoptimal solution of:
min yTΣy
s.t. (y, k) ∈ X+
(µ− rf~1)Ty = 1
This is a quadratic convex program (why?)
12 / 19
Returns-based style analysis
• You are a portfolio manager (!) and would like to understand howyour portfolio manager“friend” Sally, the style of her portfolio i.e.,the mix of stocks in it;
• Sally is secretive on the mix, but publish the returns of herportfolio over time;
• You also have access to the returns of index funds tracking di�erentsectors of the market;
Definition (Return-Based Style Analysis (RBSA))
A technique using constrained optimization to determine the style ofa portfolio using the return time series of the portfolio and of anumber of other asset classes (factors).
13 / 19
RBSA Mathematical Model
Fundamentally a linear model for regression.
Data
• Rt, t = 1, . . . , T : the return of Sally’s portfolio over T fixed timeintervals (e.g., Rt is the monthly return, and T = 12 months);
• Fit, i = 1, . . . , n, t = 1, . . . , T : the returns of factor i over T fixedtime intervals (same intervals as Rt);
Model
Rt = w1tF1t + w2tF2t + · · ·+ wntFnt + εt = FTt wt + εt
• wit: sensitivity of Rt to factor i;
• εt: non-factor return.
14 / 19
Interpretation
Rt = w1tF1t + w2tF2t + · · ·+ wntFnt + εt = FTt wt + εt
Assume the Fit are returns of passive investments (e.g., indexfunds); Then:• FT
t wt is the return of a benchmark portfolio of passiveinvestments;
• εt is the di�erence between the passive benchmark and the activestrategy followed by Sally.
If the passive investments considered together are representative ofthe market, then εt measures the additional (or negative) return dueto Sally’s ability as a portfolio manager.
15 / 19
Optimization problem
Rt = w1tF1t + w2tF2t + · · ·+ wntFnt + εt = FTt wt + εt
Additional assumptions/constraints:
• wit = wi, i.e., the weights do not change over time.
• wi > 0,∑n
i=1wt = 1.
Constraints of our optimization problem:
min ???
s.t.n∑i=1
wi = 1
wi ≥ 0, i = 1, . . . , n
What about the objective function? Any idea?16 / 19
Optimization problem (cont.)
• If εt measures Sally’s ability as a portfolio manager, we canassume that it is approximately constant over time.
• I.e., we want the plots of the returns of Sally’s portfolios and of thebenchmark portfolios to be curves with approximately constantdistance.
• I.e., we want εt to have the smallest possible variance over time.
Formulation
minw∈Rn
Var(et) = Var(Rt − FTt w)
s.t.n∑i=1
wi = 1
wi ≥ 0, i = 1, . . . , n
The objective function is convex.17 / 19
Objective function
Let
R =
R1...RT
, and F =
FT1...FTT
, and e =
1...1
We have
Var(Rt − FTt w) =
1
T
T∑i=1
(Rt − FTt w)2 −
(∑Tt=1(Rt − FT
t w
T
)2
=1
T‖R− Fw‖2 −
(eT(R− Fw)
T
)2
=‖R‖2 − 2RTFw + wTFTFw
T
− (eTR)2 − 2eTR− wTFTeeTFw
T 2
18 / 19
Objective function
Var(Rt − FTt w) =
‖R‖2 − 2RTFw + wTFTFw
T
− (eTR)2 − 2eTR− wTFTeeTFw
T 2
Reorganizing the terms as function of w:
Var(Rt − FTt w) =
(‖R‖2T− eTR)2
T 2
)− 2
(RTF
T− eTR
T 2eTF
)w
+ wT
(1
TFTF − 1
TFTeeTF
)w
We have1
TFTF − 1
TFTeeTF =
1
TFT
(I − eeT
T
)F
The matrix M = I − eeT/T is symmetric and positive semidefinite(eigenvalues: 0 and 1), and so is FTMF .
Hence the objective function is convex.19 / 19