Market-neutral construction (labtrader/neutral.py)
Long the top of a cross-sectional ranking, short the bottom, equal dollars each
side. The signal is a parameter, not baked in — because the argument for this
is Grinold's law, IR = IC × √breadth, and our momentum implied an IC of
0.020 (a perfectly normal quant IC) against a breadth of ~50. The signal was
never the problem. Fifty uncorrelated signals at that same IC would give IR 1.0.
Two bugs this exposed, both real.
The book did not stay neutral. Dollar-neutral at entry decays asymmetrically:
a losing short grows as a share of the book while a losing long shrinks. On
a 21-session calendar this drifted to $103k net short on $100k of capital and
took NAV to −$12,091. Selection now stays on the slow calendar (turnover is
expensive) while the hedge is trued up whenever net exposure exceeds a
drift_band of NAV. Real neutral books rebalance the hedge continuously for
exactly this reason.
SimPortfolio had no margin logic. A long-only book cannot lose more than it
invests, so this never mattered. With shorts it matters enormously — simulating
losses no broker would have permitted produces numbers that are not merely
wrong but unfalsifiable, since no real path reaches them. margin_call() now
liquidates when equity falls below 25% of gross, and ReplayResult.margin_calls
records it. Any non-zero count means the run hit a wall and everything after
it is a different experiment.
Result
| book | return | vol | Sharpe | beta | maxDD | turn | MC |
|---|---|---|---|---|---|---|---|
| long-only momentum | +519.0% | 22.3% | 1.04 | 0.96 | 30.1% | 3.7x | 0 |
| L/S momentum 12-1 | −49.9% | 22.1% | −0.25 | −0.14 | 55.9% | 8.0x | 1 |
| L/S reversal 5d | +0.9% | 17.1% | 0.09 | 0.08 | 32.0% | 31.3x | 0 |
| L/S low volatility | −45.2% | 17.3% | −0.31 | −0.31 | 51.2% | 5.2x | 1 |
| L/S combined | −40.9% | 20.1% | −0.20 | 0.05 | 55.8% | 6.3x | 1 |
| buy-and-hold SPY | +242.7% |
Beta collapsed from 0.96 to roughly zero — the construction works. The variance reduction did not arrive with it: volatility stayed near 20% rather than falling to the ~6% the argument assumed, because the short leg brings its own risk rather than merely cancelling the long leg's.
And the alpha is negative. Shorting the bottom of a momentum ranking in a decade-long bull market loses money, which is not a subtle finding. Three of five books hit margin calls.