Performance Attribution for Equity Portfolios

Many portfolio managers measure performance with reference to a benchmark. The difference in return between a portfolio and its benchmark is the active return of the portfolio. Portfolio managers and their clients want to know what caused this active return. Performance attribution decomposes the active return. The two most common approaches are the Brinson-Hood-Beebower (hereafter referred to as the Brinson model) and a regression-based analysis. Portfolio managers use different variations of the two models to assess the performance of their portfolios. Managers of fixed income portfolios include yield-curve movements in the model Lord (1997) while equity managers who focus on the effect of currency movements use variations of the Brinson model to incorporate “local risk premium” Singer and Karnosky (1995). In contrast, in this paper we focus on attribution models for equity portfolios without considering any currency effect. The pa package provides tools for conducting both methods for equity portfolios. The Brinson model takes an ANOVA-type approach and decomposes the active return of any portfolio into asset allocation, stock selection, and interaction effects. The regression-based analysis utilizes estimated coefficients from a linear model to attribute active return to different factors. After describing the Brinson and regression approaches and demonstrating their use via the pa package, we show that the Brinson model is just a special case of the regression approach.


Introduction
Many portfolio managers measure performance with reference to a benchmark.The difference in return between a portfolio and its benchmark is the active return of the portfolio.Portfolio managers and their clients want to know what caused this active return.Performance attribution decomposes the active return.The two most common approaches are the Brinson-Hood-Beebower (hereafter referred to as the Brinson model) and a regression-based analysis. 1 Portfolio managers use different variations of the two models to assess the performance of their portfolios.Managers of fixed income portfolios include yield-curve movements in the model Lord (1997) while equity managers who focus on the effect of currency movements use variations of the Brinson model to incorporate "local risk premium" Singer and Karnosky (1995).In contrast, in this paper we focus on attribution models for equity portfolios without considering any currency effect.
The pa package provides tools for conducting both methods for equity portfolios.The Brinson model takes an ANOVA-type approach and decomposes the active return of any portfolio into asset allocation, stock selection, and interaction effects.The regression-based analysis utilizes estimated coefficients from a linear model to attribute active return to different factors.After describing the Brinson and regression approaches and demonstrating their use via the pa package, we show that the Brinson model is just a special case of the regression approach.

Data
We demonstrate the use of the pa package with a series of examples based on real-world data sets from MSCI Barra's Global Equity Model II(GEM2). 2MSCI Barra is a leading provider of investment decision support tools to investment institutions worldwide.According to the company: GEM2 is the latest Barra global multi-factor equity model.It provides a foundation for investment decision support tools via a broad range of insightful analytics for developed and emerging market portfolios.The latest model version provides: • Improved accuracy of risk forecasts and increased explanatory power.
• An intuitive structure that accommodates different investment processes in developed vs. emerging markets.
• Greater responsiveness to market dynamics.
• Comprehensive market coverage.
GEM2 leverages the decades of experience that MSCI Barra has in developing and maintaining global equity multi-factor models and indices, and offers important enhancements over GEM, which is utilized by hundreds of institutional fund managers worldwide.
The original data set contains selected attributes such as industry, size, country, and various style factors for a universe of approximately 48,000 securities on a monthly basis.
For illustrative purposes, this article uses three modified versions of the original data set, containing 3000 securities, namely year, quarter, and jan.The data frame, quarter, is a subset of year, containing the data of the first quarter.The data frame, jan, is a subset of quarter with the data from January, 2010.
• name: name of a security.
• return: monthly total return in trading currency.
• date: the starting date of the month to which the data belong.
• sector: consolidated sector categories based on the GICS. 3 • momentum: capture sustained relative performance.
• value: capture the extent to which a stock is priced inexpensively in the market.
• size: differentiate between large and small cap companies.
• cap.usd: capitalization in model base currency USD.
• yield: dividend of a security.
3 Global Industry Classification Standard • country: the country in which the company is traded.
• currency: currency of exposure.
• portfolio: top 200 securities based on value scores in January are selected as portfolio holdings and are held through December 2010.This is to avoid the complexity of trading in the analyses.
• benchmark: top 1000 securities based on size each month.The benchmark is cap-weighted.
Here is a sample of rows and columns from the data frame year: The portfolio has 200 equal-weighted holdings.The row for Canadian Imperial Bank of Commerce indicates that it is one of the 200 portfolio holdings with a weight of 0.5% in 2010.Its return was 2.61% in August, and almost flat in November.

