Você está na página 1de 49

PORTFOLIO OPTIMIZATION SUBJECT TO CONSTRAINTS ON

TRACKING ERROR VOLATILITY

Rafael Augusto Sperendio

ABSTRACT
This research is dedicated on the study of optimization models for investment portfolios with
active management, that is, seeking returns higher than the market index, but with restrictions
that minimize the risk to the investor. Based on the mean-variance analysis proposed by
Markowitz, and also based on the model of minimum variance of the tracking error proposed by
Roll (1992), this research seeks to find an analytical solution that provides the optimal
investment strategy to get the portfolio with the lowest tracking-error for a given expected return
over the benchmark, in order to overcome the limitations found in the analytical solution of the
model developed by Roll.

1 INTRODUCTION

Harry Markowitz revolutionized the financial market when he first formalized mathematically
the problem of determining the best allocation of resources for a given set of assets, in addition
to the introduction of the variance as a quantitative risk measure of a financial asset.

Markowitz's work was undoubtedly a landmark in the history of the Modern Theory of Finance,
whose crucial contribution was the distinction between the variability of the return of a financial
asset and its impact on the risk of an investment portfolio. With the support of the advance in the
computer’s processing power, since the optimization problem in allocating assets often requires
numerical algorithms to generate results in a sustainable way, the great challenge of study in
portfolio optimization is now to adapt the existing optimization models in order to get as closer
as possible to the reality faced by asset managers, according to their investment strategies.

In a simplified way, investment strategies can be classified as passive, in which the manager will
be evaluated on their ability to build a portfolio that faithfully reproduces the behavior of a pre-
set benchmark, and active, object of the present study, in which the investor gives to the manager
the task of reaching a return higher than a specific benchmark.

In an active management, unlike the passive strategy in which the risks involved are systemic
and belonging to the benchmark index, the investor also accepts non-systemic risks in order to
achieve returns higher than the benchmark. In this case, the value of the portfolio management
service (management fee), as well as the award (performance fee) will be based on the additional
value that the portfolio manager can add above the benchmark.

In this context, it is evident the agent conflict of interest between investors and managers of
investment funds in which managers, in an attempt to maximize the amount received as
performance fee, may invest the investor’s capital in assets with higher potential of return and
consequently higher risk, that may cause great losses to shareholders.

Another noteworthy finding is related to the fact that the market indices, that are typically used
as benchmark, are composed of a very large number of assets, of which many with unacceptable
liquidity. On this way, it is impossible for the manager to buy and sell, beyond to rebalance the
portfolio, every time that there are new applications or withdrawals in the fund.

In this scenario, the main objective of this research is, through the application of optimization
models, finding the optimal portfolio composition that minimizes the volatility of the differences
between the returns of the portfolio and the returns of the benchmark, in order to provide the
manager charging a performance fee, but at the same time, limiting the risk of the portfolio
relative to the benchmark.
2 OPTIMIZATION MODELS

2.1 MARKOWITZ MODEL

Portfolio Theory had as its starting point the publication of the Harry Markowitz’s paper entitled
Portfolio Selection in 1952. In this paper, Markowitz proposed a quadratic programming model
to solve the problem of optimal asset allocation in an investment portfolio, considering only a
single period analysis.

The Markowitz model, also known as mean-variance model, consists of selecting a portfolio that
presents the least risk for a given desired return, or on a similar way, find the portfolio with the
highest expected return for a given level of acceptable risk. Thus, it is evident that the problem
of asset allocation is on a quadratic optimization model with constraints:

  Σ


Subject to: ω’µ = µp


ω’e = 1

ω,  ∈ ℝ ,
where: e is an unitary array, that is, contains 1 in all its elements, and has the same dimension as

ω is the array of weights of the assets in the portfolio ω ∈ ℝ ,


µ is the array of expected returns for each asset µ  ∈ ℝ ,
µp is the expected portfolio return,
and Σ is the matrix of covariances between the assets in the portfolio Σ ∈ ℝ  .

Since the above mentioned problem has only equality constraints, we can use the method known
as Lagrange Multipliers to find the analytic solution of this optimization problem, shown in
Appendix 1, to get the minimum variance portfolio for a given desired return.
 = ℎ + 

  
Where:

ℎ= Σ  − Σ 
 
 
 = Σ   − Σ  
 
γ = µ’Σ−1µ
ψ = e’ Σ−1 µ
α = e’ Σ−1e

2.2 ROLL MODEL

The model of minimum tracking error variance was initially proposed by Roll (1992, p.15) and
aims to minimize the variance of the tracking error subject to a restriction of the average gain
over the benchmark’s expected return. Thus, being N the total assets considered in the analysis,

include, and R the matrix of returns of these assets for a window of m observations,  ∈ ℝ  ,
covering all assets that belong to the benchmark and other assets that the manager wants to

the tracking error is given by:

 =  ′ −  ′
 = ! −  "′

where: ε = array of tracking errors,  ∈ ℝ ,


ωp = array of weights of the assets in the portfolio,  ∈ ℝ ,
ωb = array of weights of the assets in the benchmark,  ∈ ℝ ,
and R = matrix of returns of all assets considered in the analysis,  ∈ ℝ  .
We can see that both the array ωp , and the array ωb as well as the matrix R have dimension N,
i.e., the entire universe of assets considered in the analysis. However, ωp and ωb have non-null
values only for the assets that are part of their respective compositions.

The expected value of the tracking error is given by:

# =  − 
# =  ′ −  ′

# = ! −  " 


where: µε = expected value of the tracking error,


ωp = array of weights of the assets in the portfolio,  ∈ ℝ ,
ωb = array of weights of the assets in the benchmark,  ∈ ℝ ,
and µ = array of expected returns of all assets considered in the analysis, µ ∈ ℝ .

Thus, we get the formula of the variance of the tracking error:

$# % = & '' − # (% (
%
$# % = & )*! −  "′ − ! −  " + ,


$# % = ! −  "′&'' − (% (! −  "


$# % = ! −  "′Σ! −  "

where: σε2 = variance of the tracking error,


ωp = array of weights of the assets in the portfolio,  ∈ ℝ ,
ωb = array of weights of the assets in the benchmark,  ∈ ℝ ,
and Σ = is the matrix of covariances between the assets in the portfolio, Σ ∈ ℝ  .
The average gain over the benchmark corresponds to the difference between the expected return
of the portfolio and the expected return of the benchmark, given by:

