quantlab.factor.predefined.barra#
Barra-style risk-factor exposures in the manner of MSCI’s USE4 model.
A style factor describes one characteristic that explains part of how a stock’s return moves with others: its size, its sensitivity to the market (beta), its momentum and so on. A stock’s exposure to a style is a number saying how much of that characteristic it has, standardized across stocks so that exposures of different styles are comparable. Each style is built from one or more descriptors, raw measurements such as the log of market capitalization.
Exposures are standardized over an estimation universe (ESTU), here the
estimation_universe_size largest companies by the previous bar’s market
cap, each firm counted once (a secondary share class is never in it),
re-ranked every bar inside the graph: on every bar the cap-weighted
mean exposure of the universe is 0 and the equally weighted standard
deviation is 1. Symbols outside the universe are shifted and scaled by the
same numbers, so every symbol with data gets an exposure.
It outputs USE4’s styles: Size (descriptor LNCAP), Beta (BETA), Momentum (RSTR), Residual Volatility (DASTD, CMRA, HSIGMA), Non-linear Size, Non-linear Beta, Liquidity (STOM, STOQ, STOA), Dividend Yield (YILD), Book-to-Price (BTOP), Earnings Yield (ETOP, CETOP), Leverage (MLEV, DTOA, BLEV) and Growth (EGRO, SGRO), as described in Menchero, Orr and Wang, The Barra US Equity Model (USE4), Methodology Notes (MSCI, 2011), and its Empirical Notes, Appendix A.
Deviations from USE4, the first four because Sharadar sells no analyst forecasts or preferred-equity field:
Earnings Yield has no EPFWD (forward earnings): it is the trailing CETOP and ETOP only, their USE4 weights renormalized;
Growth has no EGRLF (analyst long-term growth): it is the historical EGRO and SGRO only, their USE4 weights renormalized;
CETOP’s cash earnings, which MSCI does not define, are trailing net income to common plus depreciation and amortization;
preferred equity is taken as 0 in MLEV and BLEV;
EGRO and SGRO divide the slope by the mean absolute annual value, not the signed “average annual earnings per share” of the Empirical Notes (p.53): a negative average would flip the growth sign of a loss-making company. Our choice.
Each descriptor first has its outliers treated on its own distribution
(Methodology Notes §2.2, p.8): over the estimation universe, a value more
than data_error_sigma equally weighted standard deviations from the
equally weighted mean is dropped as a data error and one beyond
clip_sigma is trimmed to that bound. It is then standardized
(§2.3, p.9, eq. 2.4).
A secondary share class (GOOG beside GOOGL) has no market cap or
fundamentals of its own in Sharadar; it takes its firm’s, as named by
firm_column, so its Size, valuation and growth exposures are the firm’s
while its returns, volume and dividends stay its own.
A style still missing for a symbol (no descriptor at all) is imputed from a per-bar weighted regression of the style on industry and Size, fitted in the estimation universe, as USE4 does; every style is then standardized once more. The symbol’s point-in-time industry code is passed through.
A style with several descriptors is their fixed-weight sum over the descriptors a symbol has, the weights renormalized over those present, so a symbol missing one descriptor still gets the style. Residual Volatility is orthogonalized to Beta (Empirical Notes p.16 and p.52): it is replaced by its residual from a per-bar weighted least-squares regression, with an intercept, on Beta, fitted in the estimation universe and applied to every symbol, so it has zero weighted correlation with Beta there. Non-linear Size follows the text’s order (p.55): the Size exposure is cubed, orthogonalized to Size the same way, then has its outliers treated and is standardized; Non-linear Beta likewise with Beta. The outlier step comes after the orthogonalization, so these two are close to, not exactly, uncorrelated with their regressors.
A symbol with no price on a bar (price_column NaN) has NaN in every
descriptor and style there, as in Alpha101Stock/Alpha158Stock and
MarketDataset.tradable_bars. Only the outputs are masked, after every
cross-sectional step, so a delisted security keeps no exposure while the
estimation universe statistics and the priced symbols’ values are unchanged.
A halted stock loses its exposures on its halt days.
Classes
USE4-style exposures: standardized descriptors and style factors. |
|
Formula parameters for |