复制链接
克隆策略

    {"description":"实验创建于2020/2/14","graph":{"edges":[{"to_node_id":"-3626:features","from_node_id":"-70:data"},{"to_node_id":"-3619:factors_info","from_node_id":"-3626:save_data"}],"nodes":[{"node_id":"-70","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\nmean(close_0, 44) / close_0 - 1","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-70"}],"output_ports":[{"name":"data","node_id":"-70"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-3619","module_id":"BigQuantSpace.factorlens_preservation.factorlens_preservation-v2","parameters":[{"name":"factor_fields","value":"# 定义因子名称\n# {\n# \"列名\": {'name': \"因子名\", 'desc': \"因子描述\"},\n# \"列名\": {'name': \"因子名\", 'desc': \"因子描述\"},\n# ... \n# }\n{\"mean(close_0, 44) / close_0 - 1\": {'name': \"动量因子\", 'desc': \"mean(close_0, 44) / close_0 - 1\"}}\n","type":"Literal","bound_global_parameter":null},{"name":"table","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"factors_info","node_id":"-3619"}],"output_ports":[{"name":"data","node_id":"-3619"}],"cacheable":false,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"-3626","module_id":"BigQuantSpace.factorlens.factorlens-v2","parameters":[{"name":"title","value":"因子分析","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2019-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2023-03-03","type":"Literal","bound_global_parameter":null},{"name":"rebalance_period","value":"5","type":"Literal","bound_global_parameter":null},{"name":"delay_rebalance_days","value":0,"type":"Literal","bound_global_parameter":null},{"name":"rebalance_price","value":"close_0","type":"Literal","bound_global_parameter":null},{"name":"stock_pool","value":"全市场","type":"Literal","bound_global_parameter":null},{"name":"quantile_count","value":5,"type":"Literal","bound_global_parameter":null},{"name":"commission_rate","value":0.0016,"type":"Literal","bound_global_parameter":null},{"name":"returns_calculation_method","value":"累乘","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"无","type":"Literal","bound_global_parameter":null},{"name":"drop_new_stocks","value":60,"type":"Literal","bound_global_parameter":null},{"name":"drop_price_limit_stocks","value":"True","type":"Literal","bound_global_parameter":null},{"name":"drop_st_stocks","value":"True","type":"Literal","bound_global_parameter":null},{"name":"drop_suspended_stocks","value":"True","type":"Literal","bound_global_parameter":null},{"name":"cutoutliers","value":"True","type":"Literal","bound_global_parameter":null},{"name":"normalization","value":"True","type":"Literal","bound_global_parameter":null},{"name":"neutralization","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E8%A1%8C%E4%B8%9A%22%2C%22displayValue%22%3A%22%E8%A1%8C%E4%B8%9A%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%B8%82%E5%80%BC%22%2C%22displayValue%22%3A%22%E5%B8%82%E5%80%BC%22%2C%22selected%22%3Afalse%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"metrics","value":"%7B%22enumItems%22%3A%5B%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E8%A1%A8%E7%8E%B0%E6%A6%82%E8%A7%88%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E8%A1%A8%E7%8E%B0%E6%A6%82%E8%A7%88%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E5%88%86%E5%B8%83%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E5%88%86%E5%B8%83%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E8%A1%8C%E4%B8%9A%E5%88%86%E5%B8%83%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E8%A1%8C%E4%B8%9A%E5%88%86%E5%B8%83%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E5%B8%82%E5%80%BC%E5%88%86%E5%B8%83%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E5%B8%82%E5%80%BC%E5%88%86%E5%B8%83%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22IC%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22IC%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E4%B9%B0%E5%85%A5%E4%BF%A1%E5%8F%B7%E9%87%8D%E5%90%88%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22%E4%B9%B0%E5%85%A5%E4%BF%A1%E5%8F%B7%E9%87%8D%E5%90%88%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E4%BC%B0%E5%80%BC%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E4%BC%B0%E5%80%BC%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E6%8B%A5%E6%8C%A4%E5%BA%A6%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E6%8B%A5%E6%8C%A4%E5%BA%A6%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%9B%A0%E5%AD%90%E5%80%BC%E6%9C%80%E5%A4%A7%2F%E6%9C%80%E5%B0%8F%E8%82%A1%E7%A5%A8%22%2C%22displayValue%22%3A%22%E5%9B%A0%E5%AD%90%E5%80%BC%E6%9C%80%E5%A4%A7%2F%E6%9C%80%E5%B0%8F%E8%82%A1%E7%A5%A8%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E8%A1%A8%E8%BE%BE%E5%BC%8F%E5%9B%A0%E5%AD%90%E5%80%BC%22%2C%22displayValue%22%3A%22%E8%A1%A8%E8%BE%BE%E5%BC%8F%E5%9B%A0%E5%AD%90%E5%80%BC%22%2C%22selected%22%3Atrue%7D%2C%7B%22value%22%3A%22%E5%A4%9A%E5%9B%A0%E5%AD%90%E7%9B%B8%E5%85%B3%E6%80%A7%E5%88%86%E6%9E%90%22%2C%22displayValue%22%3A%22%E5%A4%9A%E5%9B%A0%E5%AD%90%E7%9B%B8%E5%85%B3%E6%80%A7%E5%88%86%E6%9E%90%22%2C%22selected%22%3Atrue%7D%5D%7D","type":"Literal","bound_global_parameter":null},{"name":"factor_coverage","value":0.5,"type":"Literal","bound_global_parameter":null},{"name":"user_data_merge","value":"left","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features","node_id":"-3626"},{"name":"user_factor_data","node_id":"-3626"}],"output_ports":[{"name":"data","node_id":"-3626"},{"name":"save_data","node_id":"-3626"}],"cacheable":true,"seq_num":4,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-70' Position='441,313,200,200'/><node_position Node='-3619' Position='332,604,200,200'/><node_position Node='-3626' Position='417,434,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [3]:
    # 本代码由可视化策略环境自动生成 2023年3月3日 13:27
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.input_features.v1(
        features="""
    # #号开始的表示注释,注释需单独一行
    # 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征
    mean(close_0, 44) / close_0 - 1"""
    )
    
    m4 = M.factorlens.v2(
        features=m1.data,
        title='因子分析',
        start_date='2019-01-01',
        end_date='2023-03-03',
        rebalance_period=5,
        delay_rebalance_days=0,
        rebalance_price='close_0',
        stock_pool='全市场',
        quantile_count=5,
        commission_rate=0.0016,
        returns_calculation_method='累乘',
        benchmark='无',
        drop_new_stocks=60,
        drop_price_limit_stocks=True,
        drop_st_stocks=True,
        drop_suspended_stocks=True,
        cutoutliers=True,
        normalization=True,
        neutralization=['行业'],
        metrics=['因子表现概览', '因子分布', '因子行业分布', '因子市值分布', 'IC分析', '买入信号重合分析', '因子估值分析', '因子拥挤度分析', '因子值最大/最小股票', '表达式因子值', '多因子相关性分析'],
        factor_coverage=0.5,
        user_data_merge='left'
    )
    
    m3 = M.factorlens_preservation.v2(
        factors_info=m4.save_data,
        factor_fields=# 定义因子名称
    # {
    #     "列名": {'name': "因子名", 'desc': "因子描述"},
    #     "列名": {'name': "因子名", 'desc': "因子描述"},
    #     ... 
    # }
    {"mean(close_0, 44) / close_0 - 1": {'name': "动量因子", 'desc': "mean(close_0, 44) / close_0 - 1"}}
    ,
        table=''
    )
    

    因子分析

    { "type": "factor-track", "data": { "exprs": ["mean(close_0, 44) / close_0 - 1"], "options": {"BacktestInterval": ["2019-01-01", "2023-03-03"], "Benchmark": "none", "StockPool": "all", "UserDataMerge": "left", "DropSTStocks": 1, "DropPriceLimitStocks": 1, "DropNewStocks": 60, "DropSuspendedStocks": 1, "QuantileCount": 5, "CommissionRates": 0.0016, "Cutoutliers": 1, "Normalization": 1, "Neutralization": "industry", "DelayRebalanceDays": 0, "RebalancePeriod": 5, "RebalancePeriodsReturns": 0, "RebalancePrice": "close_0", "ReturnsCalculationMethod": "cumprod", "FactorCoverage": 0.5, "_HASH": "98512027633cfdea9e3026ba1d7f3a16"} } }

    因子表现概览

      累计收益 近1年收益 近3月收益 近1月收益 近1周收益 昨日收益 最大回撤 盈亏比 胜率 夏普比率 收益波动率
    最小分位 -88.08% -47.69% -11.36% -0.74% -0.48% 0.74% 89.74% 0.82 0.46 -2.40 22.49%
    最大分位 -30.17% -8.37% 5.26% 2.66% -0.19% 0.64% 58.15% 0.91 0.51 -0.40 24.04%
    多空组合 -59.27% -24.91% -8.27% -1.66% -0.15% 0.05% 59.80% 0.85 0.39 -4.09 6.30%

    基本特征分析

    IC分析

    0.06

    0.12

    0.50

    87.06%

    买入信号重合分析

    因子估值分析

    因子拥挤度分析

    因子值最小的20只股票 (2023-03-01)

    股票名称 股票代码 因子值
    中航电测 300114.SZA -0.5261
    海天瑞声 688787.SHA -0.4674
    浩瀚深度 688292.SHA -0.3690
    鸿博股份 002229.SZA -0.3549
    浪潮信息 000977.SZA -0.3548
    剑桥科技 603083.SHA -0.3468
    万辰生物 300972.SZA -0.3427
    三变科技 002112.SZA -0.3141
    金冠电气 688517.SHA -0.3071
    晋拓股份 603211.SHA -0.2976
    凯龙高科 300912.SZA -0.2944
    德源药业 832735.BJA -0.2923
    昆仑万维 300418.SZA -0.2800
    拓尔思 300229.SZA -0.2793
    拓维信息 002261.SZA -0.2786
    三六零 601360.SHA -0.2724
    迈得医疗 688310.SHA -0.2707
    汤姆猫 300459.SZA -0.2682
    永安行 603776.SHA -0.2600
    太辰光 300570.SZA -0.2579

    因子值最大的20只股票 (2023-03-01)

    股票名称 股票代码 因子值
    聚辰股份 688123.SHA 0.1343
    豆神教育 300010.SZA 0.1346
    中天金融 000540.SZA 0.1358
    德宏股份 603701.SHA 0.1360
    百克生物 688276.SHA 0.1368
    禾川科技 688320.SHA 0.1379
    宝明科技 002992.SZA 0.1393
    恩捷股份 002812.SZA 0.1396
    东方电缆 603606.SHA 0.1410
    国联股份 603613.SHA 0.1431
    聚光科技 300203.SZA 0.1433
    康龙化成 300759.SZA 0.1485
    维科技术 600152.SHA 0.1490
    绿康生化 002868.SZA 0.1528
    亿纬锂能 300014.SZA 0.1543
    翰宇药业 300199.SZA 0.1610
    万里石 002785.SZA 0.1629
    诺诚健华-U 688428.SHA 0.2080
    明冠新材 688560.SHA 0.2951
    奥联电子 300585.SZA 0.3329