weighting#
API documentation for tradeexecutor.strategy.weighting Python module in Trading Strategy.
Module description#
Weighting based portfolio manipulation.
Various helper functions to calculate weights for assets, normalise them.
Functions#
|
Check that the sum of weights is good. |
|
If the sum of the weights are not exactly 1, then decrease the largest member to make the same sum 1 precise. |
|
Normalise weight distribution so that the sum of weights is 1. |
|
Use 1/N (position) weighting system to generate portfolio weightings from the raw alpha signals. |
|
Use 1/signal weighting system to generate portfolio weightings from the raw alpha signals. |
|
Give equal weight to every asset, regardless of the signal strength. |
|
Use the given raw weight value as is as the portfolio weight. |