克隆策略

单因子分析

版本v1.0

1、新建空白可视化策略

2、从左侧的模块列表“用户模块”——“共享模块”中拖入“单因子分析”模块,输入指定的因子表达式和回测起止时间

3、计算后可以获取指定因子在测试时间段内:

  • 月度因子暴露值: 按月度频率使用全市场股票数据计算因子暴露值
  • 因子暴露时序序列:按月度频率使用全市场股票数据计算的因子暴露值序列
  • 指定因子与九大类因子的相关系数:九大类因子分别为规模因子、成长因子、贝塔因子、流动性因子、杠杆因子、价值因子、反转因子、动量因子和波动性因子
  • 因子暴露值在各行业的分布:各行业内股票计算各行业的因子暴露值
  • 因子的Rank_IC值序列:按月度频率使用全市场股票数据计算因子的Rank_IC值序列
  • 因子分组收益:按股票因子值降序排列,利用因子值的分位数将全市场股票分为5组,计算分别持有5组股票组合的净值曲线
  • 多空组合收益:按股票因子值降序排列,利用因子值的分位数将全市场股票分为5组,计算做多第一组股票同时做空第五组股票(多空组合)的净值曲线
  • 因子收益:按月度频率使用全市场股票数据计算每月的因子收益
  • 因子收益t检验:对因子收益计算t检验统计量的值

    {"Description":"实验创建于2017/8/26","Summary":"","Graph":{"EdgesInternal":[],"ModuleNodes":[{"Id":"-10","ModuleId":"BigQuantSpace.single_factor_analysis.single_factor_analysis-v4","ModuleParameters":[{"Name":"factor","Value":"market_cap_0","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"start_date","Value":"2016-01-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2018-12-31","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[],"OutputPortsInternal":[{"Name":"data","NodeId":"-10","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":2,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true}],"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions><NodePosition Node='-10' Position='-12,96,200,200'/></NodePositions><NodeGroups /></DataV1>"},"IsDraft":true,"ParentExperimentId":null,"WebService":{"IsWebServiceExperiment":false,"Inputs":[],"Outputs":[],"Parameters":[{"Name":"交易日期","Value":"","ParameterDefinition":{"Name":"交易日期","FriendlyName":"交易日期","DefaultValue":"","ParameterType":"String","HasDefaultValue":true,"IsOptional":true,"ParameterRules":[],"HasRules":false,"MarkupType":0,"CredentialDescriptor":null}}],"WebServiceGroupId":null,"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions></NodePositions><NodeGroups /></DataV1>"},"DisableNodesUpdate":false,"Category":"user","Tags":[],"IsPartialRun":true}
    In [3]:
    # 本代码由可视化策略环境自动生成 2020年4月28日 14:37
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m2 = M.single_factor_analysis.v4(
        factor='market_cap_0',
        start_date='2016-01-01',
        end_date='2018-12-31'
    )
    
    [2020-04-28 14:30:1588055415] INFO: factor_df loaded
    [2020-04-28 14:30:1588055425] INFO: processed_df loaded
    [2020-04-28 14:30:1588055426] INFO: ols loaded
    [2020-04-28 14:30:1588055434] INFO: factor_industry_dist_df loaded
    [2020-04-28 14:30:1588055439] INFO: rank_IC loaded
    [2020-04-28 14:33:1588055589] INFO: LIQUIDITY factor completed
    [2020-04-28 14:35:1588055740] INFO: REVERSAL factor completed
    [2020-04-28 14:35:1588055742] INFO: benchmark_factors_df completed
    [2020-04-28 14:37:1588055835] INFO: benchmark_factors_df resampled
    [2020-04-28 14:37:1588055835] INFO: benchmark_factors_df processed
    [2020-04-28 14:37:1588055836] INFO: corr_process loaded