复制链接
克隆策略

    {"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# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\n市值排序无中性化=rank(market_cap_0)","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\n{\"市值排序无中性\": {'name': \"市值排序无中性化\", 'desc': \"rank(market_cap_0)\"}}","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":"2018-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-12-01","type":"Literal","bound_global_parameter":"交易日期"},{"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":"10","type":"Literal","bound_global_parameter":null},{"name":"commission_rate","value":"0.0013","type":"Literal","bound_global_parameter":null},{"name":"returns_calculation_method","value":"累乘","type":"Literal","bound_global_parameter":null},{"name":"benchmark","value":"中证500","type":"Literal","bound_global_parameter":null},{"name":"drop_new_stocks","value":"180","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":"False","type":"Literal","bound_global_parameter":null},{"name":"normalization","value":"False","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%3Afalse%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='479.68865966796875,42,200,200'/><node_position Node='-3619' Position='359,301,200,200'/><node_position Node='-3626' Position='415,181,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [3]:
    # 本代码由可视化策略环境自动生成 2022年12月8日 03:41
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.input_features.v1(
        features="""
    # #号开始的表示注释,注释需单独一行
    # 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征
    市值排序无中性化=rank(market_cap_0)"""
    )
    
    m4 = M.factorlens.v2(
        features=m1.data,
        title='因子分析: {市值排序无中性化}',
        start_date='2018-01-01',
        end_date=T.live_run_param('trading_date', '2022-12-01'),
        rebalance_period=5,
        delay_rebalance_days=0,
        rebalance_price='close_0',
        stock_pool='全市场',
        quantile_count=10,
        commission_rate=0.0013,
        returns_calculation_method='累乘',
        benchmark='中证500',
        drop_new_stocks=180,
        drop_price_limit_stocks=True,
        drop_st_stocks=True,
        drop_suspended_stocks=True,
        cutoutliers=False,
        normalization=False,
        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': "因子描述"},
    #     ... 
    # }
    
    {"市值排序无中性": {'name': "市值排序无中性化", 'desc': "rank(market_cap_0)"}},
        table=''
    )
    

    因子分析: rank(market_cap_0)

    { "type": "factor-track", "data": { "exprs": ["rank(market_cap_0)"], "options": {"BacktestInterval": ["2018-01-01", "2022-12-01"], "Benchmark": "000905.HIX", "StockPool": "all", "UserDataMerge": "left", "DropSTStocks": 1, "DropPriceLimitStocks": 1, "DropNewStocks": 180, "DropSuspendedStocks": 1, "QuantileCount": 10, "CommissionRates": 0.0013, "Cutoutliers": 0, "Normalization": 0, "Neutralization": "", "DelayRebalanceDays": 0, "RebalancePeriod": 22, "RebalancePeriodsReturns": 0, "RebalancePrice": "close_0", "ReturnsCalculationMethod": "cumprod", "FactorCoverage": 0.5, "_HASH": "210de0c0d1cd1453f851102e4e0491bf"} } }

    因子表现概览

      累计收益 近1年收益 近3月收益 近1月收益 近1周收益 昨日收益 最大回撤 盈亏比 胜率 夏普比率 收益波动率
    最小分位 -53.23% 1.63% 0.60% 0.08% -0.28% -0.25% 56.59% 0.99 0.45 -1.39 13.45%
    最大分位 -28.93% -10.39% -3.26% -0.09% 0.29% 0.11% 36.37% 1.00 0.46 -1.44 7.24%
    多空组合 -18.99% 6.56% 1.96% 0.08% -0.29% -0.18% 34.50% 0.90 0.51 -0.91 8.38%

    基本特征分析

    IC分析

    -0.03

    0.16

    -0.21

    92.45%

    买入信号重合分析

    因子估值分析

    因子拥挤度分析

    因子值最小的20只股票 (2022-11-30)

    股票名称 股票代码 因子值
    旭杰科技 836149.BJA 0.0002
    殷图网联 835508.BJA 0.0004
    恒合股份 832145.BJA 0.0006
    科创新材 833580.BJA 0.0008
    常辅股份 871396.BJA 0.0014
    华阳变速 839946.BJA 0.0018
    浩淼科技 831856.BJA 0.0020
    志晟信息 832171.BJA 0.0022
    美之高 834765.BJA 0.0024
    沪江材料 870204.BJA 0.0026
    鑫汇科 831167.BJA 0.0028
    大禹生物 871970.BJA 0.0034
    广脉科技 838924.BJA 0.0036
    凯腾精工 871553.BJA 0.0040
    安徽凤凰 832000.BJA 0.0044
    七丰精工 873169.BJA 0.0052
    中设咨询 833873.BJA 0.0054
    恒拓开源 834415.BJA 0.0056
    驱动力 838275.BJA 0.0058
    建邦科技 837242.BJA 0.0062

    因子值最大的20只股票 (2022-11-30)

    股票名称 股票代码 因子值
    中国电信 601728.SHA 0.9962
    中国中免 601888.SHA 0.9964
    邮储银行 601658.SHA 0.9966
    长江电力 600900.SHA 0.9968
    中国石化 600028.SHA 0.9970
    中国神华 601088.SHA 0.9972
    五粮液 000858.SZA 0.9974
    比亚迪 002594.SZA 0.9976
    中国海油 600938.SHA 0.9978
    中国平安 601318.SHA 0.9980
    招商银行 600036.SHA 0.9982
    中国银行 601988.SHA 0.9984
    宁德时代 300750.SZA 0.9986
    中国石油 601857.SHA 0.9988
    农业银行 601288.SHA 0.9990
    中国人寿 601628.SHA 0.9992
    建设银行 601939.SHA 0.9994
    工商银行 601398.SHA 0.9996
    中国移动 600941.SHA 0.9998
    贵州茅台 600519.SHA 1.0000