we are doing it on the estimated return-that is, we are finding sources of the estimated return. The bigger the difference is between the estimated return and the officially reported return, the less relevant the sources are for the official return. In practice, we address the problem of a nonzero residual by first measuring the residual and then reporting it. If we think that the residual is small enough to tolerate, we distribute the residual across all the sources of return. In the next section we explain, briefly, an algorithm behind the distribution of the error. An Algorithm to Align Official and Estimates of Portfolio Returns Where applicable, managers should compute the residual term on as frequent a basis as possible. In the case of daily return attribution we would compute, each day, the difference between the portfolio's one-day officially reported return and the estimate of the one-day return that is generated from portfolio positions and constituent total returns. In general, the smaller the time period is over which a portfolio's return is computed, the smaller the residual term. The reason for this is that as the portfolio's return horizon grows, so does the likelihood that intraperiod trades and cash flows will occur. Let RES(£) represent the residual term computed for the return period t - 1 through t. Our objective is to make the residual zero in such a way as to minimize any effect on the computed sources of return. If we are running return attribution based on a factor model, then sources of return are from K factors and 1 specific term. Since the specific term consists of the sum of N asset-level specific contributions, we have a total of K + N sources. In variance analysis, sources of return start at the asset level and are then aggregated depending on whether we are interested in contributions by industry, sector, country, or other. The precise number of sources depends on whether we are running variance analysis on the managed, benchmark, or active portfolio. Our goal is to distribute the residual term to as many sources as possible. Assume that an active portfolio has Q sources of return. In practice, the number of unique assets in the managed and benchmark portfolios usually drive the number of sources. For example, if we apply a three-factor model to a portfolio that is managed against the S&P 500, then we may have somewhere around 503 sources of return. Our algorithm works as follows: 1. Each day compute the portfolio's estimated return and obtain the officially reported return from the official books and records. 2. Compute RES(t), which is the difference between the official and estimated portfolio returns. 3. Compute d = KES(t)/Q. This is the maximum amount that we can change any one contribution. 4. Add d to each contribution such that the following do not change: (1) the sign of the original contributions and (2) the ranking of the original contributions.