和顺 / 衡律 返回所属 Agent
10.10

因子检验与用途准入

原能力

完成因子统计检验及用途准入,研究表现不能直接成为交易许可。(合同附件 R7 10.10)

首选项目

Alphalens(Apache-2.0)。 Alphalens

匹配范围

IC/分组分析及实验流程作为候选输入。

源码

Alphalens · def factor_information_coefficient(

alphalens/performance.py · 28–41 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
def factor_information_coefficient(factor_data,
                                   group_adjust=False,
                                   by_group=False):
    """
    Computes the Spearman Rank Correlation based Information Coefficient (IC)
    between factor values and N period forward returns for each period in
    the factor index.

    Parameters
    ----------
    factor_data : pd.DataFrame - MultiIndex
        A MultiIndex DataFrame indexed by date (level 0) and asset (level 1),
        containing the values for a single alpha factor, forward returns for
        each period, the factor quantile/bin that factor value belongs to, and
  • # Copyright 2017 Quantopian, Inc.

Alphalens · def get_clean_factor_and_forward_returns(

alphalens/utils.py · 666–679 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
def get_clean_factor_and_forward_returns(factor,
                                         prices,
                                         groupby=None,
                                         binning_by_group=False,
                                         quantiles=5,
                                         bins=None,
                                         periods=(1, 5, 10),
                                         filter_zscore=20,
                                         groupby_labels=None,
                                         max_loss=0.35,
                                         zero_aware=False,
                                         cumulative_returns=True):
    """
    Formats the factor data, pricing data, and group mappings into a DataFrame
  • # Copyright 2018 Quantopian, Inc.

实现与验收要点

冻结检验、试验账、用途准入、失效和越权控制。