Professional Documents
Culture Documents
1/124
Fundamentals of Optimization and Application to Portfolio Selection
In this lecture...
I. Introduction to optimization:
I how to formulate an optimization problem;
I elementary rules and tips.
An optimization problem is one in which you are trying to find the “best
possible value” that a function, say f , can take subject to a number of
constraints. This generally involves finding the minimum or maximum of f or
of a function built around f .
Optimization techniques are very often used in finance to solve a wide array of
problems ranging from calculating the value of a bond yield, to solving a
portfolio selection problem in discrete and continuous time and to valuing
derivatives such as American and passport options.
As optimization problems come in all shape and forms, you should expect some
to be incredibly easy to solve and some other to be incredibly hard. In any
case, formulating the problem well will spare you many headaches.
3/124
Fundamentals of Optimization and Application to Portfolio Selection
subject to:
g1 (x1 , . . . , xn ) ≤
b1
.. = ..
. .
≥
gm (x1 , . . . , xn ) bm
4/124
Fundamentals of Optimization and Application to Portfolio Selection
5/124
Fundamentals of Optimization and Application to Portfolio Selection
The following set of rules will help you manipulate your optimization problem
to put it in a more convenient formulation.
I some problems are more easily dealt with as a minimization, some others
as a maximization. To change between the two, remember that
6/124
Fundamentals of Optimization and Application to Portfolio Selection
7/124
Fundamentals of Optimization and Application to Portfolio Selection
min f (x1 , . . . , xn )
x1 ,...,xn
8/124
Fundamentals of Optimization and Application to Portfolio Selection
They are referred to as first order (necessary) condition and second order
(sufficient) condition.
9/124
Fundamentals of Optimization and Application to Portfolio Selection
µ1
..
.
µ = µi
.
..
µn
10/124
Fundamentals of Optimization and Application to Portfolio Selection
σ12 ···
ρ12 σ1 σ2 ρ1n σ1 σn
2
ρ21 σ2 σ1 σ 2 ··· ρ2n σ2 σn
Σ=
..
.
ρn1 σn σ1 ··· ··· σn2
11/124
Fundamentals of Optimization and Application to Portfolio Selection
µπ = µ0 w
σπ2 = w 0 Σw
12/124
Fundamentals of Optimization and Application to Portfolio Selection
If you have the correlation matrix and the standard deviation vector, you can
calculate the covariance matrix in just two steps.
13/124
Fundamentals of Optimization and Application to Portfolio Selection
As its name indicates, the diagonal standard deviation matrix is a matrix with
standard deviations on its diagonal and 0 everywhere else:
···
σ1 0 0
0 σ2 · · · 0
S = D(σ) = .
..
0 · · · · · · σn
14/124
Fundamentals of Optimization and Application to Portfolio Selection
15/124
Fundamentals of Optimization and Application to Portfolio Selection
The covariance matrix Σ can be obtained by pre and post multiplying the
correlation matrix by the diagonal standard deviation matrix:
16/124
Fundamentals of Optimization and Application to Portfolio Selection
Note that we should normally have S 0 RS, but S is a diagonal matrix and
therefore S 0 = S.
This decomposition of the covariance matrix is not only useful for portfolio
selection for risk measurement. It is actually used by RiskMetrics in the
calculation of parametric Value at Risk.
(End of Aside).
17/124
Fundamentals of Optimization and Application to Portfolio Selection
The weight w0 of the risk-free asset is defined as the weight of the portfolio
that remains once the allocation to risky assets is complete.
Mathematically,
w0 = 1 − w 0 1
18/124
Fundamentals of Optimization and Application to Portfolio Selection
µπ = w 0 µ + r (1 − w 0 1) = r + w 0 (µ − r 1)
So the introduction of a risk-free asset split returns between the risk-free rate r
and the vector of risk premia (µ − r 1).
19/124
Fundamentals of Optimization and Application to Portfolio Selection
One of the easiest portfolio optimisation problem also turns out to be the best
model in theory: the mean-variance optimisation criterion.
As a result, we neither need a risk constraint nor a return contraint. Also, the
budget constraint has vanished because the residual of the wealth not invested
in risky assets is now in the risk-free asset.
20/124
Fundamentals of Optimization and Application to Portfolio Selection
where
I R A is the return of asset A;
I r is the risk-free rate;
I β is the degree of exposure to systematic risk;
I R M is the return of the overall financial market.
22/124
Fundamentals of Optimization and Application to Portfolio Selection
23/124
Fundamentals of Optimization and Application to Portfolio Selection
24/124
Fundamentals of Optimization and Application to Portfolio Selection
Now, the first step is to convert the CAPM into a model that we can apply to
historical data. In essence, this brings us back to Sharpe’s linear factor model!
Assuming we know the value for β, that our data are measured perfectly and
are stationary, the ‘true’ model for datapoint i = 1, . . . , n will be:
A M
Ri − r = β Ri − r (7)
Note that
I in theory r is a constant so it should be the same for all the i’s. However,
formulating our estimation in terms of risk premia leaves the door open to
using an actual TBill or bond rate which we know is not constant;
I β is the same for all the i’s.
However,
I we do not know the true value of β and we will need to rely on some
estimate β̂;
I the data may not be entirely reliable (think of stalled quotes for small
stocks).
25/124
Fundamentals of Optimization and Application to Portfolio Selection
To make the model more realistic and account for measurement errors (such as
stalled quotes), we introduce a disturbance term or error term
A M
Ri − r = β Ri − r + i (8)
For mathematical reasons, the error terms i should be IID and satisfy the
following properties:
I The mean of the error term is 0: E [i ] = 0 for all i’s;
The variance of the error term is finite: E i = s 2 for all i’s;
2
I
Note that we do not require the error terms to be normally distributed, but is
often convenient to do so.
26/124
Fundamentals of Optimization and Application to Portfolio Selection
For more generality, we will solve this problem using matrix notation.
I The dependent variable Y is the n-element column vector of observed
asset risk premia (R A − r );
A
Y1 R1 − r
.. ..
. .
A
Y = Y i
= Ri − r
. .
.. ..
Yn RnA − r
27/124
Fundamentals of Optimization and Application to Portfolio Selection
28/124
Fundamentals of Optimization and Application to Portfolio Selection
Observation i
Yi
Xi
X
29/124
Fundamentals of Optimization and Application to Portfolio Selection
Y = Xβ + (9)
30/124
Fundamentals of Optimization and Application to Portfolio Selection
Yi
Ŷi
Value of Yi predicted
by the regression
Xi
X
31/124
Fundamentals of Optimization and Application to Portfolio Selection
= Y − X β̂
= Y
|{z} − Ŷ
|{z} (11)
vector of actual values vector of predicted values
32/124
Fundamentals of Optimization and Application to Portfolio Selection
Ŷi
Xi
X
33/124
Fundamentals of Optimization and Application to Portfolio Selection
The idea behind OLS regression is that our best estimate β̂ of β must minimize
the square error in (11). We can express this idea as an unconstrained
optimization problem:
n
X n
X n
X
min F (β) = 2i = 2
(Yi − Ŷi ) = (Yi − Xi β)2 (12)
β
i=1 i=1 i=1
34/124
Fundamentals of Optimization and Application to Portfolio Selection
F (β) = Y 0 Y − 2β 0 X 0 Y + β 0 X 0 X β
35/124
Fundamentals of Optimization and Application to Portfolio Selection
−2X 0 Y + 2X 0 X β = 0
β̂ = (X 0 X )−1 X 0 Y
Checking the second order condition, we deduce that β̂ is the unique minimizer
as long as X 0 X > 0
36/124
Fundamentals of Optimization and Application to Portfolio Selection
The estimate β̂ is actually a random variable! Except that the more data we
have, the closer it gets to the true value β which is a constant.
The covariance of β̂ is
h 0 i
E β − β̂ β − β̂ (14)
37/124
Fundamentals of Optimization and Application to Portfolio Selection
Developping,
h 0 i
E β − β̂ β − β̂
h 0 i
0 −1 0 0 −1 0
= E β − (X X ) β − (X X ) X Y
X Y
h 0 i
0 −1 0 0 −1 0
= E β − (X X ) X (X β + ) β − (X X ) X (X β + )
h i
0 −1 0 0 0 −1
= E (X X ) X X (X X )
38/124
Fundamentals of Optimization and Application to Portfolio Selection
= (X X ) X E X (X 0 X )−1
0 −1 0 0
However the error vector is random. Since all the elements of this vector have
same variance and are uncorrelated, the covariance matrix of is simply
E 0 = s 2 I
39/124
Fundamentals of Optimization and Application to Portfolio Selection
Generalizing...
40/124
Fundamentals of Optimization and Application to Portfolio Selection
where
I α is the interecept term;
I we have m factors F 1 , . . . , F m and therefore m slope coefficients
β1, . . . , βm
41/124
Fundamentals of Optimization and Application to Portfolio Selection
Let’s say we have n historical observations for the asset returns and each
factors.
Y = Xβ + (17)
BUT
I Y is the n-element column vector of observed asset return RA
A
Y1 R1
.. ..
. .
A
Y = Y i
= Ri
. .
.. ..
Yn RnA
42/124
Fundamentals of Optimization and Application to Portfolio Selection
F1j
F11 ... ... F1m 1
..
.
X = Fi1 ... Fij ... Fim 1
..
.
Fn1 ... Fnj ... Fnm 1
43/124
Fundamentals of Optimization and Application to Portfolio Selection
44/124
Fundamentals of Optimization and Application to Portfolio Selection
β̂ = (X 0 X )−1 X 0 Y
45/124
Fundamentals of Optimization and Application to Portfolio Selection
min f (x1 , . . . , xn )
x1 ,...,xn
subject to:
g1 (x1 , . . . , xn ) = b1
..
.
gm (x1 , . . . , xn ) = bm
46/124
Fundamentals of Optimization and Application to Portfolio Selection
47/124
Fundamentals of Optimization and Application to Portfolio Selection
48/124
Fundamentals of Optimization and Application to Portfolio Selection
49/124
Fundamentals of Optimization and Application to Portfolio Selection
i = 1, . . . , n
∂L
(x) = gj (x) − bj = 0 j = 1, . . . , m
∂λj
50/124
Fundamentals of Optimization and Application to Portfolio Selection
Note that:
I the first n equations correspond to an unconstrained optimization over f
penalized by a sum of functions parameterized by λ;
I we have recovered our constraints in the last m equations.
Once the system of equations is solved, all we need to do is check the Hessian
of f before concluding1 .
1
Strictly speaking, checking the Hessian is not enough in general optimization problems, but it
will prove sufficient for the types of applications we consider in this lecture.
51/124
Fundamentals of Optimization and Application to Portfolio Selection
52/124
Fundamentals of Optimization and Application to Portfolio Selection
If we adopt this convention, our objective function is the portfolio variance, and
we will minimize it with respects to the portfolio weights.
Actually, instead of using the portfolio variance, we will use a little trick and
scale it down by a factor of 1/2 to ease our calculations. Since the factor is
positive, it does not affect the value of the optimal vector of weights w ∗ .
1 1
min σπ2 = w 0 Σw
w 2 2
53/124
Fundamentals of Optimization and Application to Portfolio Selection
µπ = µ0 w = w 0 µ = m
We also have a second constraint on the weights called the ‘budget equation’.
The sum of all the weights must necessarily equal 1. Since there is no risk-free
assets, our wealth must be entirely invested in a combination of the n assets.
10 w = w 0 1 = 1
54/124
Fundamentals of Optimization and Application to Portfolio Selection
Subject to:
w 0µ = m
w 01 = 1
55/124
Fundamentals of Optimization and Application to Portfolio Selection
56/124
Fundamentals of Optimization and Application to Portfolio Selection
Next, we solve for the first order condition by taking the derivative with respect
to the vector w :
∂L
(w , λ, γ) = Σw − λµ − γ1 = 0 (19)
∂w
Checking the second order condition, the Hessian of the objective function is
equal to the covariance matrix Σ, which is positive definite. Therefore, we have
reached the optimal weight vector w ∗ :
57/124
Fundamentals of Optimization and Application to Portfolio Selection
All we have to do now is to find the values for λ and γ and then substitute
them into (20).
µ0 w = m
10 w = 1
58/124
Fundamentals of Optimization and Application to Portfolio Selection
C λ + Bγ = m
Bλ + Aγ = 1
Then (
Am−B
λ= AC −B 2
C −Bm (21)
γ= AC −B 2
Now all we need to do is to substitute these values back into (20) to obtain w ∗ .
59/124
Fundamentals of Optimization and Application to Portfolio Selection
Numerical Application
0.27
and
0.07
0.12
σ=
0.30
0.60
60/124
Fundamentals of Optimization and Application to Portfolio Selection
61/124
Fundamentals of Optimization and Application to Portfolio Selection
Answer:
62/124
Fundamentals of Optimization and Application to Portfolio Selection
63/124
Fundamentals of Optimization and Application to Portfolio Selection
Now, we can answer our question. The optimal asset allocation to obtain a
return m = 10% is given by
0.138935474
64/124
Fundamentals of Optimization and Application to Portfolio Selection
0.138935450
65/124
Fundamentals of Optimization and Application to Portfolio Selection
Am2 − 2Bm + C
σπ2 (m) = (22)
AC − B 2
66/124
Fundamentals of Optimization and Application to Portfolio Selection
σπ2 = w 0 Σw (23)
67/124
Fundamentals of Optimization and Application to Portfolio Selection
Notice that the asset allocation of the portfolios located on the boundary of the
opportunity set (and therefore on the efficient frontier!) is fully parametrised by
the target return of the portfolio. So we can express equation (20) as
where (
Am−B
λ(m) = AC −B 2
C −Bm (25)
γ(m) = AC −B 2
Now, substitute (25) into (24) and plug the result into (23) to get
Am2 − 2Bm + C
σπ2 (m) = (26)
AC − B 2
68/124
Fundamentals of Optimization and Application to Portfolio Selection
69/124
Fundamentals of Optimization and Application to Portfolio Selection
Σ−1 1
wg =
A
and finally the variance:
1
σg2 =
A
70/124
Fundamentals of Optimization and Application to Portfolio Selection
What is the global minimum variance portfolio’s asset allocation? What are its
return and standard deviation?
71/124
Fundamentals of Optimization and Application to Portfolio Selection
Answer:
its return is
B
mg = ≈ 4.02%
A
and its standard deviation is equal to
p
σg = wg0 Σwg ≈ 6.46%
72/124
Fundamentals of Optimization and Application to Portfolio Selection
Subject to:
r + w 0 (µ − r 1) = m
Recall that the budget constraint has vanished because the residual of the
wealth not invested in risky assets is now in the risk-free asset.
73/124
Fundamentals of Optimization and Application to Portfolio Selection
Next, we solve for the first order condition by taking the derivative with respect
to the vector w :
∂L
= Σw − λ(µ − r 1) = 0
∂w
74/124
Fundamentals of Optimization and Application to Portfolio Selection
Checking the second order condition, the Hessian of the objective function is
still the covariance matrix, which is positive definite. Therefore, we have
reached the optimal weight vector w ∗ :
w ∗ = λΣ−1 (µ − r 1)
Here again, we have transposed our equation and multiplied both sides by the
inverse matrix Σ−1 .
75/124
Fundamentals of Optimization and Application to Portfolio Selection
76/124
Fundamentals of Optimization and Application to Portfolio Selection
Assume the risk-free rate is 2.5%. What is the allocation of the portfolio
returning 10%?
77/124
Fundamentals of Optimization and Application to Portfolio Selection
Answer:
78/124
Fundamentals of Optimization and Application to Portfolio Selection
The tangency portfolio is the portfolio that is entirely invested in risky assets.
Σ−1 (µ − r 1)
wt =
B − Ar
The mean and standard deviation of this portfolio are given by
C − Br
mt = wt0 µ =
B − Ar
and s
p C − 2rB + R 2 A
σt = wt0 Σwt =
(B − Ar )2
79/124
Fundamentals of Optimization and Application to Portfolio Selection
To derive the asset allocation for the for the tangency portfolio, notice first
that the tangency portfolio is very special because it is simultaneously:
I on the new efficient frontier for risky and risk-free assets (the Capital
market Line). Hence, its asset allocation satisfies equation (28):
(mt − r )Σ−1 (µ − r 1)
wt =
(µ − r 1)0 Σ−1 (µ − r 1)
I on the old risky-only efficient frontier (the hyperbola!). So, its asset
allocation also satisfies equation (20), that is:
80/124
Fundamentals of Optimization and Application to Portfolio Selection
Because the tangency portfolio is fully invested in risky assets, then its asset
allocation must satisfy the budget equation:
10 wt = 1
(mt − r )Σ−1 (µ − r 1)
0
1 =1
(µ − r 1)0 Σ−1 (µ − r 1)
0 (mt − r )Σ−1 (µ − r 1)
1 =1
C − 2rB + r 2 A
81/124
Fundamentals of Optimization and Application to Portfolio Selection
mt (B − rA) = C − rB
This gives us the formula for the return of the tangency portfolio:
C − Br
mt =
B − Ar
82/124
Fundamentals of Optimization and Application to Portfolio Selection
Now, to get wt , simply plug the formula for mt in equation (28) and use the
definition of A, B and C to simplify:
83/124
Fundamentals of Optimization and Application to Portfolio Selection
What is the tangency portfolio’s asset allocation? What are its return and
standard deviation?
84/124
Fundamentals of Optimization and Application to Portfolio Selection
Answer:
its return is
C − Br
≈ 0.085235749
mt =
B − Ar
and its standard deviation is equal to
s
C − 2Br + Ar 2
σt = ≈ 0.128731141
(B − Ar )2
85/124
Fundamentals of Optimization and Application to Portfolio Selection
Imagine you are working in the asset management division of a large bank.
Your daily challenge is to come up with portfolios that will provide superior
risk-adjusted return to your investors.
A few floors down, in the investment banking divisions, dozens of equity and
fixed income analysts pour over thousands of financial statements, economic
releases and geopolitical news to provide buy and sell recommendations to their
clients. How could you harness the views formulated by these analysts to
improve your portfolio construction?
This is the challenge that Fisher Black and Robert Litterman successfully
tackled in the early 1990s. Their model, the Black-Litterman model published
in 1992 [1] is still the reference.
Other resources include articles by He and Litterman [5], Jay Walters [7] (of
blacklitterman.org fame) and Thomas Idzorek [4].
86/124
Fundamentals of Optimization and Application to Portfolio Selection
87/124
Fundamentals of Optimization and Application to Portfolio Selection
The basic ideas in Black-Litterman is that the ‘true’ mean excess return µ̃ is
neither known with certainty nor directly observable. Instead, we must rely on
an estimate π:
π ∼ N(µ̃, Σπ )
88/124
Fundamentals of Optimization and Application to Portfolio Selection
π = µ̃ + (29)
where ∼ N(0, Σπ ).
89/124
Fundamentals of Optimization and Application to Portfolio Selection
In the following slides, we will use the Bayesian approach to construct the
Black-Litterman formula step by step.
90/124
Fundamentals of Optimization and Application to Portfolio Selection
91/124
Fundamentals of Optimization and Application to Portfolio Selection
I Bayes’ formula is closely related to the multiplication rule and the total
probability rule (see Appendix).
I Bayes’ formula is routinely used to update probabilities when new
information becomes available:
Updated probability
Probability of a new information for a given event
=
Unconditional probability of new information
×Prior probability of the event
92/124
Fundamentals of Optimization and Application to Portfolio Selection
Mathematically,
P(I |E )
P(E |I ) = × P(E )
P(I )
where E is an event and I is the new piece of information.
A bit of jargon:
I P(E ) is called the prior probability. It is the uninformed probability of
event E .
I P(E |I ) is called the posterior probability and represents the probability of
event E once we have incorporated information I .
I P(I ) is a normalisation constant.
93/124
Fundamentals of Optimization and Application to Portfolio Selection
The trouble is that there is not a unique choice: one could start from
I a uniform (“1/N”) portfolio;
I the global minimum variance portfolio;
I any other ‘neutral and uninformed’ portfolio.
the excess returns. If we use historical returns, we incur the risk of having
estimates that do not reflect future expectations and that might result in
unrealistic portfolios;
I Uniform portfolios cannot really help us establish a prior view of excess
return;
But Black and Litterman’s solution to the prior selection quandary is both
effective and elegant: they start from the equilibrium CAPM portfolio.
95/124
Fundamentals of Optimization and Application to Portfolio Selection
To get the prior expected excess return, we will start from the mean-variance
problem
λ 0
max w 0 R̃ − w Σw
w 2
where Σ represents the covariance matrix of excess returns.
96/124
Fundamentals of Optimization and Application to Portfolio Selection
However, if we assume that the CAPM holds, meaning that markets are
(broadly) in equilibrium, then we can reverse engineer the equilibrium vector of
excess return Π out of equation (31).
Specifically,
1 −1
Σ Π wM = (31)
λ
where wM are the weights of the market portfolio reached in equilibrium and Π
is the equilibrium vector of risk premia. Then,
Π = λΣwM (32)
Concretely, we would use the current asset allocation of our favourite broad
market-cap weighted index. The argument is that if we are close to equilibrium,
any broad market index should reflect the market portfolio.
97/124
Fundamentals of Optimization and Application to Portfolio Selection
We may not know what the risk aversion λ is, but we could estimate it. Start
0
by premultiplying (32) by wM :
0 0
wM Π = λwM ΣwM (33)
0 2 0
Now, wM ΣwM =: σM is the variance of the market portfolio and wM Π is the
excess return of the market portfolio.
Thus,
0
wM Π 1
λ= 2 = SM (34)
σM σM
0
wM Π
where SM = σM
is the Sharpe ratio of the market.
Black and Litterman use a Sharpe ratio close to 0.5 in their article.
98/124
Fundamentals of Optimization and Application to Portfolio Selection
This reverse optimization is actually a very nice idea, with several key
advantages:
I the prior portfolio allocation is neutral and uninformed: it is just the
allocation of a broad market index!
I the prior portfolio allocation is realistic: it does not contain extreme
weights;
I we obtain a prior excess return: the equilibrium vector of excess returns Π.
Moreover, formula (31) has shown us that there is a direct (and simple)
relation linking excess returns and portfolio weights.
99/124
Fundamentals of Optimization and Application to Portfolio Selection
Numerical Example
We have obtained this covariance matrix using 120 monthly returns (10 years).
0.10
100/124
Fundamentals of Optimization and Application to Portfolio Selection
We can compute the equilibrium vector of excess return Π (the prior) using
equation (32). First, we need to estimate λ using equation (34).
Taking a Sharpe ratio of 0.5 (the same as Black and Litterman), we obtain
1 1
λ= SM = × 0.5 = 2.24
σM 0.2235
101/124
Fundamentals of Optimization and Application to Portfolio Selection
The equilibrium vector of excess return Π (the prior) subject to a risk aversion
λ = 2.24 is
0.0209
0.0471
Π = λΣwM =
0.1465
0.2596
102/124
Fundamentals of Optimization and Application to Portfolio Selection
At this stage, we have (almost) obtained a prior distribution for the excess
return
P(E ) ∼ N(Π, Σπ )
To get things going, Black and Litterman assume that the variance of the
estimate Σπ is proportional to the covariance matrix of the excess returns Σ
with a coefficient of proportionality τ :
Σπ = τ Σ
With this assumption in mind, the prior distribution for the excess return is
103/124
Fundamentals of Optimization and Application to Portfolio Selection
If we estimate our model using a time series of T historical data, we could view
τ Σ as the square of the standard error of estimate for the equilibrium vector Π.
We would therefore pick τ ≈ T −1 .
104/124
Fundamentals of Optimization and Application to Portfolio Selection
Numerical Example
To get the variance of the prior, we compute τ based on the standard error of
estimate method:
1 1
τ = = = 0.0083 (36)
T 120
slightly below the 0.01 - 0.05 range.
The main feature of the Black-Litterman model is that it incorporate the views
of analysts and portfolio managers to fine tune our estimates of expected
returns and our asset allocation.
Here again, Black and Litterman propose an effective and elegant solution that
allows both absolute and relative views.
To illustrate the procedure, we use a simple example from Walters [7] with four
assets and two views:
1. Relative view: the investor believes that Asset 3 will outperform Asset 1
by 10% with confidence ω1 ;
2. Absolute view: the investor believes that Asset 2 will return 3% with
confidence ω2 ,
106/124
Fundamentals of Optimization and Application to Portfolio Selection
Absolute views are expressed as long positions, while relative views are
represented long-short positions.
Each view implies a specific return for one or several asset classes. These
returns are contained in the vector Q:
0.10
Q=
0.03
We also need a matrix Ω for the confidence. This matrix will be used as a
covariance matrix to model the uncertainty in the views:
ω1 0
Ω=
0 ω2
107/124
Fundamentals of Optimization and Application to Portfolio Selection
If we assume that the uncertainty about the views is Gaussian, we can express
the conditional distribution for the views as:
108/124
Fundamentals of Optimization and Application to Portfolio Selection
109/124
Fundamentals of Optimization and Application to Portfolio Selection
Numerical Example
First, compute
0.000615833 0.000154
P(τ Σ)P 0 =
0.000154 0.00012
Next, we diagonalize:
0.000615833 0
Ω := Diag (P(τ Σ)P 0 ) =
0 0.00012
110/124
Fundamentals of Optimization and Application to Portfolio Selection
It turns out that we do not need to derive the normalizing constant P(I )
explicitly as it will vanish into the integration constant when we perform the
calculations. This is generally the case when we apply Bayes’ approach to
continuous distributions.
P(E |I )
h i−1 h i h i−1
∼ N (τ Σ)−1 + P 0 Ω−1 P (τ Σ)−1 Π + P 0 Ω−1 Q , (τ Σ)−1 + P 0 Ω−1 P
(39)
111/124
Fundamentals of Optimization and Application to Portfolio Selection
112/124
Fundamentals of Optimization and Application to Portfolio Selection
Application
113/124
Fundamentals of Optimization and Application to Portfolio Selection
The final step is to use the posterior expected excess return to derive the
optimal asset allocation (conditional on the views expressed).
To do this, we revisit the utility maximisation problem, but this time with our
posterior expected excess return R̂I :
h i λ
max r + w R̂I − w 0 Σw
0
w 2
The resulting asset allocation is
1 −1
w∗ = Σ R̂I (41)
λ
114/124
Fundamentals of Optimization and Application to Portfolio Selection
Numerical Example
We compute three asset allocations for three different levels of risk aversion:
I λ = 0.01, corresponding to a near-Kelly investor;
I λ = 2.24, the base case we estimated when we computed the prior;
I λ = 6, corresponding to a risk-averse investor.
115/124
Fundamentals of Optimization and Application to Portfolio Selection
I λ = 0.01:
219.95%
371.92%
w∗ =
898.50%
223.69%
resulting in a large amount (1614%!!!) borrowed at the risk-free rate.
I λ = 2.24:
9.83%
∗
16.63%
w = 40.17%
10.00%
with 23.27% invested in the risk-free rate.
I λ = 6:
3.67%
∗
6.20%
w = 14.98%
3.73%
with 71.43%(!) invested in the risk-free rate
116/124
Fundamentals of Optimization and Application to Portfolio Selection
min f (x1 , . . . , xn )
x1 ,...,xn
subject to:
g1 (x1 , . . . , xn ) ≤ b1
..
.
gm (x1 , . . . , xn ) ≤ bm
117/124
Fundamentals of Optimization and Application to Portfolio Selection
118/124
Fundamentals of Optimization and Application to Portfolio Selection
Underneath the first condition, we recognize the familiar form of the Lagrange
function, except that there is an extra Lagrange multiplier. The second set of
conditions relate to the constraints, and the third set of conditions relates to
the Lagrange multipliers themselves.
119/124
Fundamentals of Optimization and Application to Portfolio Selection
120/124
Fundamentals of Optimization and Application to Portfolio Selection
The multiplication rule states that the probability that A and B both occur
equals the probability that A occurs multiplied by the conditional probability
that B occurs given that A has occurred:
121/124
Fundamentals of Optimization and Application to Portfolio Selection
When A and B are two independent events meaning that the occurrence of
either does not affect the likelihood of the other, then
and as a result
P(A ∩ B) = P(A)P(B)
122/124
Fundamentals of Optimization and Application to Portfolio Selection
123/124
Fundamentals of Optimization and Application to Portfolio Selection
124/124
Fundamentals of Optimization and Application to Portfolio Selection
124/124
Fundamentals of Optimization and Application to Portfolio Selection
H. Theil.
Principles of Econometrics.
Wiley, 1971.
J. Walters.
The black-litterman model in detail.
Technical report, Working Paper, 2011.
124/124