- =  − 
- = ! −  "′

As stated by Roll (1992, p.15) the manager’s objective is to minimize the tracking error volatility
conditional on an expected performance compared to a benchmark. Thus, the problem of
minimizing the variance of the tracking error can be structured as follows:

min! −  "′Σ! −  "


12

! −  "  = -

Subject to:

! −  "  = 0


Using the Lagrange Multipliers, the solution of the problem of minimal variance of the tracking
error, shown in Appendix 2, is given by:

-
4= ' − 5 (
 − 5
where: x = ( ωp – ωb ),
G = average gain over the benchmark,
ω0=array of weights of the assets of the global minimum variance portfolio: ω0 = Σ-1 e / α,
µ0 = expected return of the global minimum variance portfolio: µ0 = ψ / α ,
ω1 = array of weights of the assets of an efficient portfolio located where a line starting
from the origin through the global minimum variance portfolio, crosses the efficient
frontier: ω1 = Σ-1 µ / ψ ,
and µ1 = expected return of an efficient portfolio located where a line starting from the origin
through the global minimum variance portfolio crosses the efficient frontier,
µ1 = γ / ψ .
Roll’s model, despite its proven efficiency regarding the minimization of the volatility of the
tracking error, brings the disadvantage that, by using the analytical solution presented above, the
tasks of choosing the quantity of assets, as well as selecting which assets will compose the
portfolio are made by the model, independent of the manager’s choice, resulting in high
transaction costs and, depending on the quantity of assets given by the model, impracticality of
the portfolio management. This problem can be circumvented through the use of numerical
methods, or through some adjustments in the model as shown in the following session.

2.3 Enhancements in the Roll’s model

Given the problem verified in the implementation of the solution proposed by the model of Roll,
some adjustments are necessary in order to find an analytical solution in which the manager
specifies how many and which assets will compose the portfolio. Thus, analyzing the original
formulation of the model of minimum variance of the tracking error:

min! −  "′Σ! −  "


12

! −  "  = -

Subject to:

! −  "  = 0


Handling the minimization function:

min   Σ − 2  Σ + $ %


12

Given the necessity to specify the assets that will compose the portfolio and aiming to facilitate
the demonstration of the calculation of the analytical solution, it is necessary to organize the
covariance matrix in order to have on the first lines of the matrix, the assets that will compose
the portfolio. Thus, the manipulation of the minimization function is performed differently from
the Roll’s model. Since n, is the number of assets that will compose the portfolio and N the total
amount of assets considered in the analysis:
ωp = array of weights of the assets in the portfolio,  ∈ ℝ
Σ = general covariance matrix between all assets considered in the analysis, Σ ∈ ℝ 
7 = covariance matrix including only the assets that will take part on the portfolio, 7 ∈ ℝ
8 = matrix composed of the n upper lines of the general covariance matrix Σ (reminding that the
assets that will take part on the portfolio are on the n upper lines), 8 ∈ ℝ 

Thus, the minimization function is given by:

min   7 − 2  8 + $ %


12

! −  "  = -

Subject to:

! −  "  = 0


Handling the constraints:

! −  "  = -


 ′  −  ′ = -
  −  = -

and

! −  "  = 0


 ′ −  ′ = 0
Since the sum of the weights of the benchmark assets is equal to 1:

 ′ − 1 = 0
 ′ = 1

Thus, the problem of minimal variance of the tracking error by restricting the assets that will
participate in the portfolio can be structured as follows:

min   7 − 2  8 + $ %


12

Subject to:   −  = -


 ′ = 1

By applying the Lagrange multipliers, as shown in Appendix 3, the optimal composition of a


portfolio in order to minimize the volatility of the tracking error and stating the assets that will
compose the portfolio is given by:

1 
 = 7 '28 + :  + :% (
2

Where:

2
: = !' + - −  7  8 ( − '1 −   7  8 ("

2
:% = !−' + - −  7  8 ( +  '1 −   7  8 ("


Thus, this solution is demonstrated most appropriate to the problem of minimizing the tracking
error variance, subject to the restriction on the average gain over the benchmark and the sum of
portfolio weights equal to 1, when the manager wants to specify the assets that will compose the
portfolio and, from this point on, find the optimal solution to determine the weights of these
assets with the objective of minimizing the variance of the tracking error of a particular
benchmark.

The average performance gain of the portfolio over the benchmark, G, to allow, after deducting
fees and taxes, the portfolio to provide a profitability higher than the benchmark, allowing the
manager to receive the award as performance fee, can be estimated in the Brazilian scenario as
follows:

;'1 +  + - ('1 − <( − ';'1 +  + - ('1 − <( − ;(=


−1>
;

Where: P = fund’s equity;


µb = expected return of the benchmark;
G = average expected gain over the benchmark;
t = management fee; and
I = taxes.

Isolating G:

 '= − <= ( + <' + 1 − =(


->
'1 − <('1 − =(

Note that in the inequality above, the value set as the average expected gain over the benchmark
depends on the expected return of the benchmark, i.e., the higher the expected return of the
benchmark, the greater will be the value set as the expected gain over the benchmark. It is
noteworthy that the formula given by the inequality above is only an estimate, because the
management fee, although expressed on annual basis, is collected over the fund’s equity on a
daily basis.
3 TESTS

On the following sessions, tests will be presented in order to evaluate the efficiency of the
adjusted model proposed in this research, using real data from the Brazilian stock exchange
BM&FBOVESPA.

3.1 Selecting the benchmark

For this study, the Ibovespa, the main reference index in the Brazilian stock exchange
(BM&FBOVESPA), was chosen as the benchmark of the portfolio. This index is an indicator
that aims to measure the performance of a theoretical stock portfolio, reviewed every four
months and proportionately composed of shares that represents 80% of the total financial volume
traded on the BM&FBOVESPA during the 12-months preceding the formation of the portfolio,
being the stock prices weighted by their respective volume of trades. Thus, we used as the basis
for this study the composition of the theoretical portfolio disclosed for the four months period
September/December 2009, shown in Appendix 4.

3.2 Sample selection and data collection

The sample used to evaluate the efficiency of the tracking error model proposed in this research
included the historic daily closing prices adjusted for dividends, splits and reverse splits of the 65
assets that were part of the theoretical portfolio of the Ibovespa index, valid for the four months
September-December 2009, for the period from November 30, 2007 to August 31, 2009
resulting in a sample of 28,145 data extracted from the software Economática.
3.3 Model application

Based on the sample data collected, expected daily returns and volatilities were calculated for all
assets included and for the Ibovespa index, noting that to calculate the expected daily returns and
volatility of the Ibovespa, the index has been fixed as it always had been made as disclosed by
the theoretical portfolio valid for the four-months September-December 2009, which is not a true
statement given that the index has its composition changed on a daily basis and the theoretical
portfolio is reviewed every 4 months, however, this adjustment increases the accuracy of the
model since it is this 4-month September-December 2009 theoretical portfolio that will be
tracked by the investment portfolio proposed in this research.

3.3.1 Selection of the assets

The selection of the assets to compose the portfolio was based on 3 criteria:

- Expected return;

- Correlation between the assets;

- Participation in the Ibovespa according to the theoretical portfolio of September-December


2009; and

- Diversification across industries.

According to these criteria, five assets were selected, which the weights summed are equivalent
to 21.4% of the Bovespa index.
Ticker Stock Industry Share in Ibovespa (%)

PETR4 Petrobrás Oil, Gas & Biofuel 15.012


CSNA3 Companhia Siderúrgica Nacional Steel & Metallurgy 3.023
BBAS3 Banco do Brasil Financial Intermediaries 2.124
CPLE6 Copel Electricity 0.673
PCAR5 Pão de Açúcar – CBD Trade & Distribution 0.571
Exhibit 1: Assets selected to compose the portfolio.

Daily expected return and volatility, calculated for each of the five assets and for the adjusted
Ibovespa, as previously mentioned, are demonstrated as follows:

Assets Daily expected return µ (%) Daily volatility σ (%)


PETR4 -0.022 3.499
CSNA3 0.048 4.240
BBAS3 0.004 3.816
CPLE6 0.038 2.900
PCAR5 0.107 2.745
Ibovespa* -0.043 2.949
* Adjusted index

Exhibit 2: Expected return and volatility for the selected assets and for the adjusted Ibovespa.

3.3.2 Expected performance gain

The daily expected performance gain was determined based on the performance of the Ibovespa
index in the past 5 years and adopting the following parameters:

- Ibovespa’s average annual performance (2004 – 2008): + 16.2%

- Fee (average charged by stock funds – ANBIMA – Brazilian Association of Financial and
Capital Market Entities – as from September/09): 2.23%

- Taxes: 15%
Using the formula shown in the previous section to estimate the performance gain over the
benchmark, the necessary value for the portfolio, after deducting all the expenses, outperform the
Ibovespa index was calculated as follows:

 '= − <= ( + <' + 1 − =(


->
'1 − <('1 − =(
Where: µb = 16.20%
t = 2.23%
I = 15.00%

Based on this estimate of daily performance gain and considering the expected return of the
Ibovespa index equal to 16.2%, correspondent to the average return of the index over the past 5
years, we conclude that for the portfolio return outperform the Ibovespa return the performance
gain should be higher than 560 bps on an annual basis, or 2 bps on a daily basis. Thus, we added
1 bp to the minimum G aiming to overcome the Ibovespa and enable the manager charging a
performance fee, so that G = 0.03 (3 bps).

3.4 Model results and backtest

Applying the model of minimum tracking error variance subject to a daily performance gain of
0.03 percentage point over the Ibovespa, we reached the following optimal composition:

Portfolio composition
Asset Share (%)
PETR4 39.78
CSNA3 17.30
BBAS3 22.32
CPLE6 18.67
PCAR5 1.94
Exhibit 4: Portfolio composition.
The backtest results for the period from November 30, 2007 to August 31, 2009, in order to
evaluate the past performance of the portfolio relative to the adjusted Ibovespa, were:

Total Return Volatility Daily Quadratic Tracking


(%) (%) Average Error (%) Error Variance (%)
Portfolio 6.682 2.996 0.5544711 0.5524055
Adjusted Ibovespa -18.348 2.942 - -
Exhibit 5: Backtest results.

140.0

120.0

100.0

80.0

60.0

40.0
Model
20.0
Ibovespa
0.0
07 07 08 08 08 08 08 08 08 09 09 09
08 08 08 08 08 09 09 09 09 09

- - - - - - - - - - - - - - - -
- - - - - -

jul jul

jan set jan


fev jun fev jun
abr out abr
dez dez
nov mai ago nov mai ago
mar mar

Picture 1: Backtest period chart.

Analyzing the data obtained in the backtest and the comparative chart between the performance
of the portfolio and the performance of the adjusted Ibovespa, we note that the model of
minimum tracking error variance showed a very adherent behavior to the adjusted index,
according to the tracking error variance showed and considering the average performance gain
imposed to the model.
3.5 Tests

To evaluate the performance of the optimal portfolio generated, we selected as window of tests
the period from September to October 2009, with 42 working days. The results of total return,
volatility, daily average quadratic tracking error and tracking error variance were:

Daily average
Total Return Volatility quadratic tracking Tracking error
(%) (%) error (%) variance (%)
Portfolio 10.115 1.692 0.2112875 0.2099418
Ibovespa 8.574 1.784 - -
Exhibit 6: Test period results.

In the test period, we did not use the adjusted Ibovespa, i.e. with the fixed composition based on
the theoretical portfolio September/December 2009, we used the real close price for each period
in order to follow the performance of the portfolio in a real environment, differently from the
previous situation in which we used the adjusted index, with the fixed composition, in order to
achieve a higher precision level given that it is this theoretical portfolio that the portfolio will
track in September and October.

120.0

110.0

100.0

Model
Ibovespa

90.0
sep-09 oct -09

Picture 2: Test period chart.


By analyzing the performance of the portfolio against the Ibovespa during the test period, we
note that the model of minimum tracking error variance outperformed the index as proposed, and
showed a pretty low tracking error given the performance gain imposed. However, it is
noteworthy that although the cumulative return has been higher than the Ibovespa, with a
performance gain according to initially proposed by the model (1.541 in 42 working days,
equivalent to approximately 0.037 percentage point, or 3.7 bps, per day), this result was
influenced by the performance of the portfolio in September, once in October the portfolio
underperformed the Ibovespa, as we can see in the following table:

Difference between
Month Portfolio (%) Ibovespa (%) returns (%)
September/09 11.109 8.529 2.581
October/09 -0.994 0.046 -1.040
Accumulated (from sep/09 to oct/09) 10.115 8.574 1.134
Exhibit 7: Comparative of performance Portfolio vs. Ibovespa.

This performance is due to changes in the index composition, since that in the end of the first
half of the period of validity of the theoretical portfolio of September/December 2009, two assets
had left the index composition, beyond the changes in the assets weights. In addition, due to the
dynamics of the stock market, expected returns, volatilities and covariances between assets
change constantly, resulting in a loss of efficiency over time of the solution proposed by the
model. Thus, the solution for this type of problem would be to rebalance the portfolio
periodically for long periods of investment, or for high volatility periods, and periodically review
the value taken as the expected performance gain, since this parameter is highly dependent on
the expected return of the benchmark.
4 CONCLUSION

In this research, we presented an optimization model based on Roll (1992) with the objective of
minimizing the variance of the tracking error of a portfolio against a benchmark, in order to limit
the manager’s actions in the total risk of the portfolio, by imposing restrictions regarding the
performance gain over the benchmark.

This optimization model was tested for the stock market in the Brazilian stock exchange, Bolsa
de Valores de São Paulo, BM&FBOVESPA, using the Ibovespa index as benchmark. By
analyzing both the backtest and the test of the model, we observed that the model of minimum
tracking error variance tracked the Ibovespa index quite effectively, showing a pretty regular
behavior and a low volatile tracking error.

Given the number of assets - just five, implying in low transaction costs and minimizing the
liquidity problem faced by the portfolio manager whenever there are new investments or
withdrawals in the fund, or changes in the composition of the benchmark - and given the
performance presented by the model we can consider it a good choice for active portfolio
management.

As a further alternative of deeper study in terms of optimal asset allocation subject to restrictions
on the volatility of the tracking error, we suggest the inclusion of a restriction regarding that the
volatility of the portfolio being less than the volatility of the benchmark, as proposed by Jorion
(2003), and the inclusion of approaches related to transaction costs and taxes, liquidity cost,
operational costs, maximum loss, alternative models in order to get a better estimate for the
parameter adopted as performance gain, rebalance the portfolio periodically, study the model in
continuous time and other in order to bring the models close to reality.
REFERENCES

ARAUJO, Michael Viriato. Seleção Dinâmica de Portfólios em Média-Variância com Saltos


Markovianos. São Paulo, 2007. Dissertação (Doutorado em Engenharia) – Escola Politécnica da
Universidade de São Paulo.

CLARKE, R.C.; Krase, S.; Statman, M.;. Tracking errors, regret, and tactical asset
allocation. The Journal of Portfolio Management, 20, 1994, Spring. p.16-24.

COSTA, Oswaldo Luiz do Valle; ASSUNÇÃO, Hugo Gonçalves Vieira. Análise de Risco e
Retorno em Investimentos Financeiros. 1.ed. São Paulo: Editora Manole, 2005.

ELTON, Edwin J.; GRUBER, Martin J. Modern portfolio theory and investment analysis. 5.
ed. New York: John Wiley & Sons, 1995.

FRANCIS, Jack Clark. Investment: analysis and management. 5. ed. New York: McGraw-
Hill, 1991.

JORION, Philippe. Portfolio Optimization with Constraints on Tracking Error. Financial


Analysts Journal, Setembro / Outubro de 2003. p. 70-82.

MARKOWITZ, Harry. Portfolio Selection. Journal of Finance, 3 de março de 1952. 7, p.77-91.

MARKOWITZ, Harry. Portfolio Selection: efficient diversification of investments. New


York: John Wiley & Sons, 1959.

MARKOWITZ, Harry. Foundations of Portfolio Theory. Nobel Lecture, Nova Iorque,


Estados Unidos, 7 de dezembro de 1990. Disponível em:
http://nobelprize.org/nobel_prizes/economics/laureates/1990/markowitz-lecture.html acesso em
20 de julho de 2007.

NABHOLZ, Rodrigo de Barros. Seleção Ótima de Ativos Multi-Período com Restrições


Intermediárias Utilizando o Critério de Média-Variância. São Paulo, 2006. Dissertação
(Doutorado em Engenharia) – Escola Politécnica da Universidade de São Paulo.

ODA, André Luiz. Análise da persistência de performance dos fundos de ações brasileiros
no período 1995-1998. São Paulo, 2000. Dissertação (Mestrado em Administração) – Programa
de Pós-Graduação em Administração em Administração, Faculdade de Economia,
Administração e Contabilidade da Universidade de São Paulo.

ROLL, Richard. A Mean / Variance Analysis of Tracking Error. The Journal of Portfolio
Management, 18, Summer, 1992. p. 13-22.

RUDOLF, Markus; WOLTER, Hans-Jürgen; ZIMMERMANN, Heinz. A linear model for


tracking error minimization. Journal of Banking & Finance, 23, 1999. p. 85-103.
SECURATO, José Roberto. Decisões Financeiras em Condições de Risco. 2. ed. São Paulo:
Saint Paul Editora, 2007.

SPERENDIO, Rafael Augusto. Otimização de carteiras sujeitas a restrições de alavancagem


e de volatilidade do tracking-error utilizando o critério de média-variância. São Paulo,
2009. Dissertação (Especialização em Engenharia Financeira) – Programa de Educação
Continuada em Engenharia, Escola Politécnica da Universidade de São Paulo.
Appendix 1
Demonstration of the solution for the mean-variance model proposed by Markowitz (1952), to
minimize the risk of a portfolio given an expected return:

  Σ


Subject to: ω’µ = µp


ω’e = 1

ω,  ∈ ℝ ,
where: e is an unitary array, i.e., contains 1 in all its elements, and has the same dimension as

ω is the array of assets weights in the portfolio ω∈ ℝ ,


µ is the array of the expected returns for each asset µ ∈ ℝ ,
µp is the expected return of the portfolio,
and Σ is the matrix of covariances between the assets in the portfolio Σ ∈ ℝ  .

Given that the above mentioned problem has only equality constraints, we can use the method
known as Lagrange Multipliers to solve this optimization problem. Through this method, we
associate a multiplier λi to the i-th constraint and build the Lagrangian function as follows:

 '4 , 4% , … , 4 ( = A
max (or min) z = f (x1,x2,...,xn)

% '4 , 4% , … , 4 ( = A%

 '4 , 4% , … , 4 ( = A
Subject to:

The Lagrangian function is:

C'4 , 4% , … , 4 , : , :% , … , : ( = D '4 , 4% , … , 4 ( + E :F GAF − F '4 , 4% , … , 4 (H


FI
Starting from the Lagrangian function L, a practical procedure for the determination of local

determine, if possible, the point !4J , 4J% , … , 4J , : J , :%J , … :


J " that makes these derivatives equal to
maxima or minima is to calculate the partial derivatives of L with respect to xj and λi, and

zero.

KC KC KC KC KC KC
= =⋯= = = =⋯= =0
K4 K4% K4 K: K:% K:

Note that if the derivatives with respect to λi are null at the point !4J , 4J% , … , 4J , : J , :%J , … :
J ",

then:

KC
0= = AM − M '4J , 4J % , … , 4J (
K:M
M '4J , 4J % , … , 4J ( = AF

This implies that the constraints are satisfied in this point. Thus, by applying the method of
Lagrange Multipliers for the problem of assets selection:

  Σ


Subject to: ω’µ = µp


ω’e = 1

And the Lagrangian function:

C', :( =  Σ + : ! −  " + :% '1 − ′(


C', :( =  Σ + :  − :   + :% − :% ′
Deriving the Lagrangian, equating it to zero and keeping the constraints, we obtain the first order
necessary conditions:

KC', :(
= 2Σ − :  − :%  = 0
K
KC ', :(
=  −   = 0
K:
KC', :(
= 1 −   = 0
K:%

2Σ − :  − :%  = 0
N   =  O
  = 1

Then:

2Σ − :  − :%  = 0
2Σ = :  + :% 
1
 = Σ  ':  + :% (
2

So:

1  
 Σ ':  + :% ( = 
P2 O
1  
 Σ ':  + :% ( = 1
2

That is:

 Σ   Σ e : 2
Q S Q S = Q S
  Σ    Σ e :% 2
Denoting:

′Σ  = 
′Σ   = 
′Σ  e = 

It follows that:

  : 
Q SQ S = 2T U
  :% 1
:    
Q S = 2 T U Q S
:% 1  

 
Knowing that Q S > 0 , as will be demonstrated in the following pages, and applying the
 
following rule for calculating an inverse matrix, valid for 2x2 symmetric matrices with nonzero
determinant:

V A  1 W −A
T U = T U
A W VW − A % −A V

We have:

: 2  − 
Q S = Q ST U
:%  −  −
%  1

Denoting:

 
 = X< Q S =  − %
 
It follows that:

: 2  − 
Q S = Q ST U
:%  −  1

i.e.,

2
: = ! − "
P  O
2
:% = !− + "


Substituting, we have that:

1
 = Σ  ':  + :% (
2
1 
=Σ *! − " + ! −  "+

   
 = ) Σ  − Σ ,  + ) Σ  − Σ ,
   

Denoting:

  
ℎ= Σ  − Σ 
 
 
 = Σ   − Σ  
 

The solution for the mean-variance problem is given by:

 = ℎ + 
By applying the second order conditions, we have that:

L(ω) = Σ > 0

Thus, the solution found corresponds to a point of local minimum. Since the objective function is
convex, as well as the set of feasible solutions, the point of minimum obtained is global.

Note that:

  ℎ = 1 ,   = 0 ,   ℎ = 0 ,    = 1

Therefore, as expected:

  =  !ℎ + " =  ℎ +   = 


   =   !ℎ + " =   ℎ +    = 1

However, it is noteworthy that to solve this problem in this way, the following conditions must
be observed:

- Σ > 0 and therefore, it is invertible


This hypothesis only ensures that all assets are really at risk. Assuming that all assets are really
at risk, we have σn > 0 , and the lack of perfect correlations, it follows that Σ > 0, det[Σ] > 0, and
therefore the matrix Σ has an inverse.

-  is not a multiple of e ( ≠ ae)


This hypothesis, which necessarily implies n ≥ 2 ensures a non-degenerate situation, because,
otherwise, with µ = ae, the restrictions would only be consistent with µp = a.
- the constants α, γ , and δ are positive.
More precisely we have,

 
∈Q , S
:YZ 'Σ( :[M\ 'Σ(
^μ^% ^^%
∈] , `
:YZ 'Σ( :[M\ 'Σ(
^^
|| < √
:[M\ 'Σ(

In which λmin(Σ) e λmax(Σ) represent the minimum and maximum eigenvalues of the matrix Σ.
We can show it as follows:

Since Σ > 0, Σ can be written as:

Σ = ded′

In which U is an orthonormal matrix (UU’ =U’U = I ) and D is a diagonal matrix formed by the
eigenvalues (all positive real) of Σ. So,

1 1
0< = ≤ Σ = de  d′ ≤ =
:YZ 'Σ( :F 'Σ(

So that:

1 1 1 1
= ^^% ≤   Σ  ≤ ^^% = 
:YZ 'Σ( :YZ 'Σ( :F 'Σ( :F 'Σ(

and

1 1
^^% ≤  Σ  ≤ ^^%
:YZ 'Σ( :F 'Σ(
Note that the 2X2 matrix:

 
′ H = Q′Σ   ′Σ 

Q S Σ G  S = Q S
′ ′Σ  ′Σ  

is positive definite, since Σ-1>0 and e and µ are linearly independent arrays for the second
hypothesis (µ is not a multiple of e). Therefore, the determinant of this matrix, which represents
the product of two positive eigenvalues is greater than zero, i.e.:

 
 =  − % = X< Q S>0
 

Consequently:

 ^^% ^^
|| < g'′Σ ('′Σ ( ≤ h i = √
:F 'Σ( :F 'Σ( :F 'Σ(

From the analytical solution of the mean-variance model, we found the minimum variance
portfolio for a given expected return. An important feature of minimum variance portfolios is
that any portfolio built from minimum variance portfolios will also be of minimum variance,
result also known as “Two Fund Theorem”. Thus, being ra and rb the returns of two portfolios of
minimum variance , with expected returns µa and µb :

jY = Y j
j =  j

Assuming a portfolio named c composed of these two minimum variance portfolios, being ξ the
weight of the portfolio a and (1 – ξ ) the weight of the portfolio b in the portfolio c, it follows
that the return of the portfolio c is given by:

jk = ljY + '1 − l(j


jk = k j = lY j + '1 − l( j = !lY + '1 − l( "′j

Consequently the expected return of the portfolio c is given by:

k = lY + '1 − l(

Since a e b are minimum variance portfolios, the composition of each is given by:

Y = ℎY + 
 = ℎ + 

Therefore, the composition of the portfolio c is given by:

k = lY + '1 − l ( = l'ℎY + ( + '1 − l ('ℎ + (


k = ℎ'lY + '1 − l ( ( + 
k = ℎm + 

Thus, the portfolio c is also of minimum variance. Calculating the covariance between two
portfolios of minimum variance:

Wno 'jY , j ( = &''jY − Y ('j −  ((


Wno 'jY , j ( = &''Y ′jY − Y ′Y (' ′j −  ′ ((
Wno 'jY , j ( = &'Y ′'jY − Y ('j −  (′ (
Wno'jY , j ( = Y ′Σ
Wno 'jY , j ( = 'ℎY + (′Σ'ℎ + (
After some manipulations we have:

    
ℎY +  = Σ pY ) − , + )  − ,q
   
    
ℎ +  = Σ p ) − , + )  − ,q
   

So,


     
Wno 'jY , j ( = r Σ pY ) − , + )  − ,qs Σ r Σ  p ) − ,
     

 
+ )  − ,qs
 

       
Wno'jY , j ( = r Σ  pY ) − , + )  − ,qs r p ) − , + )  − ,qs
       

        

Wno 'jY , j ( = Σ pY ) − , + )  − ,q p ) − , + )  − ,q
       
 %      

Wno'jY , j ( = * + pY ) − , + )  − ,q Σ  p ) − , + )  − ,q
      

 %         
Wno 'jY , j ( = * + rY  ) − , Σ ) − , + 'Y +  ( ) − , Σ )  − ,
     

    
+ )  − , Σ  )  − ,q
   

Simplifying, we have:

      %
) − , t ) − , =  t   −  t   −   t   + %   t   =
    
 % % %  % % %  − % δ
− − + % =−2 + =− = =
       α
          %  
) − , t )  − , =  t
 
− t
 
− % t  + % t =
      
         %      w w − 
 t − t − % t  + % t = − − % + %= =
        %
−'− % + ( 
=− %
 % 

      %   %
)  − , t )  − , = %   t   – %   t   − %  t   + %  t   =
       
 %  %  % %  %  % ' − % ( 
− % − % + % = % − % = = %
%      % 

Substituting, we have:

 % δ ψδ γδ
Wno'jY , j ( = * + )Y  + 'Y +  ( )− % , + % ,
 α α α
 δ ψδ  γδ 
Wno 'jY , j ( = )Y  + 'Y +  ( )− % , + % ,
 α α  α 
 ψ ψ γ
Wno 'jY , j ( = )Y  − Y − { + ,
 α α 
   γ %
Wno 'jY , j ( = r)Y − , ) − , + − % s
    

    −  %
Wno 'jY , j ( = r)Y − , ) − , + s
   %

   δ
Wno 'jY , j ( = r)Y − , ) − , + % s
   
   δ 
Wno 'jY , j ( = )Y − , ) − , + %
    
   1
Wno'jY , j ( = )Y − , ) − , +
   
Similarly, the variance of the portfolio c composed of minimum variance portfolios is given by:

$m % = k  tk
$m % = 'ℎm + ( Σ'ℎm + (
  % 1
$m % = )m − , +
  

From this equation, we get the general risk-return curve for a portfolio:

  % 1
$ % = ) − , +
  
  % 1
$ − ) − , − = 0
%
'÷ 1}(
  
$ % }  % 1}
− ) − , − =0
1} 1}  1}
  
1 %  %
$ − ) − , − 1 = 0
%
1}   

1 1  %
$ % − ) − , = 1
1} } 
 %

As previously mentioned α > 0 and δ > 0, thus the previous equation represents a reduced
equation of a hyperbola with center (0, ψ /α) and asymptotes given by:

ψ δ
~ = ± h σ~ %
α α
center

vertex

Picture: Efficient frontier – general shape.

Being ωg the composition of the global minimum variance portfolio, µg its return and σg2 its
variance:

ψ
μ =
α

1
σ % =
α
Thus, the composition of the global minimum variance portfolio is given by:

α ψ ψ γ ψ
ω = ) Σ μ − Σ  e, + ) Σ e − Σ  μ,
δ δ α δ δ
ψ  ψ%  γ ψ
ω = Σ μ− Σ e + Σ e − Σ μ
δ δα δ δ
γα − ψ% 
ω = Σ e
δα
δ 
ω = Σ e
δα
1
ω = Σ e
α
Appendix 2
Demonstration of the solution of the problem of minimum tracking error variance formulated by
Roll (1992).

min! −  "′Σ! −  "


12

! −  "  = -

Subject to:

! −  "  = 0


Denoting ! −  " = 4 :

min 4  Σ 4
Z

Subject to: 4=-




4 = 0

Using the Lagrange Multipliers, the solution of the problem of minimum tracking error variance
should satisfy the following Lagrangian equation:

C'4, :( = 4  Σ4 + : '- − 4′( + :% '−4′(


C'4, :( = 4  Σ4 + : - − : 4   − :% 4′

And the optimality conditions given by:

KC '4, :(
= 24′Σ − :  − :%  = 0
K4
KC '4, :(
= - − 4 = 0
K:
KC'4, :(
= −4   = 0
K:%
24′Σ − :  − :%  = 0
N - − 4 = 0 O
−4   = 0

Where λ1 e λ2 are the Lagrange multipliers to be determined.

Solving in x:
24′Σ − :  − :%  = 0
24  Σ = :  + :% 
1 
4 = Σ ':  + :% (
2

1
Therefore:

- − Σ ':  + :% ( = 0
P 2 O
1 
− Σ ':  + :% ( = 0
2
1
′Σ ':  + :% ( = -
P 2 O
1
′Σ ':  + :% ( = 0
2
′Σ  ':  + :% ( = 2- O
ƒ
′Σ  ':  + :% ( = 0

i.e.:

 Σ    Σ  e : 2-
Q   S Q: S = T 0 U
  Σ   Σ e %

As previously showed in Appendix 1:

  : -
Q SQ S = 2T U
  :% 0
:    -
Q S = 2 Q S T U
:%   0
: 2 α − -
Q S = Q ST U
:% δ −  0

i.e.,

2
: = -
P  O
2
:% = − -


Substituting:

1 
4 = Σ ':  + :% (
2
1 2 2
4  = Σ ) - − -,
2  
- -
4  = Σ  )  − ,
 
-
4  = 'Σ   − Σ (


Similarly, dividing by  we obtain:

-
4 = *1} Σ   − 1} Σ +
 
} − }

As showed in Appendix 1, the following parameters of the equation above are related to the
global minimum variance portfolio:


„ = 1} Σ  ; „ = } ; $„ % = 1}

For a given return of  = } the correspondent minimum variance portfolio is given by:

1 
 = ℎ +  = Σ 


and variance:


$ % = }%

On the risk-return plane, this efficient portfolio is located where a line starting from the origin
passing through the global minimum variance portfolio crosses the efficient frontier. Thus,
denoting the global minimum variance portfolio with “0” and the efficient portfolio with “1”:

Portfolio Mean Variance Weights


2
0 µ0 = ψ / α σ0 = 1 / α ω0 = Σ-1 e / α
1 µ1 = γ / ψ σ12 = γ / ψ2 ω1 = Σ-1 µ / ψ

Exhibit 3.1: Minimum Variance Portfolio and Efficient portfolio.

Using the definitions of the portfolios “0” and “1” and substituting in x’:

-
4= ' − 5 (
 − 5

Being:

 − % 
 − 5 = = >0
 

The equation above demonstrated describes the portfolio of minimum tracking-error variance.
The changes in x, required to minimize the tracking-error volatility for a given performance gain
G are proportional to the difference between the proportions of two particular efficient
portfolios, the global minimum variance portfolio “0” and the efficient portfolio with return γ/ψ
denoted by “1”, being x independent from the benchmark, as we note below:

-
 −  = ' − 5 (
 − 5

Thus, we conclude that two investors with the same parameters will adopt the same strategies of
changes in their portfolios relative to the benchmark ωb, regardless of the benchmark. The
variance of the error is given by:

$# % = ! −  "′Σ! −  "



- -
$# %
=r ' − 5 (s Σ r ' − 5 (s
 − 5  − 5

- %
$# %
=) , ' − 5 (′Σ' − 5 (
 − 5
- %
$# %
=) , '  Σ −   Σ5 + 5  Σ5 −   Σ5 (
 − 5
- %
$# % = ) , '  Σ + 5  Σ5 − 2  Σ5 (
 − 5

However:


5 = Σ 

So:

 1
  Σ5 =   ΣΣ = = $5 %
 

And since:


  Σ = $ % =
%

We have:

- %
$# %
=) , '$ % − $5 % (
 − 5

Therefore we verify that the variance of the error is independent of the benchmark ωb.

The variance of the portfolio p is given by:

$ % = '4 +  ( Σ'4 +  ( = $ %
+ $# % + 24′Σ
$ % = 4  Σ4 + 4  Σ +   Σ4 +   Σ
$ % = $# % + 24  Σ + $ %
=$ %
+ $# % + 24  Σ

Since:

- -
4  Σ =   Σ 4 =   Σ ' − 5 ( =   Σ' − 5 (
 − 5  − 5
-
4  Σ = '  Σ −   Σ5 (
 − 5
-  
4  Σ = )  ΣΣ −   ΣΣ ,
 − 5  
-   -  1 - 
4  Σ = )  −   , = ) − ,= ) − $5 % ,
 − 5    − 5    − 5 
Dividing µb / ψ by α to isolate σ02 we have:

- ˆ ‹ - 
4  Σ = $5 % ‡ − 1Š = $5 % ) − 1,
 − 5 }  − 5 5

† ‰

Substituting, we have:

$ % = $ %
+ $# % + 24  Σ
-$5 % 
$ = $
% %
+ $# %
+2 ) − 1,
 − 5 5
- %
-$5 % 
$ % = $ %
+) , '$ % − $5 % ( + 2 ) − 1,
 − 5  − 5 5

Denoting p* as an efficient portfolio with the same return as the managed portfolio p (i.e. G + µb)
and variance $∗ % . Likewise, considering b* a portfolio with the same expected return as the
benchmark b (i.e. µb) and variance $ ∗
%
. Thus, considering that the equation applies to any
portfolio, including b* and p* :

-$5 % 
$∗ % = $ %
+ $# % + 2 ) − 1,

 − 5 5

Note that the two last terms of the expressions are equal, regardless of whether we are
considering b and p or b* and p*. Thus, subtracting the expressions, we obtain:

$ % − $∗ % = $ %
−$ ∗
%

This equation shows that the difference between the variance $ % of the managed portfolio and
the variance $∗ % of the efficient portfolio is constant and equal to the initial difference,
$ %
−$ ∗
%
. Thus, if the benchmark ωb is efficient, $ %
=$ ∗
%
and, therefore, $ % = $∗ % , that
is, as would be expected, the solution of the problem of minimizing the tracking error variance,
given an expected performance gain, leads to an efficient portfolio, with the curve in the risk-
return plane coinciding with the efficient frontier. But, if the benchmark ωb is not efficient, the
solution of the minimizing problem always lead to a non-efficient portfolio, and the curve in the
risk-return plane will always be located at a constant distance from the efficient frontier, i.e., the
inefficiency remains constant, as we can see below:

Minimum Variance
Minimum Tracking-Error Variance

Figure: Minimum Variance Efficient Frontier X Minimum Tracking-Error Variance Curve.


Appendix 3
Demonstration of the analytic solution for the model of minimum tracking error variance, subject
to a performance gain over the benchmark, in order to let the manager choose how many and
which assets will compose the portfolio.

min   7 − 2  8 + $ %


12

Subject to:   −  = -


 ′ = 1

Where: ωp = array of weights of the assets in the portfolio,  ∈ ℝ ,


µ = array of expected returns of the assets in the portfolio,  ∈ ℝ ,
µb = expected return of the benchmark,

 = unitary array,  ∈ ℝ ,
G = performance gain over the benchmark,

7 = covariance matrix between the assets that will take part on the portfolio, 7 ∈ ℝ ,
8 = matrix composed of the n upper lines of the general covariance matrix Σ ,

portfolio), 8 ∈ ℝ  ,
(reminding that on the n upper lines will be the assets that will compose the

ωb = array of weights of the assets in the benchmark,  ∈ ℝ ,


and σb = standard deviation of the returns of the benchmark, $ ∈ ℝ .

Applying the Lagrange multipliers, the Lagrangian function is given by:

C! , :" =   7 − 2  8 + $ %


+ : !- −    +  " + :% !1 −   "
C! , :" =   7 − 2  8 + $ %
+ : - − :    + :  + :% − :%   
And the optimality conditions given by:

KC! , :"
= 2 7 − 28 − :  − :%  = 0
K
KC! , :"
= - −   +  = 0
K:
KC! , :"
= 1 −  ′ = 0
K:%

2 7 − 28 − :  − :%  = 0
 - −   +  = 0 O
 ′ = 1

Where λ1 and λ2 are the Lagrangian Multipliers to be determined.

Solving in ωp:

2 7 = 28 + :  + :% 
1 
 = 7 '28 + :  + :% (
2

Substituting, in order to find the multipliers λ1 and λ2 :

1 
7 '28 + :  + :% ( =  + -
P2 O
1 
7 '28 + :  + :% ( = 1
2
1  
 7 '28 + :  + :% ( =  + -
P 2 O
1  
 7 '28 + :  + :% ( = 1
2
1   1
 7 28 +  7  ':  + :% ( =  + -
P2 2 O
1   1  
 7 28 +  7 ':  + :% ( = 1
2 2
1
 7  8 +  7  ':  + :% ( =  + -
P 2 O
1  
 7 8 +  7 ':  + :% ( = 1
 
2
 7  ':  + :% ( = 2' + - −  7  8 (O
ƒ
  7  ':  + :% ( = 2'1 −   7  8 (
 Σ   Σ e : 2' + - −  7  8 (
Q S Q S = Q S
  Σ    Σ e :% 2'1 −   7  8 (

Denoting:

′Σ  = 
′Σ   = 
′Σ  e = 
It follows that:

  :  + - −  7  8
Q SQ S = 2Q S
  :% 1 −   7  8
:  + - −  7  8  

Q S = 2 Q SQ S
:% 1 −   7  8  
: 2 α −  + - −  7  8
Q S = Q SQ S
:% δ −  1 −   7  8

Thus, it follows that the optimal composition of a portfolio in order to minimize the volatility of
the tracking error and stating the assets that will compose the portfolio is given by:

1 
 = 7 '28 + :  + :% (
2
Being:

2
: = !' + - −  7  8 ( − '1 −   7  8 ("

2
:% = !−' + - −  7  8 ( +  '1 −   7  8 ("

Appendix 4
Composition of the Ibovespa index, theoretical portfolio valid for the four-month period of
September-December 2009.
Ticker Stock Type* Weight (%)
PETR4 Petrobrás PN 15,012
VALE5 Vale PNA N1 12,076
ITUB4 ItauUnibanco PN EX N1 5,555
BVMF3 BM&FBOVESPA ON NM 4,448
BBDC4 Bradesco PN N1 3,864
GGBR4 Gerdau PN N1 3,647
VALE3 Vale ON N1 3,468
PETR3 Petrobrás ON 3,336
USIM5 Usiminas PNA N1 3,100
CSNA3 Companhia Siderúrgica Nacional ON 3,023
ITSA4 ITAUSA PN EDJ N1 2,455
BBAS3 Banco do Brasil ON NM 2,124
CMIG4 CEMIG PN N1 1,705
RDCD3 Redecard ON NM 1,585
ALLL11 ALL América Latina Logística UNT N2 1,420
ARCZ6 Aracruz PNB N1 1,404
CYRE3 Cyrela Realty ON NM 1,385
SDIA4 Sadia PN N1 1,208
GFSA3 Gafisa ON NM 1,163
BRAP4 Bradespar PN N1 1,066
AMBV4 AMBEV PN 1,027
PRGA3 BRF Foods ON NM 0,998
TNLP4 Telemar PN 0,991
ELET3 Eletrobrás ON N1 0,972
LAME4 Lojas Americanas PN 0,971
ELET6 Eletrobrás PNB N1 0,946
GOAU4 Gerdau Met. PN N1 0,921
LREN3 Lojas Renner ON NM 0,884
TCSL4 TIM Participações PN 0,828
CESP6 CESP PNB N1 0,812
NETC4 NET PN N2 0,800
NATU3 Natura ON NM 0,757
VIVO4 Vivo PN 0,757
MMXM3 MMX Mineração ON NM 0,743
EMBR3 Embraer ON NM 0,725
ELPL6 Eletropaulo PNB N2 0,717
USIM3 Usiminas ON N1 0,696
VCPA3 VCP ON N1 0,691
BTOW3 B2W Varejo ON NM 0,684
CPLE6 Copel PNB N1 0,673
GOLL4 Gol PN N2 0,673
TAMM4 TAM PN N2 0,653
JBSS3 JBS ON NM 0,637
RSID3 Rossi Residencial ON NM 0,597
CCRO3 CCR Rodovias ON NM 0,590
PCAR5 Pão de Açúcar-CBD PNA N1 0,571
CRUZ3 Souza Cruz ON ED 0,564
CSAN3 COSAN ON NM 0,553
CPFE3 CPFL Energia ON NM 0,541
UGPA4 Ultrapar PN N1 0,506
BRKM5 Braskem PNA N1 0,451
DURA4 Duratex PN N1 0,430
SBSP3 Sabesp ON NM 0,409
TRPL4 Transissão Paulista PN N1 0,386
KLBN4 Klabin PN ED N1 0,376
BRTO4 Brasil Telecom PN 0,360
BRTP4 Brasil T PAR PN N1 0,318
LIGT3 Light ON NM 0,312
TNLP3 Telemar ON 0,301
BNCA3 Nossa Caixa ON NM 0,288
TMAR5 Telemar N L PNA 0,288
TLPP4 Telesp PN 0,211
TCSL3 TIM Participações ON 0,156
CLSC6 Celesc PNB N2 0,100
CGAS5 Comgás PNA 0,093
Source: BM&FBOVESPA

*ON = common share


PN = preferred share

Você também pode gostar