A factor signal becomes a portfolio only after a decision rule says which stocks to hold. “High momentum and low volatility” and “high momentum or low volatility” use the same two signals, but their trading behavior is not a cosmetic implementation detail.
Wang, Rachev, and Fabozzi translate those screens into Boolean functions, then expand them into single-signal and interaction exposures. The same coefficients explain turnover—except for a subtle second factor: how much of the universe the rule holds.
A screen is a Boolean function
A literal is a yes-or-no statement such as “this stock ranks above the median on momentum.” Encode a favorable answer as 1 and an unfavorable one as 0. AND is an intersection, OR is a union, and a decision-tree leaf is simply an AND of the conditions along its path.
Recode each literal as a sign, 2x−1. Products of those signs form the Walsh basis: order one is a single signal, order two is a pairwise interaction, and so on. The tested TypeScript computes every coefficient exactly; Python and C++ are faithful translations.
def walsh_coefficients(table):
n = len(table).bit_length() - 1
out = []
for mask in range(len(table)):
total = 0.0
for state, value in enumerate(table):
character = 1
for bit in range(n):
if mask & (1 << bit):
character *= 1 if state & (1 << bit) else -1
total += value * character
out.append(total / len(table))
return outPersistence multiplies with order
If each literal has month-to-month persistence ρ, an interaction among d independent literals has persistence ρᵈ. At ρ=0.9, a first-order exposure retains 0.9 persistence, a pair retains 0.81, and a triple retains 0.729. Higher-order coordinates therefore flip more often even before portfolio construction enters.
The paper's turnover identity separates a rule's logic from its coverage. Its profile turnover is a coefficient-squared weighted average of 1−ρ across interactions. One-way turnover multiplies that quantity by 1−coverage, the share of the universe outside the leg.
| Rule | Signals | Realized turnover | Predicted turnover |
|---|---|---|---|
| AND | 1 | 0.101 | 0.102 |
| AND | 3 | 0.254 | 0.256 |
| AND | 5 | 0.485 | 0.474 |
| OR | 1 | 0.101 | 0.102 |
| OR | 3 | 0.052 | 0.049 |
| OR | 5 | 0.015 | 0.014 |
The interaction premium faces a cost wall
A premium is the average return associated with an exposure. A quoted half-spread is half the distance between the best ask and bid, used here as a transparent proxy for one-way trading cost. In the paper's 1995–2024 sample, average absolute premia fall as interaction order rises while average spread costs rise.
| Order | N | 1 − persistence | Turnover | |Premium| / mo | Cost / mo | |Premium| > cost |
|---|---|---|---|---|---|---|
| 1 signal | 12 | 0.204 | 0.264 | 5.42 bp | 4.82 bp | 58.3% |
| 2 signals | 66 | 0.371 | 0.432 | 3.47 bp | 7.51 bp | 24.2% |
| 3 signals | 220 | 0.507 | 0.551 | 2.56 bp | 9.47 bp | 5.9% |
Where the clean identity can mislead
The multiplication rule assumes literals move independently across signals. The authors test where that fails and still find close average predictions, but the largest dependence groups show larger errors. A live implementation should estimate joint flips rather than assume the product rule is exact.
What to probe next
Re-run the decomposition after adding entry and exit buffers, then compare threshold rules with smooth rank scores at the same risk and gross exposure. The paper predicts that smoothing helps most at higher interaction orders, but proportional costs and leverage constraints can reverse simple conclusions about which score trades less.
The logic connects directly to the site's decision-treepage: every leaf is a conjunction of threshold literals. The Walsh view is also a linear basis expansion, so the coefficient interpretation carries naturally to linear regression.
References
- Wang, Z., Rachev, S. T., and Fabozzi, F. J. (2026). The Logic of Factor Portfolios: Boolean Rules, Interactions, and Trading Costs. arXiv:2611.09834
- O'Donnell, R. (2014). Analysis of Boolean Functions. Cambridge University Press
- Novy-Marx, R., and Velikov, M. (2016). A Taxonomy of Anomalies and Their Trading Costs. Review of Financial Studies 29(1)