modular_trader.framework.portfolio_construction.equal#
Classes#
Assigns equal weight to all signals. Liquidates positions no longer in signals. |
Module Contents#
- class modular_trader.framework.portfolio_construction.equal.EqualWeightPortfolioConstruction#
Bases:
modular_trader.framework.portfolio_construction.base.BasePortfolioConstruction
Assigns equal weight to all signals. Liquidates positions no longer in signals.
- run(context: modular_trader.context.Context, signals: modular_trader.signal.SignalCollection) collections.abc.Iterable[modular_trader.allocation.Allocation] #
Must be implemented by subclasses.
Called by __call__ to perform portfolio construction.
- Parameters:
context (modular_trader.context.Context)
signals (modular_trader.signal.SignalCollection)
- Return type:
collections.abc.Iterable[modular_trader.allocation.Allocation]