Single-Period Brinson Model
Consider an equity portfolio manager who uses the S&P 500 as the benchmark.In a given month, she outperformed the S&P by 3%.Part of that performance was due to the fact that she allocated more weight of the portfolio to certain sectors that performed well.Call this the allocation effect.Part of her outperformance was due to the fact that some of the stocks she selected did better than their sector as a whole.Call this the selection effect.The residual can then be attributed to an interaction between allocation and selection -the interaction effect.The Brinson model provides mathematical definitions for these terms and methods for calculating them.
The example above uses sector as the classification scheme when calculating the allocation effect.But the same approach can work with any other variable which places each security into one, and only one, discrete category: country, industry, and so on.In fact, a similar approach can work with continuous variables that are split into discrete ranges: the highest quintile of market cap, the second highest quintile and so forth.For generality, we will use the term "category" to describe any classification scheme which places each security in one, and only one, category. Notations: • w B i is the weight of security i in the benchmark.• w P i is the weight of security i in the portfolio.• W B j is the weight of category j in the benchmark.
• W P j is the weight of a category j in the portfolio.W P j = w P i , i ∈ j.
• The sum of the weight w B i , w P i , W B j , and W P j is 1, respectively.• r i is the return of security i.
• R B j is the return of a category j in the benchmark.R B j = w B i r i , i ∈ j.
• R P j is the return of a category j in the portfolio.
The return of a portfolio, R P , can be calculated in two ways: • On an individual security level by summing over n stocks: R P = n i=1 w P i r i .
• On a category level by summing over N categories: R P = N j=1 W P j R P j .
Similar definitions apply to the return of the benchmark, R B , Active return of a portfolio, R active , is a performance measure of a portfolio relative to its benchmark.The two conventional measures of active return are arithmetic and geometric.The pa package implements the arithmetic measure of the active return for a single-period Brinson model because an arithmetic difference is more intuitive than a ratio over a single period.
The arithmetic active return of a portfolio, R active , is the portfolio return R P less the benchmark return R B : Since the category allocation of the portfolio is generally different from that of the benchmark, allocation plays a role in the active return, R active .The same applies to stock selection where assuming that the portfolio has the exact same categorical exposures as the benchmark does, equities within each category are different.This contributes to R active as well.Allocation effect R allocation and selection effect R selection over N categories are defined as: The intuition behind the allocation effect is that a portfolio would produce different returns with different allocation schemes (W P j vs. W B j ) while having the same stock selection and thus the same return (R B j ) for each category.The difference between the two returns, caused by the allocation scheme, is called the allocation effect (R allocation ).Similarly, two different returns can be produced when two portfolios have the same allocation (W B j ) yet dissimilar returns due to differences in stock selection within each category (R p j vs. R B j ).This difference is the selection effect (R selection ).
Interaction effect, R interaction , is the result of subtracting return due to allocation R allocation and return due to selection R selection from the active return R active :

