portfolio optimization subject to restrictions on tracking-error volatility

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-

Upload: rafael-sperendio

Post on 04-Apr-2015

286 views

Category:

Documents


2 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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-

Page 2: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 3: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 4: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

� = ℎ�� + �

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,

covering all assets that belong to the benchmark and other assets that the manager wants to

include, and R the matrix of returns of these assets for a window of m observations, � ∈ ℝ���,

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, � ∈ ℝ���.

Page 5: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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, Σ ∈ ℝ���.

Page 6: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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:

min12 !�� − � "′Σ!�� − � "

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 = γ / ψ .

Page 7: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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:

min12 !�� − � "′Σ!�� − � "

Subject to: !�� − � "�� = -

!�� − � "�� = 0

Handling the minimization function:

min12 ���Σ�� − 2���Σ� + $ %

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:

Page 8: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

ω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:

min12 ���7�� − 2���8� + $ %

Subject to: !�� − � "�� = -

!�� − � "�� = 0

Handling the constraints:

!�� − � "�� = - ��′ � − � ′� = - ��� � − � = -

and

!�� − � "�� = 0 ��′� − � ′� = 0

Page 9: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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:

min12 ���7�� − 2���8� + $ %

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:

��� = 12 7� '28� + : � + :%�(

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

Page 10: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 11: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 12: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 13: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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%

Page 14: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 15: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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 Average Error (%)

Tracking Error Variance (%)

Portfolio 6.682 2.996 0.5544711 0.5524055 Adjusted Ibovespa -18.348 2.942 - -

Exhibit 5: Backtest results.

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.

0.0

20.0

40.0

60.0

80.0

100.0

120.0

140.0

nov

-

07

dez

-

07

jan -

08 fev -

08

mar

-

08 abr

-

08

mai

-

08 jun

-

08 jul -

08 ago -

08 set -

08

out

-

08

nov

-

08 dez

-

08 jan

-

09 fev -

09

mar

-

09 abr

-

09

mai

-

09 jun

-

09 jul -

09 ago -

09

Model

Ibovespa

Page 16: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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:

Total Return (%)

Volatility (%)

Daily average quadratic tracking

error (%) Tracking 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.

Picture 2: Test period chart.

90.0

100.0

110.0

120.0

sep -09 oct -09

Model Ibovespa

Page 17: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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:

Month Portfolio (%) Ibovespa (%) Difference between

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.

Page 18: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 19: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 20: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 21: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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:

max (or min) z = f (x1,x2,...,xn)

Subject to:

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

The Lagrangian function is:

