克隆策略

    {"description":"实验创建于2020/2/14","graph":{"edges":[{"to_node_id":"-60:user_factor_data","from_node_id":"-21:data"},{"to_node_id":"-60:features","from_node_id":"-83:data"}],"nodes":[{"node_id":"-21","module_id":"BigQuantSpace.datahub_load_datasource.datahub_load_datasource-v1","parameters":[{"name":"table","value":"alpha_10503","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"20190101","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"20210901","type":"Literal","bound_global_parameter":null},{"name":"instruments","value":"# #号开始的表示注释,注释需单独一行\n# 每行一条\n","type":"Literal","bound_global_parameter":null},{"name":"fields","value":"# #号开始的表示注释,注释需单独一行\n# 每行一条\n","type":"Literal","bound_global_parameter":null}],"input_ports":[],"output_ports":[{"name":"data","node_id":"-21"}],"cacheable":false,"seq_num":4,"comment":"","comment_collapsed":true},{"node_id":"-60","module_id":"BigQuantSpace.factorlens.factorlens-v2","parameters":[{"name":"title","value":"因子分析: {factor_name}","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2019-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2019-12-31","type":"Literal","bound_global_parameter":null},{"name":"rebalance_period","value":22,"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":"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%3Atrue%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":"-60"},{"name":"user_factor_data","node_id":"-60"}],"output_ports":[{"name":"data","node_id":"-60"},{"name":"save_data","node_id":"-60"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-83","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"ta_sma_60_0","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-83"}],"output_ports":[{"name":"data","node_id":"-83"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-21' Position='314.92848205566406,190.1253204345703,200,200'/><node_position Node='-60' Position='188.39238739013672,320.97064208984375,200,200'/><node_position Node='-83' Position='26.990341186523438,186.99127197265625,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [70]:
    # 本代码由可视化策略环境自动生成 2021年10月9日 10:59
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m4 = M.datahub_load_datasource.v1(
        table='alpha_10503',
        start_date='20190101',
        end_date='20210901',
        instruments="""# #号开始的表示注释,注释需单独一行
    # 每行一条
    """,
        fields="""# #号开始的表示注释,注释需单独一行
    # 每行一条
    """
    )
    
    m2 = M.input_features.v1(
        features='ta_sma_60_0'
    )
    
    m1 = M.factorlens.v2(
        features=m2.data,
        user_factor_data=m4.data,
        title='因子分析: {factor_name}',
        start_date='2019-01-01',
        end_date='2019-12-31',
        rebalance_period=22,
        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,
        normalization=True,
        neutralization=['行业', '市值'],
        metrics=['因子表现概览', '因子分布', '因子行业分布', '因子市值分布', 'IC分析', '买入信号重合分析', '因子估值分析', '因子拥挤度分析', '因子值最大/最小股票', '表达式因子值', '多因子相关性分析'],
        factor_coverage=0.5,
        user_data_merge='left'
    )
    

    读取数据(DataSource) 数据统计 (前 2527969 行) </font></font>

    date instrument ta_sma_60_0
    count(Nan) 0 0 52387
    type datetime64[ns] category float32

    读取数据(DataSource) 数据预览 (前 5 行) </font></font>

    date instrument ta_sma_60_0
    0 2019-01-02 000001.SZA 1120.987793
    1 2019-01-03 000001.SZA 1118.683105
    2 2019-01-04 000001.SZA 1117.422729
    3 2019-01-07 000001.SZA 1117.206665
    4 2019-01-08 000001.SZA 1116.054321

    因子分析: ta_sma_60_0

    { "type": "factor-track", "data": { "exprs": ["ta_sma_60_0"], "options": {"BacktestInterval": ["2019-01-01", "2019-12-31"], "Benchmark": "none", "StockPool": "all", "UserDataMerge": "left", "DropSTStocks": 1, "DropPriceLimitStocks": 1, "DropNewStocks": 60, "DropSuspendedStocks": 1, "QuantileCount": 5, "CommissionRates": 0.0016, "Normalization": 1, "Neutralization": "industry,size", "DelayRebalanceDays": 0, "RebalancePeriod": 22, "RebalancePeriodsReturns": 0, "RebalancePrice": "close_0", "ReturnsCalculationMethod": "cumprod", "FactorCoverage": 0.5, "_HASH": "ffb2f8fbecb7cab66758ee29aeedc167"} } }

    因子表现概览

      累计收益 近1年收益 近3月收益 近1月收益 近1周收益 昨日收益 最大回撤 盈亏比 胜率 夏普比率 收益波动率
    最小分位 0.24% 0.24% -4.97% 5.14% 2.01% 0.59% 26.40% 0.71 0.59 -0.04 21.52%
    最大分位 11.54% 11.54% -2.05% 6.33% 2.28% 0.80% 23.02% 0.87 0.56 0.47 22.03%
    多空组合 -5.26% -5.26% -1.51% -0.56% -0.13% -0.11% 5.27% 0.71 0.45 -5.29 1.72%

    基本特征分析

    IC分析

    0.03

    0.03

    0.83

    70.00%

    买入信号重合分析

    因子估值分析

    因子拥挤度分析

    因子值最小的20只股票 (2019-12-30)

    股票名称 股票代码 因子值
    重庆钢铁 601005.SHA 1.9020
    中远海发 601866.SHA 2.5748
    中国一重 601106.SHA 2.8763
    招商南油 601975.SHA 2.8843
    海油发展 600968.SHA 2.9370
    吉林高速 601518.SHA 2.9664
    中国中冶 601618.SHA 3.1007
    秦港股份 601326.SHA 3.3245
    龙江交通 601188.SHA 3.3786
    中国铝业 601600.SHA 3.4820
    力帆股份 601777.SHA 3.5263
    白银有色 601212.SHA 3.5664
    际华集团 601718.SHA 3.6118
    中国广核 003816.SZA 3.7360
    北辰实业 601588.SHA 3.7933
    广西广电 600936.SHA 3.8538
    广州港 601228.SHA 3.8809
    中国西电 601179.SHA 3.9151
    嘉泽新能 601619.SHA 3.9468
    广深铁路 601333.SHA 3.9946

    因子值最大的20只股票 (2019-12-30)

    股票名称 股票代码 因子值
    豫园股份 600655.SHA 1591.9062
    长春高新 000661.SZA 1640.4613
    福耀玻璃 600660.SHA 1737.8302
    万华化学 600309.SHA 1768.4532
    平安银行 000001.SZA 1776.9872
    伊利股份 600887.SHA 2159.9673
    五粮液 000858.SZA 2262.0859
    天宸股份 600620.SHA 2686.2310
    大众交通 600611.SHA 2718.7874
    泸州老窖 000568.SZA 2729.2544
    恒瑞医药 600276.SHA 3867.2944
    华鑫股份 600621.SHA 4008.9080
    万科A 000002.SZA 4126.6182
    云赛智联 600602.SHA 4336.2812
    老凤祥 600612.SHA 6209.9204
    贵州茅台 600519.SHA 8601.9102
    格力电器 000651.SZA 9451.8398
    方正科技 600601.SHA 19963.3281
    申华控股 600653.SHA 20671.0449
    飞乐音响 600651.SHA 25051.0957