MCPcopy Create free account
hub / github.com/JoinQuant/jqfactor_analyzer / quantize_factor

Function quantize_factor

jqfactor_analyzer/prepare.py:14–91  ·  view source on GitHub ↗

计算每期因子分位数 参数 ---------- factor_data : pd.DataFrame - MultiIndex 一个 DataFrame, index 为日期 (level 0) 和资产(level 1) 的 MultiIndex, values 包括因子的值, 各期因子远期收益, 因子分位数, 因子分组(可选), 因子权重(可选) quantiles : int or sequence[float] 在因子分组中按照因子值大小平均分组的组数。 或分位数

(
    factor_data, quantiles=5, bins=None, by_group=False, no_raise=False, zero_aware=False,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

test_quantize_factorFunction · 0.90
get_clean_factorFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_quantize_factorFunction · 0.72