C'4 , 4%, … , 4� , : , :%, … , :�( = D'4 , 4%, … , 4�( + E :FGAF − �F'4 , 4%, … , 4�(H�FI

Page 22: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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

maxima or minima is to calculate the partial derivatives of L with respect to xj and λi, and

determine, if possible, the point !4J , 4J%, … , 4J�, :J , :J%, … :J�" that makes these derivatives equal to

zero.

KCK4 = KCK4% = ⋯ = KCK4� = KCK: = KCK:% = ⋯ = KCK:� = 0

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

then:

0 = KCK:M = AM − �M'4J , 4J%, … , 4J�(

�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'�, :( = ��Σ� + : �� − : ��� + :% − :%�′�

Page 23: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Deriving the Lagrangian, equating it to zero and keeping the constraints, we obtain the first order

necessary conditions:

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

KC'�, :(K: = �� − ��� = 0

KC'�, :(K:% = 1 − ��� = 0

N2Σ� − : � − :%� = 0 ��� = ����� = 1 O

Then:

2Σ� − : � − :%� = 0 2Σ� = : � + :%�

� = 12 Σ� ': � + :%�(

So:

P12 ��� ': � + :%�( = ��12 ��� ': � + :%�( = 1 O

That is:

Q��� � ��� e��� � ��� eS Q: :%S = Q2��2 S

Page 24: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Denoting:

�′Σ� � = ��′Σ� � = ��′Σ� e = �

It follows that:

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

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:

TV AA WU� = 1VW − A% T W −A−A V U

We have:

Q: :%S = 2�� − �% Q � −�−� � S T��1 U

Denoting:

� = X�< Q� �� �S = �� − �%

Page 25: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

It follows that:

Q: :%S = 2� Q � −�−� � S T��1 U

i.e.,

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

Substituting, we have that:

� = 12 Σ� ': � + :%�(

� = 1� Σ� *!��� − �"� + !� − ���"�+

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

Denoting:

ℎ = �� Σ� � − �� Σ� �

� = �� Σ� � − �� Σ� �

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

� = ℎ�� + �

Page 26: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

Page 27: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

- the constants α, γ , and δ are positive.

More precisely we have,

� ∈ Q �:�YZ'Σ( , �:[M\'Σ(S � ∈ ] ^μ^%:�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,

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

So that:

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

and

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

Page 28: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Note that the 2X2 matrix:

Q�′�′S Σ� G� �H = Q�′Σ� � �′Σ� ��′Σ� � �′Σ� �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 �:�F�'Σ( i ^�^%:�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

Page 29: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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

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

�k = l�Y + '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 = l�Y + '1 − l(� = l'ℎ�Y + �( + '1 − l('ℎ� + �( �k = ℎ'l�Y + '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 + �(′Σ'ℎ� + �(

Page 30: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

After some manipulations we have:

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

ℎ� + � = �� Σ� p� )� − �� �, + )�� � − �� �,q

So,

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

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

Wno'jY , j ( = �� Σ� p�Y )� − �� �, + )�� � − �� �,q� �� p� )� − �� �, + )�� � − �� �,q

Wno'jY, j ( = *��+% p�Y )� − �� �, + )�� � − �� �,q� Σ� p� )� − �� �, + )�� � − �� �,q

Wno'jY , j ( = *��+% r�Y� )� − �� �,� Σ� )� − �� �, + '�Y + � ( )� − �� �,� Σ� )�� � − �� �,+ )�� � − �� �,� Σ� )�� � − �� �,q

Simplifying, we have:

)� − �� �,� t� )� − �� �, = ��t� � − �� ��t� � − �� ��t� � + �%�% ��t� � =

� − �%� − �%� + �%�% � = � − 2 �%� + �%� = � − �%� = �� − �%� = δα

Page 31: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

)� − �� �,� t� )�� � − �� �, = ��t� �� � − ��t� �� � − ���% ��t� � + �%�% ��t� � = �� ��t� � − �� ��t� � − ���% ��t� � + �%�% ��t� � = ��� − ��� − ����% + �w�% = �w − ����% =

−�'−�% + ��(�% = − ���%

)�� � − �� �,� 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 − ��, )� − ��, + δ�% ��

Wno'jY , j ( = �� )�Y − ��, )� − ��, + 1�

Page 32: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Similarly, the variance of the portfolio c composed of minimum variance portfolios is given by:

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

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

$�% = �� )�� − ��,% + 1�

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

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

11 �} $�% − �%� )�� − ��,% − 1 = 0

11 �} $�% − 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δα σ~%

Page 33: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Picture: Efficient frontier – general shape.

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

variance:

μ� = ψα

σ�% = 1α

center

vertex

Page 34: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Thus, the composition of the global minimum variance portfolio is given by:

ω� = )αδ Σ� μ − ψδ Σ� e, ψα + )γδ Σ� e − ψδ Σ� μ,

ω� = ψδ Σ� μ − ψ%δα Σ� e + γδ Σ� e − ψδ Σ� μ

ω� = γα − ψ%δα Σ� e

ω� = δδα Σ� e

ω� = 1α Σ� e

Page 35: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Appendix 2

Demonstration of the solution of the problem of minimum tracking error variance formulated by

Roll (1992).

min12 !�� − � "′Σ!�� − � "

Subject to: !�� − � "�� = -

!�� − � "�� = 0

Denoting !�� − � " = 4 :

