Conventions and limitations#
The rules the library applies to every input, the names its results use, and what it does not model. Read this before comparing its numbers with another system.
Weight timing#
A weight dated \(t\) is the weight held over day \(t\), from the close of \(t-1\) to the close of \(t\): a start-of-day weight, which is the end-of-day weight of \(t-1\). It multiplies the return of the same date:
Brinson-Fachler, the factor model and the active factor model all pair weights and returns this
way. A weights file that records the book after the close of \(t\) (after that day’s rebalance)
must be shifted one date forward before it is loaded. Otherwise day \(t\) is attributed with a book
that was only held from its close, which is a look-ahead. The Backtest-Engine adapter applies this
shift itself: it uses the engine’s end-of-day Daily_Weights of the previous date (see
From a Backtest-Engine run).
Returns#
Asset returns are simple returns of consecutive prices, so the first price date has no return: textbook Brinson-Fachler starts on the second price date.
A date on which no held asset has a return, such as the first price date in the factor model, gets a null portfolio return, never 0: it is left out of the shares, the linked cumulative views and the summary statistics, and a warning counts such dates. A single held name without a return counts as 0 on that date (see Known limitations).
Factor-file cells are asset-level contributions (exposure times factor return), simple returns unless
factor_return_type = log(see Factor Model).All inputs are aligned to the intersection of their date ranges before any calculation.
Cash#
With the textbook Brinson-Fachler formula, net weights that sum below 1 are topped up with
cash_ticker (default CASH), which returns 0 every day. There is no cash-rate model: interest
earned on cash is not part of the attributed return (in a Backtest-Engine run it is in the
financing column of the implementation table). Outside textbook Brinson-Fachler, a file run
treats cash_ticker as an ordinary ticker priced from its file.
Holdings basis and the implementation table#
Every method attributes the return of the weights it is given at the prices it is given: a holdings return, before commissions, slippage, financing and trade execution. It equals a fund’s NAV return only on days without trading or financing. For a Backtest-Engine run the implementation table reconciles the two on every date:
A file run has no NAV to reconcile against, so AttributionResult.implementation is None.
Names of the residual#
The factor model’s idiosyncratic residual has a different name in each result, kept for compatibility:
Result |
Residual |
|---|---|
|
column |
|
key |
|
column |
|
column |
|
no column: it is the portfolio return minus the columns shown |
Charts and the dashboard |
“Idiosyncratic” |
The vendor file f_idyo_returns is not the residual: it is an aggregate total, which is never
loaded.
Known limitations#
Static segment map. The
ticker,segmentmap is not point-in-time: a ticker keeps one segment for the whole window, so a reclassification (for example a GICS sector change) restates history with the current map.Price gaps. The price files are joined on the union of their dates. When one ticker has a price on a date the others lack, the others have no price that date, hence no return on that date nor on the next one: returns come from consecutive rows and prices are never carried forward. Both methods count a held name without a return as 0 that day, so its move over those two days is lost. This matters most for textbook Brinson-Fachler, which prices the whole benchmark universe together with the portfolio. Keep the price files on one calendar. (The active factor model prices the constituents the portfolio does not hold on the portfolio’s own dates and keeps such moves.)
No forward-fill of weights. Weights files must hold every trading day; the library does not carry an allocation forward from its rebalancing date. A trading day missing from the weights is not attributed, and the loader rejects series that are clearly not daily (see Data Formats).
Cash earns 0 (see Cash).
Menchero linking and geometric attribution are not offered (see Multi-period linking), and the factor model does not split out beta or market timing (see Factor Model).