复制链接
克隆策略

    {"description":"实验创建于2020/2/14","graph":{"edges":[{"to_node_id":"-5617:features","from_node_id":"-70:data"},{"to_node_id":"-33:factors_info","from_node_id":"-5617:save_data"}],"nodes":[{"node_id":"-70","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"-1 * correlation(sum((close_0 * volume_0), 2) / sum(volume_0, 2), volume_0, 2)","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":"-5617","module_id":"BigQuantSpace.factorlens.factorlens-v2","parameters":[{"name":"title","value":"因子分析: {factor_name}","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2020-01-01","type":"Literal","bound_global_parameter":"交易日期"},{"name":"end_date","value":"2021-12-31","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":"中证800","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":"沪深300","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":"-5617"},{"name":"user_factor_data","node_id":"-5617"}],"output_ports":[{"name":"data","node_id":"-5617"},{"name":"save_data","node_id":"-5617"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-33","module_id":"BigQuantSpace.factorlens_preservation.factorlens_preservation-v2","parameters":[{"name":"factor_fields","value":"# 定义因子名称\n# {\n# \"列名\": {'name': \"因子名\", 'desc': \"因子描述\"},\n# \"列名\": {'name': \"因子名\", 'desc': \"因子描述\"},\n# ... \n# }\n{}\n","type":"Literal","bound_global_parameter":null},{"name":"table","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"factors_info","node_id":"-33"}],"output_ports":[{"name":"data","node_id":"-33"}],"cacheable":false,"seq_num":3,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-70' Position='282,197,200,200'/><node_position Node='-5617' Position='295,303,200,200'/><node_position Node='-33' Position='301.6540222167969,399.0682678222656,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [1]:
    # 本代码由可视化策略环境自动生成 2021年12月4日 10:57
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.input_features.v1(
        features='-1 * correlation(sum((close_0 * volume_0), 2) / sum(volume_0, 2), volume_0, 2)'
    )
    
    m2 = M.factorlens.v2(
        features=m1.data,
        title='因子分析: {factor_name}',
        start_date=T.live_run_param('trading_date', '2020-01-01'),
        end_date=T.live_run_param('trading_date', '2021-12-31'),
        rebalance_period=5,
        delay_rebalance_days=0,
        rebalance_price='close_0',
        stock_pool='中证800',
        quantile_count=5,
        commission_rate=0.0016,
        returns_calculation_method='累乘',
        benchmark='沪深300',
        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'
    )
    
    m3 = M.factorlens_preservation.v2(
        factors_info=m2.save_data,
        factor_fields=# 定义因子名称
    # {
    #     "列名": {'name': "因子名", 'desc': "因子描述"},
    #     "列名": {'name': "因子名", 'desc': "因子描述"},
    #     ... 
    # }
    {}
    ,
        table=''
    )
    

    因子分析: -1 * correlation(sum((close_0 * volume_0), 2) / sum(volume_0, 2), volume_0, 2)

    { "type": "factor-track", "data": { "exprs": ["-1 * correlation(sum((close_0 * volume_0), 2) / sum(volume_0, 2), volume_0, 2)"], "options": {"BacktestInterval": ["2020-01-01", "2021-12-31"], "Benchmark": "000300.HIX", "StockPool": "in_csi800_0", "UserDataMerge": "left", "DropSTStocks": 1, "DropPriceLimitStocks": 1, "DropNewStocks": 60, "DropSuspendedStocks": 1, "QuantileCount": 5, "CommissionRates": 0.0016, "Normalization": 1, "Neutralization": "industry,size", "DelayRebalanceDays": 0, "RebalancePeriod": 5, "RebalancePeriodsReturns": 0, "RebalancePrice": "close_0", "ReturnsCalculationMethod": "cumprod", "FactorCoverage": 0.5, "_HASH": "60eec6809441a7e4eacb210f178d073c"} } }

    因子表现概览

      累计收益 近1年收益 近3月收益 近1月收益 近1周收益 昨日收益 最大回撤 盈亏比 胜率 夏普比率 收益波动率
    最小分位 -25.59% -11.47% 0.18% 3.25% 0.45% -0.35% 38.91% 0.95 0.45 -1.76 10.78%
    最大分位 -17.25% -11.31% -4.17% 0.23% -1.17% -1.21% 30.16% 0.99 0.46 -1.28 10.33%
    多空组合 -5.22% -0.10% 2.22% 1.49% 0.81% 0.43% 9.25% 0.90 0.49 -1.95 3.27%

    基本特征分析

    IC分析

    0.01

    0.04

    0.21

    55.43%

    买入信号重合分析

    因子估值分析

    因子拥挤度分析

    因子值最小的20只股票 (2021-12-02)

    股票名称 股票代码 因子值
    美的集团 000333.SZA -1.0000
    信维通信 300136.SZA -1.0000
    许继电气 000400.SZA -1.0000
    光环新网 300383.SZA -1.0000
    中国核建 601611.SHA -1.0000
    深圳能源 000027.SZA -1.0000
    云南白药 000538.SZA -1.0000
    杰瑞股份 002353.SZA -1.0000
    新华网 603888.SHA -1.0000
    江西铜业 600362.SHA -1.0000
    北大荒 600598.SHA -1.0000
    重庆燃气 600917.SHA -1.0000
    养元饮品 603156.SHA -1.0000
    无锡银行 600908.SHA -1.0000
    宏大爆破 002683.SZA -1.0000
    光迅科技 002281.SZA -1.0000
    国投电力 600886.SHA -1.0000
    江苏租赁 600901.SHA -1.0000
    永辉超市 601933.SHA -1.0000
    贵州百灵 002424.SZA -1.0000

    因子值最大的20只股票 (2021-12-02)

    股票名称 股票代码 因子值
    掌趣科技 300315.SZA 1.0000
    万华化学 600309.SHA 1.0000
    中兴通讯 000063.SZA 1.0000
    三六零 601360.SHA 1.0000
    太极实业 600667.SHA 1.0000
    人民网 603000.SHA 1.0000
    苏州银行 002966.SZA 1.0000
    康弘药业 002773.SZA 1.0000
    南京银行 601009.SHA 1.0000
    招商南油 601975.SHA 1.0000
    中国通号 688009.SHA 1.0000
    万达信息 300168.SZA 1.0000
    芒果超媒 300413.SZA 1.0000
    济川药业 600566.SHA 1.0000
    步长制药 603858.SHA 1.0000
    白云山 600332.SHA 1.0000
    华谊集团 600623.SHA 1.0000
    苏宁环球 000718.SZA 1.0000
    新天绿能 600956.SHA 1.0000
    百联股份 600827.SHA 1.0000