Weakness of the Brinson Model
The Brinson model allows portfolio managers to analyze the relative return of a portfolio using any attribute of a security, such as country or sector.One weakness of the model is to expand the analysis beyond two categories. 4As the number of categories increases, this procedure is subject to the curse of dimensionality.
Suppose an equity portfolio manager wants to find out the contributions of any two categories (for instance, country and sector) to her portfolio based on the Brinson model.She can decompose the active return into three broad terms -R allocation , R selection , and R interaction .The allocation effect can be further split into country allocation effect, sector allocation effect and the product of country and sector allocation effects: R allocation = R country allocation + R sector allocation + R country allocation R sector allocation .Specifically, the country allocation effect is the return caused by the difference between the actual country allocation and the benchmark country allocation while assuming the same benchmark return within each level of the category country, that is, where • C W P j and C W B j refer to the weight of each country j (N C countries in total) in the portfolio and that in the benchmark, respectively.
• C R B j refers to the benchmark return of any country j.Similarly, the sector allocation effect is the difference in return between a portfolio's sector allocation and the benchmark's sector allocation while having the same benchmark returns: S W P j and S W B j refer to the weight of the sector j in the portfolio and the weight of the sector j in the benchmark, respectively.S R B j is the benchmark return of any given sector j of all N S sectors.
In the same vein, the return as a result of the selection effect R selection is the sum of country selection effect, sector selection effect, and the product of country and sector selection effects: The interaction effect, R interaction , includes the interaction between country allocation and sector selection and that between country selection and sector allocation.
Therefore, in the case of Q categories where Q > 1, the Brinson model becomes very complex (assume Q ≥ 3): where R allocationj is the allocation effect of any given category j, j ∈ Q and R selectionj is the selection effect of any given category j, j ∈ Q. i, j, k have different values.
As the number of categories grows, the numbers of terms for the allocation and the selection effects grow exponentially.Q categories will result in 2 Q − 1 terms for each of the allocation and selection effect.
Due to the interaction between allocation and selection of each of the Q categories (it could be interaction between 2, 3 or even all Q categories), the number of terms included in the interaction effect grows exponentially to take into all the interaction effects among all categories.
For instance, when there are 3 categories, the allocation effect and the selection effect each have 2 3 −1 = 7 terms.The interaction effect has 2 6 −2 4 +1 = 49 terms.When there are 4 categories, 2 4 − 1 = 15 terms have to be estimated for the allocation effect as well as the selection effect, respectively.2 8 − 2 5 + 1 = 225 terms have to be calculated for the interaction effect of 4 categories.This poses a significant computational challenge when a portfolio manager performs a multivariate Brinson analysis.
To some extent, the regression-based model detailed later solves the problem of multivariate attribution.

Single-Period Brinson Tools
Brinson analysis is run by calling the function brinson to produce an object of class brinson.Below we show the tools provided in the pa package to analyze a single period portfolio based on the Brinson model.
> data(jan) > br.single <-brinson(x = jan, date.var= "date", + cat.var = "sector", + bench.weight= "benchmark", + portfolio.weight= "portfolio", + ret.var = "return") The data frame, jan, contains all the information necessary to conduct a single-period Brinson analysis.date.var,cat.var, and return identify the columns containing the date, the factor to be analyzed, and the return variable, respectively.bench.weightand portfolio.weightspecify the name of the benchmark weight column and that of the portfolio weight column in the data frame.
Calling summary on the resulting object br.single of class brinson reports essential information about the input portfolio (including the number of securities in the portfolio and the benchmark as well as sector exposures) and the results of the Brinson analysis.The br.single summary shows that the active return of the portfolio, in January, 2010 was 1.47%.This return can be decomposed into allocation effect (-0.14%), selection effect (1.42%), and interaction effect (0.19%).
Figure 1 is a visual representation of the return of both the portfolio and the benchmark sector by sector in January, 2010.This plot shows that in absolute terms, Utilities performed the best with a gain of more than 5% and Consumer Discretionary, the worst performing sector, lost more than 10%.Utilities was also the sector with the highest active return in the portfolio.

Multi-Period Brinson Model
To obtain Brinson attribution on a multi-period data set, one calculates allocation, selection and interaction within each period and aggregates them across time.There are five methods for this -arithmetic, geometric, optimized linking by Menchero (2004), linking by Davies and Laker (2001), and linking by Frongello (2002).We focus on the first three methods in this paper.Arithmetic measure calculates relative performance of a portfolio and its benchmark by a difference; geometric measure does so by a ratio.Arithmetic measure is more intuitive but a well-known challenge in arithmetic attribution is that active returns do not add up over multiple periods due to geometric compounding. 5eometric is able to circumvent the adding-up problem.Menchero (2004) discussed various linking algorithms to connect arithmetic return with geometric return and argued that the optimized linking algorithm is the best way to link attribution over time.
Arithmetic Attribution.The arithmetic attribution model calculates active return and contributions due to allocation, selection, and interaction in each period and sums them over multiple periods.The arithmetic active return over T periods R arithmetic is expressed as: and R active t is the active return in a single period t.Geometric Attribution.The geometric attribution is to compound various returns over T periods where, and R P t and R B t are portfolio and benchmark returns in a single period t, respectively.Geometric return R geometric is thus the difference between R p and R B : Optimized Linking Algorithm.The well-known challenge faced in arithmetic attribution is that the actual active return over time is not equal to the arithmetic summation of single-period active returns, Menchero (2004) proposed an optimized linking coefficient b opt to link arithmetic returns of individual periods with geometric returns over time, where b opt t is the optimized linking coefficient in a single period t.The optimized linking coefficient b opt t is the summation of a natural scaling A and an adjustment a t specific to a time period t, where A is an coefficient for linking from the single-period to the multi-period return and a t is an adjustment to eliminate residuals6 .
Since active return over time R P − R B is a summation of active return in each period adjusted to the optimized linking algorithm, the following is true: where , and R interaction t represent allocation, selection and interaction in each period t, respectively.
Within each period t, the adjusted attribution is thus expressed as Therefore, across T periods, active return R active , the difference between portfolio return R P and benchmark return R B , can be written as where R active = R P − R B .

Multi-Period Brinson Tools
In practice, analyzing a single-period portfolio is meaningless as portfolio managers and their clients are more interested in the performance of a portfolio over multiple periods.To apply the Brinson model over time, we can use the function brinson and input a multi-period data set (for instance, quarter) as shown below.
> exposure(br.multi,var = "size") The exposure method on the class br.multi object shows the exposure of the portfolio and the benchmark based on a user-defined category.Here, it shows the exposure on size.We can see that the portfolio overweights the benchmark in the lowest quintile in size and underweights in the highest quintile.
> returns(br.multi,type = "linking") The returns method shows the results of the Brinson analysis applied to the data from January, 2010 through March, 2010.The optimized linking algorithm is applied here by setting the type to linking.The first portion of the returns output shows the Brinson attribution in individual periods.The second portion shows the aggregate attribution results.The portfolio formed by top 200 value securities in January had an active return of 12.7% over the first quarter of 2010.The allocation and the selection effects contributed 0.95% and 1.73% respectively; the interaction effect made a loss of 1.42%.Figure 2 depicts the returns of both the portfolio and the benchmark of the allocation effect from January, 2010 through March.2010.This plot shows that for the portfolio, Utilities performed the best with a gain of more than 5% in January and February, 2010 but tanked in March, 2010.

