Brinson-Fachler#
Decomposes a portfolio’s active return against a benchmark into allocation, selection and interaction effects per segment and per date, then links them across time (see Multi-period linking).
Segments#
By default every ticker is its own segment. Set segment_map_file_name to a ticker,segment
CSV in the input directory to group tickers (for example by GICS sector). Asset weights and
returns are aggregated per side: a segment’s weight is the sum of its assets’ weights and its
return is their weight-averaged return, so the portfolio and the benchmark can earn different
returns in the same segment. The map is static: a ticker keeps one segment for the whole window.
A segment whose long and short weights net to (almost) zero has no defined return on that date. If
its P&L also nets to (almost) zero the segment is left out that day; otherwise the run stops, naming
the segment and the date, because the P&L would be lost: split the long and short legs into separate
segments. In particular, a dollar-neutral pair mapped to one segment stops the run unless its legs are
split into separate segments.
Cash is a segment. Net weights that sum below 1 are topped up with cash_ticker (default
CASH), which needs no price file and returns 0; a price file named after it is ignored, with a
warning. Net weights above 1 are rejected. Every benchmark constituent with a non-zero weight on some
date is priced, held by the portfolio or not; a constituent whose weight is 0 throughout is ignored
and needs no price file. Cash and the pricing of the benchmark universe apply to the textbook formula
only: elsewhere cash_ticker is an ordinary ticker priced from its file.
Formulas#
With segment weights \(w_{p,i}\), \(w_{b,i}\), segment returns \(R_{p,i}\), \(R_{b,i}\) and total benchmark return \(R_b = \sum_i w_{b,i} R_{b,i}\):
Their sum over segments equals \(R_p - R_b\) on every date. The library requires each side’s weights to sum to 1 (within \(10^{-6}\)) and checks the reconciliation, raising if the difference exceeds \(10^{-10} + 2 \cdot 10^{-6}\,|R_b|\). It also raises on a non-finite return, naming the segment and the date.
Missing returns: a segment the portfolio does not hold takes \(R_{p,i} = R_{b,i}\) (only allocation remains); a segment outside the benchmark takes \(R_{b,i} = R_{p,i}\) (its excess is allocation). A held name with a missing return counts as 0 in its segment. Warnings count the weighted segment-dates with no return on either side, and the substitutions made on a weighted side.
The first price date has no return (returns are percentage changes of prices), so the textbook attribution starts on the second price date. A weights date with no price row (for example a market holiday) has no return either: it is skipped, with a warning, rather than counted as a flat period.
The holdings-based benchmark return is compared with the benchmark returns file; a warning names the number of dates where they differ by more than 1 bp, which usually means the benchmark weights file does not cover the whole benchmark.
Multi-period linking#
Each date’s effects add up to that date’s active return. Their cumulative values are linked per
linking_method (carino by default) so that they add up to the compounded active return; see
Multi-period linking for the methods, a worked example and the numerical safeguards.
Legacy formula (deprecated)#
brinson_fachler_formula = legacy (custom in the Python API is an alias) reproduces the
asset-level numbers of 0.3.x and earlier: allocation \((w_p - w_b)\,w_b r\), selection
\((w_p - w_b)\,w_p r\), interaction as the remainder. It lacks the comparison with the total
benchmark return and is kept only for reproducibility. It is asset level: the segment map is ignored
and every ticker is its own group. It adds no cash, prices only the portfolio’s own tickers, accepts
weights slightly above 1, keeps the first price date and is never linked.
Implementation#
The PyArrow-based implementation lives in
BrinsonFachlerArrowAttribution,
implementing
BrinsonFachlerArrowInterface
(spelled Brinston before 0.4.0; the old names were removed in 0.5.0). Called directly, BrinsonFachlerArrowAttribution defaults to the textbook formula and needs
each side’s weights to sum to 1: implied cash is added by the pipeline (main()), not by the class.
See Brinson-Fachler for the full API reference, and
Conventions and limitations for the weight timing, cash and the known limitations.
Enable this methodology by setting brinson_fachler_method = yes in
attribution_analysis_parameters.xlsx (see Configuration Reference). The textbook formula is the
default; choose the other with brinson_fachler_formula.