复制链接
克隆策略

    {"description":"实验创建于2022/12/26","graph":{"edges":[{"to_node_id":"-112:instruments","from_node_id":"-118:data"},{"to_node_id":"-112:features","from_node_id":"-126:data"}],"nodes":[{"node_id":"-112","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":"1686","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-112"},{"name":"features","node_id":"-112"}],"output_ports":[{"name":"data","node_id":"-112"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"-118","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2015-5-1","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2015-7-1","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"000008.SZA","type":"Literal","bound_global_parameter":null},{"name":"max_count","value":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"rolling_conf","node_id":"-118"}],"output_ports":[{"name":"data","node_id":"-118"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-126","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"\n# #号开始的表示注释,注释需单独一行\n# 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征\nclose_0\nhigh_0\nlow_0\n#\nlist_days_0\n#\nst_status_0\nfs_roe_0\npb_lf_0","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-126"}],"output_ports":[{"name":"data","node_id":"-126"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-112' Position='300,256,200,200'/><node_position Node='-118' Position='143,120,200,200'/><node_position Node='-126' Position='542,116,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [4]:
    # 本代码由可视化策略环境自动生成 2022年12月26日 11:54
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m2 = M.instruments.v2(
        start_date='2015-5-1',
        end_date='2015-7-1',
        market='CN_STOCK_A',
        instrument_list='000008.SZA',
        max_count=0
    )
    
    m3 = M.input_features.v1(
        features="""
    # #号开始的表示注释,注释需单独一行
    # 多个特征,每行一个,可以包含基础特征和衍生特征,特征须为本平台特征
    close_0
    high_0
    low_0
    #
    list_days_0
    #
    st_status_0
    fs_roe_0
    pb_lf_0"""
    )
    
    m1 = M.general_feature_extractor.v7(
        instruments=m2.data,
        features=m3.data,
        start_date='',
        end_date='',
        before_start_days=1686
    )
    
    In [7]:
    m1.data.read()
    
    Out[7]:
    close_0 date fs_roe_0 high_0 instrument list_days_0 low_0 pb_lf_0 st_status_0
    0 31.627066 2010-09-20 0.0230 32.032215 000008.SZA 6710.0 31.373846 12.543024 1.0
    0 26.866547 2013-01-04 0.1166 27.195732 000008.SZA 7547.0 26.714615 2.671587 1.0
    0 45.579437 2014-01-02 3.0992 45.782013 000008.SZA 7910.0 45.224930 4.898106 0.0
    0 109.897087 2015-01-05 1.7194 116.632721 000008.SZA 8278.0 109.390648 11.490463 0.0
    0 30.563545 2011-01-04 0.1195 30.690155 000008.SZA 6816.0 29.955820 12.109548 1.0
    ... ... ... ... ... ... ... ... ... ...
    232 48.111629 2013-12-25 3.0992 49.630943 000008.SZA 7902.0 47.453259 5.170223 0.0
    233 45.680725 2013-12-26 3.0992 48.263561 000008.SZA 7903.0 45.630081 4.908991 0.0
    234 45.427505 2013-12-27 3.0992 46.339096 000008.SZA 7904.0 45.072998 4.881779 0.0
    235 45.680725 2013-12-30 3.0992 46.085876 000008.SZA 7907.0 45.376862 4.908991 0.0
    236 45.579437 2013-12-31 3.0992 46.035233 000008.SZA 7908.0 45.224930 4.898106 0.0

    949 rows × 9 columns