Single-Period Regression Model
One advantage of a regression-based approach is that such analysis allows one to define their own attribution model by easily incorporating multiple variables in the regression formula.These variables can be either discrete or continuous.
Suppose a portfolio manager wants to find out how much each of the value, growth, and momentum scores of her holdings contributes to the overall performance of the portfolio.Consider the following linear regression without the intercept term based on a single-period portfolio of n securities with k different variables: where • r n is a column vector of length n.Each element in r n represents the return of a security in the portfolio.
• X n,k is an n by k matrix.Each row represents k attributes of a security.There are n securities in the portfolio.
• f k is a column vector of length k.The elements are the estimated coefficients from the regression.Each element represents the factor return of an attribute.
• u n is a column vector of length n with residuals from the regression.
In the case of this portfolio manager, suppose that she only has three holdings in her portfolio.r 3 is thus a 3 by 1 matrix with returns of all her three holdings.The matrix X 3,3 records the score for each of the three factors (value, growth, and momentum) in each row.f 3 contains the estimated coefficients of a regression r 3 on X 3,3 .
The active exposure of each of the k variables, X i , i ∈ k, is expressed as where X i is the value representing the active exposure of the attribute i in the portfolio, w active is a column vector of length n containing the active weight of every security in the portfolio, and x n,i is a column vector of length n with attribute i for all securities in the portfolio.Active weight of a security is defined as the difference between the portfolio weight of the security and its benchmark weight.
Using the example mentioned above, the active exposure of the attribute value, X value is the product of w active (containing active weight of each of the three holdings) and x 3 (containing value scores of the three holdings).
The contribution of a variable i, R i , is thus the product of the factor returns for the variable i, f i and the active exposure of the variable i, X i .That is, Continuing the example, the contribution of value is the product of f value (the estimated coefficient for value from the linear regression) and X value (the active exposure of value as shown above).
Therefore, the active return of the portfolio R active is the sum of contributions of all k variables and the residual u (a.k.a. the interaction effect), For instance, a hypothetical portfolio has three holdings (A, B, and C), each of which has two attributes -size and value.
Following the procedure as mentioned, the factor returns for size and value are -0.0313 and -0.1250.The active exposure of size is 0.32 and that of value is 0.80.The active return of the portfolio is -11% which can be decomposed into the contribution of size and that of value based on the regression model.Size contributes 1% of the negative active return of the portfolio and value causes the portfolio to lose the other 10.0%.

Single-Period Regression Tools
Another conventional attribution methodolody is the regression-based analysis.As mentioned, the pa package provides tools to analyze both single-period and multi-period data frames.
> rb.single <-regress(jan, date.var= "date", + ret.var = "return", + reg.var = c("sector", "growth", + "size"), + benchmark.weight= "benchmark", + portfolio.weight= "portfolio") > exposure(rb.single,var = "growth") reg.var specifies the columns containing variables whose contributions are to be analyzed.Calling exposure with a specified var yields information on the exposure of both the portfolio and the benchmark by that variable.If var is a continuous variable, for instance, growth, the exposure will be shown in 5 quantiles.Majority of the high value securities in the portfolio in January have relatively low growth scores.The summary method shows the number of securities in the portfolio and the benchmark, and the contribution of each input variable according to the regression-based analysis.In this case, the portfolio made a loss of 2.91% and the benchmark lost 4.38%.Therefore, the portfolio outperformed the benchmark by 1.47%.Sector, growth, and size contributed 0.32%, 0.05%, and 0.29%, respectively.

Multi-Period Regression Model
The same challenge of linking arithmetic and geometric returns is present in multi-period regression model.We apply the optimized linking algorithm proposed by Menchero (2000) in the regression attribution as well.
Within each period t, where R i,t represents the contribution of a variable i of the time period t and u t is the residual in that period.Across T periods, the active return can be expressed by a product of the optimized linking coefficient b opt t and the individual contribution of each of the k attributes.The adjusted contribution of each of the k variables i, Ri,t , is expressed by Thus, the overall active return R active can be decomposed into where U is the residual across T periods.

Multi-Period Regression Tools
> rb.multi <-regress(quarter, date.var= "date", + ret.var = "return", + reg.var = c("sector", "growth", + "size"), + benchmark.weight= "benchmark", + portfolio.weight= "portfolio") > rb.multi Regression-based analysis can be applied to a multi-period data frame by calling the same method regress.By typing the name of the class object rb.multi directly, a short summary of the analysis is provided, showing the starting and ending period of the analysis, the methodology, and the average number of securities in both the portfolio and the benchmark.The regression-based summary shows that the contribution of each input variable in addition to the basic information on the portfolio.The summary suggests that the active return of the portfolio in year 2010 is 1.27%.The Residual number indicates the contribution of the interaction among various variables including sector, growth, and growth.
Visual representation of relative performance of a portfolio against its benchmark is best viewed across a longer time span.Here, we use the data frame year for illustrative purposes.
Figure 3 displays both the cumulative portfolio and benchmark returns from January, 2010 through December, 2010.It suggests that the portfolio, consisted of high value securities in January, consistently outperformed the benchmark in 2010.Outperformance in May and June helped the overall positive active return in 2010 to a large extent.

