Class CrossSectionalMomentum
- All Implemented Interfaces:
PortfolioStrategy
Momentum definition is the academic standard "12-1":
close(i − skip) / close(i − lookback) − 1 — trailing
lookback bars with the most recent skip bars excluded
(short-term reversal contaminates raw 12-month momentum; Jegadeesh-Titman
1993). Each side is equal-weighted at grossPerSide total, so the
default book is dollar-neutral with 2× gross-per-side exposure.
Why point-in-time matters here specifically: momentum is the
factor survivorship bias flatters most. The stocks that delisted are
disproportionately the past losers a short book would have held — remove
them from the universe and the short side looks artificially safe, while
the long side never picks a name that was about to be acquired away.
Ranking over universe.isMember(symbol, now) and running on the
survivorship-aware overload closes both
gaps (a null universe reproduces the naive everything-always-
tradeable behavior — useful for measuring the bias).
Candidates also need lookback bars of history at the rebalance
bar; earlier bars produce an empty book (the engine holds cash).
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCrossSectionalMomentum(PointInTimeUniverse universe, CrossSectionalMomentum.Config config) -
Method Summary
-
Constructor Details
-
CrossSectionalMomentum
-
-
Method Details
-
name
- Specified by:
namein interfacePortfolioStrategy
-
init
- Specified by:
initin interfacePortfolioStrategy
-
targetWeights
Description copied from interface:PortfolioStrategyTarget weights by symbol as of barindex(decided at that bar's close).- Specified by:
targetWeightsin interfacePortfolioStrategy
-