rebalance#
tradeexecutor.strategy.pandas_trader.rebalance module.
Module description#
Alpha model rebalancing.
Based on the new alpha model weights, rebalance the existing portfolio.
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. |
|
Calculate the existing portfolio weights. |
|
Get the weight diffs. |
|
Rebalance a portfolio based on alpha model weights. |