Upload
marlee123
View
216
Download
0
Embed Size (px)
Citation preview
7/30/2019 An introduction to portfolio optimization
1/55
An introduction to portfolio optimisation
Susan Thomas
IGIDR, Bombay
October 21, 2011
Susan Thomas An introduction to portfolio optimisation
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
2/55
Goals
What is a portfolio?
Asset classes that define an Indian portfolio, and their
markets.
Inputs to portfolio optimisation: measuring returns and risk
of a portfolioOptimisation framework: optimising a risky portfolio using
the Markowitz framework
Outcome 1: passive portfolio management
Outcome 2: active portfolio managementEvaluating portfolio performance
Susan Thomas An introduction to portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
3/55
A portfolio
Investments in a set of assets together make a portfolio.As opposed to an investment in a single asset.
A portfolio is defined as:
The value of the investment (portfolio).Assets held in the portfolio.
Fraction of the value invested in each asset.These are called the weights of each asset in the portfolio,and are typically denoted as wi for asset i.
Choosing a portfolio is equivalent to choosing the weightsof assets in a portfolio.
1 How are these weights chosen?2 Would the same weights serve the best interests of all
investors?
Susan Thomas An introduction to portfolio optimisation
http://find/http://goback/7/30/2019 An introduction to portfolio optimization
4/55
Portfolio choice centers on risk vs. return
Every portfolio outcome is finally measured by the amount
of return it gave for a certain amount of risk taken.
Therefore, portfolio choice follows two stages:
1 capital allocation: how much of riskless vs. risky assets tohold?
2 security section:
What underlying assets constitute a riskless portfolio?
What constitutes a risky portfolio?
Susan Thomas An introduction to portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
5/55
What assets can we access?
Riskless Govt. bonds
Risky Corporate bonds, firm equity, commodities,
foreign exchange, foreign equity, foreign gov-ernment bonds
Leverage/Risk
management
Derivatives
Susan Thomas An introduction to portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
6/55
Measurement of risk and return
Susan Thomas An introduction to portfolio optimisation
?
http://find/7/30/2019 An introduction to portfolio optimization
7/55
Why emphasise the measurement?
Portfolio optimisation depends upon the tradeoff between
the future risk and expected return of the portfolio.
The higher the future risk, the higher the expected return
demanded by a risk-averse investor.
Thus, future risk and expected return have to be modelled
and forecasted as inputs into portfolio choice..
Problem: key inputs are observed (past) returns vs. risk
behaviour for the portfolio.
These pose severe challenges.
Susan Thomas An introduction to portfolio optimisation
Ch ll i i d i k
http://find/7/30/2019 An introduction to portfolio optimization
8/55
Challenges in measuring return and risk
Past returns are easy to measurewhen assets are traded
and prices are observed.
Challenge: There is no consensus on good forecasting
models for expected returns.
Challenge: how to measure risk?
Unlike the dynamics of prices, which we measure as
returns, there is no separate instrument to observe risk?
Once they are measured (typically by proxy), there appear
to be reasonably good forecasting models for risk.
Susan Thomas An introduction to portfolio optimisation
H d l tilit ?
http://find/7/30/2019 An introduction to portfolio optimization
9/55
How do we measure volatility?
Volatility is 2 of returns, or the standard deviation ofreturns instead, .
The dependent variable used in the modelling and
forecasting exercise is .However, this is static measure of volatility.
Real world observation: variance changes.
We need a time series of volatility.
Susan Thomas An introduction to portfolio optimisation
A h t t ti i f l tilit
http://find/7/30/2019 An introduction to portfolio optimization
10/55
Approaches to create time series of volatility
Traditional approaches:1 Time series of r2t ,2 Moving window average ,3 Range of prices as a measure of .
Recent approaches using new markets and improvedmarket information:
1 Implied volatility from options markets,2 Realised volatility using high-frequency data.
Susan Thomas An introduction to portfolio optimisation
T diti l h S d t
http://find/http://goback/7/30/2019 An introduction to portfolio optimization
11/55
Traditional approach: Squared returns
Given a time series of returns at a certain frequency (daily,
weekly, monthly, etc), rft.
Time series of volatility at the same frequency, ft wascreated as square of the returns.
2ft = r2ft
Susan Thomas An introduction to portfolio optimisation
Traditional approach: rolling windows
http://find/7/30/2019 An introduction to portfolio optimization
12/55
Traditional approach: rolling windows
Moving window average: Out of a total of T observations
on returns, use k < T observations to calculate one value
of t.Then, the volatility time series will be:
21 =1
(k
1)
ki=1
(ri r)2
22 =1
(k 1)k+1i=2
(ri r)2
. . . . . . . . .
2Tk =1
(k 1)T
i=Tk+1
(ri r)2
Using overlapping windows, we can calculate a time series
with T k volatility observations, from T observations forreturns data.
Susan Thomas An introduction to portfolio optimisation
Traditional approach: Range
http://find/7/30/2019 An introduction to portfolio optimization
13/55
Traditional approach: Range
Range is calculated as the difference between the high
and the low prices over a given period it tells us how
variable prices have been during some period.One way of calculating the volatility of returns using the
range
Ranget = 100 (Hight Lowt)/LowtRange is a measure that also uses multiple observations
at a given frequency.
If we have T points of observation of high and low prices,
then we get T observations for the time series of volatility.
Formal definition of a range-based volatility measure is
0.361 (100 (log High log Low))2
(Source: Michael Parkinson, 1980. The extreme value
method for estimating the variance of the rate of return,
Journal of Business, 53 (January):61-65.)
Susan Thomas An introduction to portfolio optimisation
Recent measures of volatility: implied volatility
http://find/7/30/2019 An introduction to portfolio optimization
14/55
Recent measures of volatility: implied volatility
Implied volatility: Apply an option pricing model to an
existing market price for an option to reverse calculate the
volatility of the asset.
What we need:1 Option price: from the market, daily2 Pricing model: Black-Scholes, Binomial lattice, etc.
What we get: a daily time series of volatility.What is remarkable: IV is an average of the expected
volatility.
It is already a forecast of the asset volatility.
Issues: If IV measures the volatility of the asset, then all
option prices on the same asset should give the same
volatility.
This is not so: IV changes with strike (volatility smile);
with type of option (put/call).
Susan Thomas An introduction to portfolio optimisation
Recent measures of volatility: Realised volatility
http://find/7/30/2019 An introduction to portfolio optimization
15/55
Recent measures of volatility: Realised volatility
Realised volatility (RV): calculated using high-frequencyreturns. In order to be useful, RV requires that:
The returns data is synchronised (say returns data at every5-minutes, or at every half-hour).For example, 66 5-minute returns can be used to calculate5-minute 5min.
This can be used to calculate daily as:
daily =
665 minutes
11 half hour returns can be used to calculate 0.5hours.
This can be used to calcalate daily as:
daily =
1130 minutes
Susan Thomas An introduction to portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
16/55
Setup for the portfolio problem: definitions,concepts
Susan Thomas An introduction to portfolio optimisation
The problem of portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
17/55
The problem of portfolio optimisation
We are given a (competitive, liquid) market where n assets
are traded.
The market is efficient - there are no easy forecasts for
tomorrows returns.
Given an individuals utility function, how does she allocate
her wealth among these n assets?
Susan Thomas An introduction to portfolio optimisation
Rules of the game
http://find/7/30/2019 An introduction to portfolio optimization
18/55
Rules of the game
ra,t can follow any distribution.
Typical model choice 1: Suppose ra,t N().In a gaussian world, returns on one asset is a random
variable x needs:
x, 2x
For returns on two assets, (x, y), additional requirement:
xy or xy
Susan Thomas An introduction to portfolio optimisation
Interest rates vs asset rates of return
http://find/7/30/2019 An introduction to portfolio optimization
19/55
Interest rates vs. asset rates of return
Risk-free interest rate is rf.
rf is assumed to be known upfront and fixed.
ra
is the return obtained in investing in an asset.
It is a sum of capital gains and cashflow/dividend
payouts.
ra is a random variable when the investment is done.
Susan Thomas An introduction to portfolio optimisation
Example: E(rp) p calculation
http://find/7/30/2019 An introduction to portfolio optimization
20/55
Example: E(rp), p calculation
Suppose there are two assets:
Asset 1: E(r1) = 0.12%, 1 = 0.20%.Asset 2: E(r2) = 0.15%, 2 = 0.18%.
1,2 = 0.01.
Portfolio weights = 0.25, 0.75
What is E(rp), p?
Susan Thomas An introduction to portfolio optimisation
Example of E(rp), p calculation
http://find/7/30/2019 An introduction to portfolio optimization
21/55
Example of E(rp), p calculation
Expected returns is a weighted average of individual
returns.
E(rp) = wE(ra)
= (0.25 0.12) + (0.75 0.15)= 0.1425
Variance of the portfolio is 2
w
is a little more complicated:
2p = ww
= (0.252 0.202) + (0.752 0.182) + 2 (0.25 0.75 0.01= 0.024475
p =
2p = 0.15644
Here, we also require the correlation between the two
assets, 1,2 = 0.01.
Susan Thomas An introduction to portfolio optimisation
Example 2: E(rp), p calculation for a 3-asset portfolio
http://find/7/30/2019 An introduction to portfolio optimization
22/55
Example 2: E(rp), p calculation for a 3 asset portfolio
Suppose we add one more asset to our set of 2:
Asset 1: E(r1) = 0.12%, 1 = 0.20%.Asset 2: E(r2) = 0.15%, 2 = 0.18%.
Asset 3: E(r2) = 0.10%, 3 = 0.15%.1,2 = 0.01, 1,3 = 0.005, 2,3 = 0.008
Portfolio weights = 0.25, 0.25, 0.5
What is E(rp), p?
Susan Thomas An introduction to portfolio optimisation
Example: E(rp), p calculation
http://find/7/30/2019 An introduction to portfolio optimization
23/55
p ( p), p
We calculate it using the same equations as before:
E(rp) = wE(ra)
= (0.25 0.12) + (0.25 0.15) + (0.5 0.10)= 0.1175
2p = ww
= (0.252 0.202) + (0.252 0.182) + (0.52 0.152) +2 (0.25 0.25 0.01) + 2 (0.25 0.5 0.005) +2 (0.25 0.5 0.008)
= 0.015
p =
2p = 0.12
Susan Thomas An introduction to portfolio optimisation
E(rp), p for different w
http://find/7/30/2019 An introduction to portfolio optimization
24/55
( p), p
For an alternative portfolio, w = 0.25, 0.5, 0.25 we haveE(rp, p) as:
E(rp) = w
E(ra)= (0.25 0.12) + (0.5 0.15) + (0.25 0.10)= 0.13
2p = ww
= (0.252 0.202) + (0.52 0.182) + (0.252 0.152) +2 (0.25 0.5 0.01) + 2 (0.25 0.25 0.005) +2
(0.25
0.5
0.008)
= 0.017
p =
2p = 0.13
For this portfolio, we have got both higher returns and higher
risk. Susan Thomas An introduction to portfolio optimisation
Observations
http://find/7/30/2019 An introduction to portfolio optimization
25/55
Multivariate rather than univariate distributions We need more
than an understanding of returns on a single
asset: we need to understand their relationship
with all the other assets in the portfolio.
Diversification The variance on the portfolio is much lower thanthe variance on either asset.
0.15644 < 0.20
0.15644 < 0.18
Susan Thomas An introduction to portfolio optimisation
Issues in diversification
http://find/7/30/2019 An introduction to portfolio optimization
26/55
Diversification is the reduction in variance of the portfolioreturns.
This is achieved by:1 Holding a large number of assets, such that the weights on
each become smaller and smaller.Then, the effect of asset i in the portfolio variance is w2i .The smaller the w2i , the larger the reduction in variance.
2 Holding uncorrelated assets, ie, create a portfolio withassets (i,j) such that i,j is very small.The lower the i,j across the n assets, the higher the
reduction in variance of the portfolio
Susan Thomas An introduction to portfolio optimisation
Matrix notation in portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
27/55
p p
There are k assets, where each looks like it comes from a
normal distribution.Jointly, the returns on all these K assets can be written as
a vector:ra MVN(, )
is K 1 is K K and is a positive definite symmetric matrix.If portfolio invests in nassets with a set of weights w, the
portfolio is then a linear combination of the n assets.
Then, the portfolio features are calculated as:
rp N(w, ww)
Susan Thomas An introduction to portfolio optimisation
Summary: portfolio characteristics and portfolio choice
http://find/7/30/2019 An introduction to portfolio optimization
28/55
y p p
Expected return on the portfolio: E(rp) =n
i=1 wiE(ri).
Variance of the portfolio:
2p =n
i=1 w2i
2i + 2
ni=1
nj=1 wiwjij
Susan Thomas An introduction to portfolio optimisation
Values of w
http://find/7/30/2019 An introduction to portfolio optimization
29/55
w sums to one.
Typically, we consider each wi to fall between 0 and 1.
In a country where short-selling is permitted, wi can be
less than 1, or greater than 1.Choosing the portfolio means choosing a vector of weights
w.
Once w is chosen, we know the E(rp) and p for theportfolio.
Susan Thomas An introduction to portfolio optimisation
The E(rp) p graph
http://find/7/30/2019 An introduction to portfolio optimization
30/55
Every choice w induces two numbers - E(rp) and 2p.
A key analytic tool to choose w: E(ra) a graph.A graph with E(rp) on the yaxis and on the xaxis.
For all possible portfolios containing the same assets, butin different proportion, plot the portfolio as a point on the
E(r) graph.This is a simple 2-D graph, regardless of how many assets
you have!
Susan Thomas An introduction to portfolio optimisation
Varying w from 0 to 1 in a E(rp) p graph
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
31/55
Susan Thomas An introduction to portfolio optimisation
Optimisation
http://find/7/30/2019 An introduction to portfolio optimization
32/55
Now we are ready to understand the problem space of
portfolio optimisation.Start with a two-asset universe:
With two assets, (A, B) where
(A, B
MVN(, )
is 2 1 with A, B.and is 2 2 with 2A, 2B, AB.
The investment in one asset as w.
Then, the investment in the other is 1 w.Porfolio optimisation problem: for the parameters in , ,find the optimal w.
Susan Thomas An introduction to portfolio optimisation
Varying w from 0 to 1 - interpretation
http://find/7/30/2019 An introduction to portfolio optimization
33/55
The previous graph shows how E(rp) p combinationchanges as w changes.
There is some value of w for which E(rp) is the maximum.There is some value of w for which p is the minimum.
w for maximum E(rp) and minimum p is not the same.
Susan Thomas An introduction to portfolio optimisation
What happens if changes?
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
34/55
E(r)
sigm
A
B
P
Susan Thomas An introduction to portfolio optimisation
Changing - interpretation
http://find/7/30/2019 An introduction to portfolio optimization
35/55
How does the E(rp), p graph vary with changing values of ?
AB is (E(rp), p) for all nonnegative linear combinationsof A and B, when AB = 1.PA and PB define the boundaries of (E(rp), p)(1 < AB < 1).The curve AB defines (E(rp), p) for all nonnegativelinear combinations of A and B for some intermediate fixed
value of AB.
Susan Thomas An introduction to portfolio optimisation
Choosing the correct portfolio
http://find/7/30/2019 An introduction to portfolio optimization
36/55
Given this graph,1 We first choose a desired E(rp).2 We next choose w such that the variance is minimised for a
selected value of E(rp).This is the optimal portfolio with (1 w) in asset A and win asset B.
Susan Thomas An introduction to portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
37/55
Special case of capital allocation
Susan Thomas An introduction to portfolio optimisation
Capital allocation between risky and risk-free
http://find/7/30/2019 An introduction to portfolio optimization
38/55
We earlier considered any two assets A and B.
What if A is the risk-free asset? Then,E(rp) = wrf + (1 w)E(rB)This is a linear combination of expected returns as usual.
But,
(2
p
) = w22
rf+ (1
w)22
B
+ 2w(1
w)covrf,B, where we
know:
rf = 0covrf,B = 0
Then,
(2p) = (1 w)22B, orp = (1 w)B
Susan Thomas An introduction to portfolio optimisation
Interpreting the E(rp) p graph for risky and risk-free
http://find/7/30/2019 An introduction to portfolio optimization
39/55
Remarkable result: A portfolio of the risk-free and one
risky asset has an E(rp) p graph which is linear in bothE(rp) and .
This means that as you increase w, p decreases linearly.
For example, at w = 1, p = 0
At w = 0, p is the maximum.
Solution to the capital allocation problem: risk-return
across risky and risk-free assets is linear in w.
Susan Thomas An introduction to portfolio optimisation
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
40/55
Leverage
Susan Thomas An introduction to portfolio optimisation
Leverage in w
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
41/55
In the above example, p is bounded to be equal to Bbecause w falls between 0 and 1.
By implication, the investor cannot access risk (or returns)
that are higher than B.
This can change if we have short-selling.
Short-selling means w can be negative.
If w is negative, it means you borrow at the risk-free rate to
invest in the risky security, B.
This is leverage.
With leverage, you can create portfolios with p > B.
Susan Thomas An introduction to portfolio optimisation
Example of leverage
http://find/7/30/2019 An introduction to portfolio optimization
42/55
An investor has Rs.1 million to allocate between the
risk-free asset and risky asset B.
The data shows that rf = 7%, rB = 35%, B = 40%
What combinations of E(rp)
p can she achieve?
At w = 0.5, the portfolio is the riskless asset: E(rp) = 0.5 7 + 0.5 35 = 21%; p = 0.5 40 = 20%;At w = 1, the portfolio is purely risky asset, B.
E(rp) = 35%;
p = 40%
Susan Thomas An introduction to portfolio optimisation
With leverage
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
43/55
At w = 0.5, the portfolio has:E(rp) = 0.5 7 + 1.5 35 = 49%p = 1.5 40 = 60%
How is this achieved?
At w =
0.5, the investor borrows half a million from thebank to invest in B.
This is a leveraged portfolio: the size of the investment is
more than the size of the initial wealth.
Note: The risk in the last portfolio is the highest, but the
return is also (linearly) high.
Susan Thomas An introduction to portfolio optimisation
The capital allocation problem redux
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
44/55
The capital allocation problem remains linear:
Higher the investment in the risky portfolio, return and risk
are linearly higher.
The level of return desired drives the quantum ofinvestment in risky vs. riskless asset.
Next question: out of all possible combinations of risky
assets, what is the optimal risky portfolio?
Susan Thomas An introduction to portfolio optimisation
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
45/55
Constructing the optimal risky portfolio
Susan Thomas An introduction to portfolio optimisation
Step2: Optimising the risky portfolio
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
46/55
Next question: among all the risky assets, what is the
optimal risky portfolio?
We know that the return-risk trade-off among only risky
assets is not linear: some combinations of assets give alower return for a higher level of risk.
What does this combination of risk-return look like?
We find out using a simulation with real data.
Susan Thomas An introduction to portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
47/55
Simulating the E(rp) p graph for a set of7-stocks
Susan Thomas An introduction to portfolio optimisation
Example: A dataset of weekly stock returns
http://find/7/30/2019 An introduction to portfolio optimization
48/55
load(file="10.rda")
colMeans(r)print(cov(r), digits=3)
Susan Thomas An introduction to portfolio optimisation
Example: Mean-variance of weekly returns
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
49/55
> colMeans(r)
RIL Infosys TataChem TELCO TISCO TTEA Grasim0.31392 0.15702 0.40761 0.29796 0.44311 0.12302 0.32051
> print(cov(r), digits=3)
RIL Infosys TataChem TELCO TISCO TTEA Grasim
RIL 29.08 11.01 9.2 12.85 15.93 11.27 8.13
Infosys 11.01 61.23 10.1 4.06 8.72 7.48 7.60
TataChem 9.19 10.11 33.9 15.75 14.51 13.75 12.25
TELCO 12.85 4.06 15.7 38.17 20.16 16.60 7.64
TISCO 15.93 8.72 14.5 20.16 32.94 13.95 11.79
TTEA 11.27 7.48 13.8 16.60 13.95 29.64 8.02
Grasim 8.13 7.60 12.2 7.64 11.79 8.02 34.17
Susan Thomas An introduction to portfolio optimisation
Example: Correlations of weekly returns
http://find/7/30/2019 An introduction to portfolio optimization
50/55
> print(cor(r), digits=3)
RIL Infosys TataChem TELCO TISCO TTEA Grasim
RIL 1.000 0.261 0.293 0.386 0.515 0.384 0.258
Infosys 0.261 1.000 0.222 0.084 0.194 0.176 0.166
TataChem 0.293 0.222 1.000 0.438 0.434 0.434 0.360TELCO 0.386 0.084 0.438 1.000 0.569 0.493 0.212
TISCO 0.515 0.194 0.434 0.569 1.000 0.446 0.351
TTEA 0.384 0.176 0.434 0.493 0.446 1.000 0.252
Grasim 0.258 0.166 0.360 0.212 0.351 0.252 1.000
Susan Thomas An introduction to portfolio optimisation
Example: Creating portfolios randomly
http://find/7/30/2019 An introduction to portfolio optimization
51/55
load(file="10.rda")
mu = colMeans(r)
bigsig = cov(r)
m = nrow(bigsig)-1N = 2 0
w = diff(c(0,sort(runif(m)), 1));
rb = sum(w*mu);
sb = sum(w*bigsig*w);
for (j in 2:N) {
w = diff(c(0,sort(runif(m)), 1));
r = sum(w*mu); rb = rbind(rb,r);
s = sum(w*bigsig*w); sb = rbind(sb,s);
}
d = data.frame(rb, sb);
d$sb = sqrt(d$sb);
pdf("10_2.pdf", width=5.6, height=2.8, bg="cadetblue1", points
plot(d$sb, d$rb, ylab="E(r)", xlab="Sigma", col="blue")
Susan Thomas An introduction to portfolio optimisation
Example: E(r)- graph, N=20 portfolios
http://goforward/http://find/http://goback/7/30/2019 An introduction to portfolio optimization
52/55
qq qq
q
q
q
q
q
qqq
q
q
0 2 4 6 8 10
0.1
0.2
0.3
0.4
0.5
Sigma
E(r)
Susan Thomas An introduction to portfolio optimisation
http://find/7/30/2019 An introduction to portfolio optimization
53/55
Observations from the simulations
http://find/7/30/2019 An introduction to portfolio optimization
54/55
The characteristics of random portfolios (where theweights on the securities are randomly selected) show a
convex curve for different w.
There is a minimum value of p: no matter whatcombination of w, there is no way of reaching a lower pwith this set of assets.
There are a set of portfolios which no-one would want to
hold: where E(rp) decreasesas p increases.
We need to focus on those portfolios where E(rp)
increases as p increases.
Susan Thomas An introduction to portfolio optimisation
The Markowitz optimisation
http://find/7/30/2019 An introduction to portfolio optimization
55/55
We observe that the return-risk trade-off among only risky
assets is not linear: some combinations of assets give a
lower return for a higher level of risk.
Is there a closed form solution to what is the optimal riskyportfolio?
Solution: the Markowitz framework.
Susan Thomas An introduction to portfolio optimisation
http://goforward/http://find/http://goback/