Interface PortfolioStrategy
- All Known Implementing Classes:
CrossSectionalMomentum
public interface PortfolioStrategy
A multi-asset, weight-based strategy for the
PortfolioBacktester.
All series must be index-aligned (same length, same bar times). Weights are
fractions of current equity: positive = long, negative = short, missing
symbol = flat; |weights| may sum above 1 for leverage.-
Method Summary
Modifier and TypeMethodDescriptionvoiddefault voidPrice-pair initialisation used by the survivorship-aware engine:signalDatais split and dividend adjusted and is what signals must be computed on;tradeDatais the unadjusted series the engine trades on, available for strategies that need actual prices (share-count limits, price filters).name()targetWeights(int index) Target weights by symbol decided at barindex's close; when they fill is the engine'sfillPolicy(next open by default).
-
Method Details
-
name
String name() -
init
-
init
Price-pair initialisation used by the survivorship-aware engine:signalDatais split and dividend adjusted and is what signals must be computed on;tradeDatais the unadjusted series the engine trades on, available for strategies that need actual prices (share-count limits, price filters). The default ignorestradeData. -
targetWeights
-