复制链接
克隆策略

    {"description":"实验创建于2020/2/14","graph":{"edges":[{"to_node_id":"-646:features","from_node_id":"-70:data"}],"nodes":[{"node_id":"-70","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\nsum(where((close_0/close_1 - 1)>0.05,1,0),90)\n","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":"-646","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":"1","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":"False","type":"Literal","bound_global_parameter":null},{"name":"drop_st_stocks","value":"False","type":"Literal","bound_global_parameter":null},{"name":"drop_suspended_stocks","value":"False","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%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":"-646"},{"name":"user_factor_data","node_id":"-646"}],"output_ports":[{"name":"data","node_id":"-646"},{"name":"save_data","node_id":"-646"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-70' Position='441,339,200,200'/><node_position Node='-646' Position='417.6077880859375,425.0412292480469,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [7]:
    # 本代码由可视化策略环境自动生成 2022年9月9日 17:53
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.input_features.v1(
        features="""# #号开始的表示注释,注释需单独一行
    # 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征
    sum(where((close_0/close_1 - 1)>0.05,1,0),90)
    """
    )
    
    m2 = M.factorlens.v2(
        features=m1.data,
        title='因子分析: {factor_name}',
        start_date='2019-01-01',
        end_date='2019-12-31',
        rebalance_period=1,
        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=False,
        drop_st_stocks=False,
        drop_suspended_stocks=False,
        cutoutliers=True,
        normalization=True,
        neutralization=[],
        metrics=['因子表现概览', '因子分布', '因子行业分布', '因子市值分布', 'IC分析', '买入信号重合分析', '因子估值分析', '因子拥挤度分析', '因子值最大/最小股票', '表达式因子值', '多因子相关性分析'],
        factor_coverage=0.5,
        user_data_merge='left'
    )
    

    因子分析: sum(where((close_0/close_1 - 1)>0.05,1,0),90)

    { "type": "factor-track", "data": { "exprs": ["sum(where((close_0/close_1 - 1)>0.05,1,0),90)"], "options": {"BacktestInterval": ["2019-01-01", "2019-12-31"], "Benchmark": "none", "StockPool": "all", "UserDataMerge": "left", "DropSTStocks": 0, "DropPriceLimitStocks": 0, "DropNewStocks": 60, "DropSuspendedStocks": 0, "QuantileCount": 5, "CommissionRates": 0.0016, "Cutoutliers": 1, "Normalization": 1, "Neutralization": "", "DelayRebalanceDays": 0, "RebalancePeriod": 1, "RebalancePeriodsReturns": 0, "RebalancePrice": "close_0", "ReturnsCalculationMethod": "cumprod", "FactorCoverage": 0.5, "_HASH": "149a2ddbbbbe4b0fe07993485845b125"} } }

    因子表现概览

      累计收益 近1年收益 近3月收益 近1月收益 近1周收益 昨日收益 最大回撤 盈亏比 胜率 夏普比率 收益波动率
    最小分位 -8.56% -8.56% -8.37% 3.05% 2.08% 0.69% 30.63% 0.87 0.52 -0.54 20.01%
    最大分位 -25.62% -25.62% -13.61% 5.25% 1.06% -0.54% 43.92% 0.92 0.48 -1.01 29.42%
    多空组合 9.39% 9.39% 2.70% -1.11% 0.49% 0.62% 6.98% 1.10 0.53 0.91 6.61%

    基本特征分析

    IC分析

    -0.04

    0.14

    -0.29

    90.95%

    买入信号重合分析

    因子估值分析

    因子拥挤度分析

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

    股票名称 股票代码 因子值
    平安银行 000001.SZA 0.0000
    杭州园林 300649.SZA 0.0000
    正元智慧 300645.SZA 0.0000
    嘉诚国际 603535.SHA 0.0000
    德艺文创 300640.SZA 0.0000
    扬帆新材 300637.SZA 0.0000
    久吾高科 300631.SZA 0.0000
    华瑞股份 300626.SZA 0.0000
    晨化股份 300610.SZA 0.0000
    金太阳 300606.SZA 0.0000
    中通国脉 603559.SHA 0.0000
    雄塑科技 300599.SZA 0.0000
    珍宝岛 603567.SHA 0.0000
    吉大通信 300597.SZA 0.0000
    伟明环保 603568.SHA 0.0000
    海辰药业 300584.SZA 0.0000
    赛托生物 300583.SZA 0.0000
    三星新材 603578.SHA 0.0000
    荣泰健康 603579.SHA 0.0000
    艾艾精工 603580.SHA 0.0000

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

    股票名称 股票代码 因子值
    值得买 300785.SZA 16.0000
    东方通 300379.SZA 16.0000
    韦尔股份 603501.SHA 16.0000
    星期六 002291.SZA 16.0000
    圣邦股份 300661.SZA 16.0000
    *ST猛狮 002684.SZA 16.0000
    中青宝 300052.SZA 17.0000
    国光电器 002045.SZA 17.0000
    共达电声 002655.SZA 17.0000
    北京君正 300223.SZA 18.0000
    九鼎新材 002201.SZA 18.0000
    *ST信威 600485.SHA 18.0000
    当代东方 000673.SZA 18.0000
    华北制药 600812.SHA 19.0000
    深大通 000038.SZA 19.0000
    万集科技 300552.SZA 19.0000
    四方精创 300468.SZA 20.0000
    宝鼎科技 002552.SZA 23.0000
    诚迈科技 300598.SZA 24.0000
    漫步者 002351.SZA 25.0000