StandardFactorToWeightFunctions#
-
class sigtech.framework.strategies.equity_factor_basket.StandardFactorToWeightFunctions
Class containing references to standard factor to weight conversion functions.
-
CAP_WEIGHTED = <sigtech.framework.strategies.equity_factor_basket.CapWeightedFactorToWeight object>
-
DEFAULT(factor_weights: Optional[dict] = None, z_score: bool = False, proportion: Optional[float] = None, long_only: bool = False, **kwargs) Series
Default factor to weight function - This creates a linear combination of factors.
If
proportion
is not passed, stock weights are proportional to the sum of the input factor loadings. Ifproportion
is passed, the topproportion
% of stocks are given weights of1
and the bottomproportion
% are given weights of-1
. Iflong_only=True
(defaultFalse
) the negative weights are truncated.- Parameters:
factors – Factor indexed
pd.DataFrame
of stock loadings. Stocks as columns.factor_weights – Optional dictionary of factor weights. Keys should match
factors
index.z_score – Boolean of whether to normalise stock-factor loadings before combination. This allows different factors to be put onto the same scale. Default is
False
.proportion – Optional, proportion for long/short allocations.
long_only – If
proportion
is passed withlong_only=True
, only the topproportion
% are returned with positive values and the negative mirror image is removed. Iflong_only=False
both the positive and negative weights are returned. Ifproportion
is not passed this parameter has no effect.
- Returns:
Series of stock weights. Index will be (possibly subset of) columns of
factors
.
-
FACTOR_WEIGHTED(factor_weights: Optional[dict] = None, z_score: bool = False, proportion: Optional[float] = None, long_only: bool = False, **kwargs) Series
Similar to
default_factors_to_weight_function
but weight the stocks proportionally to their summed factor scores.