复制链接
克隆策略

    {"description":"实验创建于2021/12/10","graph":{"edges":[{"to_node_id":"-55:instruments","from_node_id":"-42:data"},{"to_node_id":"-55:features","from_node_id":"-50:data"}],"nodes":[{"node_id":"-42","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2021-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2021-12-09","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"","type":"Literal","bound_global_parameter":null},{"name":"max_count","value":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"rolling_conf","node_id":"-42"}],"output_ports":[{"name":"data","node_id":"-42"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-50","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\nreturn_5\navg_amount_0/avg_amount_5\npe_ttm_0\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-50"}],"output_ports":[{"name":"data","node_id":"-50"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-55","module_id":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":90,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-55"},{"name":"features","node_id":"-55"}],"output_ports":[{"name":"data","node_id":"-55"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-42' Position='263,93.19999694824219,200,200'/><node_position Node='-50' Position='641,90.19999694824219,200,200'/><node_position Node='-55' Position='451,227.59999084472656,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [7]:
    # 本代码由可视化策略环境自动生成 2021年12月10日 11:50
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.instruments.v2(
        start_date='2021-01-01',
        end_date='2021-12-09',
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m2 = M.input_features.v1(
        features="""
    # #号开始的表示注释,注释需单独一行
    # 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征
    return_5
    avg_amount_0/avg_amount_5
    pe_ttm_0
    """
    )
    
    m3 = M.general_feature_extractor.v7(
        instruments=m1.data,
        features=m2.data,
        start_date='',
        end_date='',
        before_start_days=90
    )
    
    In [10]:
    m2.data.read()
    
    Out[10]:
    ['return_5', 'avg_amount_0/avg_amount_5', 'pe_ttm_0']