minZ 4�Σ 4 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, :(K4 = 24′Σ − : � − :%� = 0

KC'4, :(K: = - − 4�� = 0

KC'4, :(K:% = −4�� = 0

Page 36: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

N24′Σ − : � − :%� = 0 - − 4�� = 0−4�� = 0 O

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

Solving in x: 24′Σ − : � − :%� = 0 24�Σ = : � + :%�

4� = 12 Σ� ': � + :%�(

Therefore:

P- − 12 Σ� ': � + :%�(� = 0− 12 Σ� ': � + :%�(� = 0 O

P12 �′Σ� ': � + :%�( = -12 �′Σ� ': � + :%�( = 0O ��′Σ� ': � + :%�( = 2-�′Σ� ': � + :%�( = 0 O

i.e.:

Q��� � ��� e��� � ��� eS Q: :%S = T2-0 U

As previously showed in Appendix 1:

Q� �� �S Q: :%S = 2 T-0U Q: :%S = 2 Q� �� �S� T-0U

Page 37: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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

i.e.,

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

Substituting:

4� = 12 Σ� ': � + :%�(

4� = 12 Σ� )2� �-� − 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 �}

Page 38: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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

0 µ0 = ψ / α σ02 = 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

Page 39: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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 '� − �5(s� Σ r -� − �5 '� − �5(s

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

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

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

However:

�5 = � ��

Page 40: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

So:

� �Σ�5 = � �ΣΣ� �� = 1� = $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 )� �ΣΣ� �� − � �ΣΣ� ��,

4�Σ� = -� − �5 )� � �� − � � ��, = -� − �5 )� � − 1�, = -� − �5 )� � − $5%,

Page 41: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Dividing µb / ψ by α to isolate σ02 we have:

4�Σ� = -� − �5 $5%��� � � �} − 1

��� = -� − �5 $5% )� �5 − 1,

Substituting, we have:

$�% = $ % + $#% + 24�Σ�

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

$�% = $ % + ) -� − �5,% '$ % − $5%( + 2 -$5%� − �5 )� �5 − 1,

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* :

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

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,

Page 42: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

$ % − $ ∗%. 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:

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

Minimum Tracking-Error Variance

Minimum Variance

Page 43: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility
Page 44: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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.

min12 ���7�� − 2���8� + $ %

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,

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

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 Σ ,

(reminding that on the n upper lines will be the assets that will compose the

portfolio), 8 ∈ ℝ���,

ω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� + $ % + : - − : ���� + : � + :% − :%����

Page 45: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

And the optimality conditions given by:

KC!��, :"K�� = 2��� 7 − 28� − : � − :%� = 0

KC!��, :"K: = - − ��� � + � = 0

KC!�� , :"K:% = 1 − ��′� = 0

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

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

Solving in ωp:

2��� 7 = 28� + : � + :%�

��� = 12 7� '28� + : � + :%�(

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

P12 7� '28� + : � + :%�(� = � + -12 7� '28� + : � + :%�(� = 1 O P12 ��7� '28� + : � + :%�( = � + -12 ��7� '28� + : � + :%�( = 1 O

P12 ��7� 28� + 12 ��7� ': � + :%�( = � + -12 ��7� 28� + 12 ��7� ': � + :%�( = 1 O

Page 46: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

P��7� 8� + 12 ��7� ': � + :%�( = � + -��7� 8� + 12 ��7� ': � + :%�( = 1 O

���7� ': � + :%�( = 2'� + - − ��7� 8� (��7� ': � + :%�( = 2'1 − ��7� 8� ( O Q��Σ� � ��Σ� e��Σ� � ��Σ� eS Q: :%S = Q2'� + - − ��7� 8� (2'1 − ��7� 8� ( S

Denoting:

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

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

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

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:

��� = 12 7� '28� + : � + :%�(

Page 47: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

Being:

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

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

Page 48: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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 V C P 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

Page 49: Portfolio Optimization Subject to Restrictions on Tracking-Error Volatility

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