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, which is 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).
Prices. Momentum is computed on the series passed to
init(Map): they must be split and dividend adjusted, or a 2:1 split
inside the window reads as −50% and the name is shorted. With the
survivorship-aware engine, which needs unadjusted prices for cash
accounting, use the price-pair overload
PortfolioBacktester.run(strategy, unadjusted, adjusted, ...): the
strategy then receives the adjusted copy.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordMomentum strategy settings. -
Constructor Summary
ConstructorsConstructorDescriptionCrossSectionalMomentum(PointInTimeUniverse universe, CrossSectionalMomentum.Config config) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PortfolioStrategy
init
-
Constructor Details
-
CrossSectionalMomentum
-
-
Method Details
-
name
- Specified by:
namein interfacePortfolioStrategy
-
init
- Specified by:
initin interfacePortfolioStrategy
-
targetWeights
Description copied from interface:PortfolioStrategyTarget weights by symbol decided at barindex's close; when they fill is the engine'sfillPolicy(next open by default).- Specified by:
targetWeightsin interfacePortfolioStrategy
-