Brinson as Regression
Another way to think about the analysis as Brinson et al. (1986) have done is to consider it in the context of a regression model.Conducting a Brinson attribution is similar to running a linear regression without the intercept term.Estimated coefficients will then be the mean return of each category of the attributed specified in the universe, a.k.a. the factor return of each category.The mean return of each category also appears in the Brinson analysis.The equivalent to the allocation effect for the universe in the Brinson model is the sum of the product of the estimated coefficient and the active weight of each category.
Using the same regression model as before, where W P is a column vector indicating the portfolio weight of each category within the attributed specified by the manager; W B , a column vector indicating the benchmark weight of each category, and f is the column vector which has benchmark return of all the categories.Assuming that in this case, the benchmark is the universe and the portfolio holdings are all from the benchmark, R B can be estimated by regressing returns on the attribute specified by the portfolio manager:

where
• r n is a column vector of length n.Each element in r n represents the return of a security in the portfolio.
• X n,p is an n by p matrix where n refers to the number of securities in the portfolio and p refers to the number of levels within the attribute specified.
• f is the estimated coefficients on the regression without the intercept term.
The estimated coefficient of each attribute is the mean return for each of the attribute.
• U is the column vector with all the residual terms.
Since R B is the same as f , the allocation effect in the Brinson model is a special case of the regression approach.
In order to estimate the selection effect in the Brinson model, one can calculate the mean return of each category within the attribute in both the portfolio and the benchmark under a regression framework and use the benchmark weights to calculate the selection effect.
where W B is the column vector with the benchmark weight of each category within the attribute specified; f P and f B are the column vectors indicating the mean return of the portfolio and that of the benchmark, respectively.As mentioned above, f P and f B can be estimated by running a linear regression without the intercept term with respect to stocks in the portfolio and benchmark separately.Hence, the selection effect in the Brinson model can be calculated by using linear regression.
Interaction effect is the difference between a portfolio's actual return and the sum of the allocation and selection effects.
An numerical example of showing that the Brinson model is a special case of the regression approach is as follows.
Suppose that an equity portfolio manager has a portfolio named test with the universe as the benchmark.When we apply the standard single-period Brinson anaysis, we obtain an active return of -35.9 bps which can be further decomposed into allocation (-3.4 bps), selection (-42.5 bps), and interaction (10.1 bps).
We can also show the allocation effect by running a regression model based on sector only.The contribution from sector based on the regression approach (-3.4 bps) matches the allocation effect from the Brinson model as shown above.
However, in order to calculate the selection effect from the regression approach, we need to apply another regression model to a universe limited to the securities held in the portfolio.Using the factor returns from the regress class object, test.reg, and those from the linear regression, we can obtain the selection effect (-42.5 bps) via the regression approach.

Conclusion
In this paper, we describe two widely-used methods for performance attribution -the Brinson model and the regression-based approach, and provide a simple collection of tools to implement these two methods in R with the pa package.We also show that the Brinson model is a special case of the regression method.
A comprehensive package, portfolio Enos and Kane (2006), provides facilities to calculate exposures and returns for equity portfolios.It is possible to use the pa package based on the output from the portfolio package.Further, the flexibility of R itself allows users to extend and modify these packages to suit their own needs and/or execute their preferred attribution methodology.Before reaching that level of complexity, however, pa provides a good starting point for basic performance attribution.