复制链接
克隆策略

    {"description":"实验创建于2021/12/10","graph":{"edges":[{"to_node_id":"-91:features","from_node_id":"-77:data"},{"to_node_id":"-91:instruments","from_node_id":"-97:data"}],"nodes":[{"node_id":"-77","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\nclose_0/open_0\nreturn_5\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-77"}],"output_ports":[{"name":"data","node_id":"-77"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-91","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":"-91"},{"name":"features","node_id":"-91"}],"output_ports":[{"name":"data","node_id":"-91"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"-97","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-01","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":"-97"}],"output_ports":[{"name":"data","node_id":"-97"}],"cacheable":true,"seq_num":4,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-77' Position='503,67.59999084472656,200,200'/><node_position Node='-91' Position='424,173.40000915527344,200,200'/><node_position Node='-97' Position='202,67.59999084472656,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [11]:
    # 本代码由可视化策略环境自动生成 2021年12月10日 14:02
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.input_features.v1(
        features="""
    # #号开始的表示注释,注释需单独一行
    # 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征
    close_0/open_0
    return_5
    """
    )
    
    m4 = M.instruments.v2(
        start_date='2021-01-01',
        end_date='2021-12-01',
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m3 = M.general_feature_extractor.v7(
        instruments=m4.data,
        features=m1.data,
        start_date='',
        end_date='',
        before_start_days=90
    )
    
    In [12]:
    m3.data.read()
    
    Out[12]:
    close_0 date instrument open_0 return_5
    0 1685.719482 2020-10-09 000001.SZA 1699.045288 0.971209
    0 2065.506104 2021-01-04 000001.SZA 2121.030518 1.018620
    1 2017.755127 2021-01-05 000001.SZA 2043.296265 1.007206
    1 1765.674561 2020-10-12 000001.SZA 1690.161377 1.051587
    2 1783.442383 2020-10-13 000001.SZA 1765.674561 1.057275
    ... ... ... ... ... ...
    959215 24.104408 2021-11-25 872925.BJA 24.469166 0.947809
    959216 24.823792 2021-11-26 872925.BJA 24.114540 1.007401
    959217 23.658594 2021-11-29 872925.BJA 24.570488 1.001287
    959218 23.810575 2021-11-30 872925.BJA 23.739651 1.015557
    959219 23.628197 2021-12-01 872925.BJA 23.658594 0.962841

    1202965 rows × 5 columns

    In [ ]: