复制链接
克隆策略

    {"description":"实验创建于2017/8/26","graph":{"edges":[{"to_node_id":"-162:instruments","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"to_node_id":"-162:features","from_node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"to_node_id":"-59:input_ds","from_node_id":"-162:data"},{"to_node_id":"-117:input_ds","from_node_id":"-162:data"}],"nodes":[{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2015-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2015-12-01","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"000001.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":"287d2cb0-f53c-4101-bdf8-104b137c8601-8"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8"}],"cacheable":true,"seq_num":1,"comment":"","comment_collapsed":true},{"node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"# #号开始的表示注释\n# 多个特征,每行一个,可以包含基础特征和衍生特征\nlow\nhigh\nclose\nopen\namount","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"output_ports":[{"name":"data","node_id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"-59","module_id":"BigQuantSpace.Tplot.Tplot-v1","parameters":[{"name":"x","value":"date","type":"Literal","bound_global_parameter":null},{"name":"y","value":"open","type":"Literal","bound_global_parameter":null},{"name":"title","value":"开盘价折线图","type":"Literal","bound_global_parameter":null},{"name":"chart_type","value":"spline","type":"Literal","bound_global_parameter":null},{"name":"chart_options","value":"{'chart':{'height': 500}}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_ds","node_id":"-59"}],"output_ports":[],"cacheable":true,"seq_num":10,"comment":"绘制开盘价折线图","comment_collapsed":false},{"node_id":"-117","module_id":"BigQuantSpace.Tplot.Tplot-v1","parameters":[{"name":"x","value":"date","type":"Literal","bound_global_parameter":null},{"name":"y","value":"open,high,low,close,amount","type":"Literal","bound_global_parameter":null},{"name":"title","value":"K线图","type":"Literal","bound_global_parameter":null},{"name":"chart_type","value":"candlestick","type":"Literal","bound_global_parameter":null},{"name":"chart_options","value":"{\n 'chart': {'height': 600},\n 'series': [{'color': 'green','lineColor': 'green','upColor': 'red','upLineColor': 'red'},{'type': 'column'}]\n}","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_ds","node_id":"-117"}],"output_ports":[],"cacheable":true,"seq_num":4,"comment":"绘制K线图","comment_collapsed":false},{"node_id":"-162","module_id":"BigQuantSpace.use_datasource.use_datasource-v1","parameters":[{"name":"datasource_id","value":"bar1d_CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-162"},{"name":"features","node_id":"-162"}],"output_ports":[{"name":"data","node_id":"-162"}],"cacheable":true,"seq_num":5,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-8' Position='148,13,200,200'/><node_position Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='439.8255615234375,4.259674072265625,200,200'/><node_position Node='-59' Position='63.4814453125,282.62115478515625,200,200'/><node_position Node='-117' Position='380.67559814453125,286.2880859375,200,200'/><node_position Node='-162' Position='241.75421142578125,128.31031799316406,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [7]:
    # 本代码由可视化策略环境自动生成 2021年12月16日 14:59
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.instruments.v2(
        start_date='2015-01-01',
        end_date='2015-12-01',
        market='CN_STOCK_A',
        instrument_list='000001.SZA',
        max_count=0
    )
    
    m3 = M.input_features.v1(
        features="""# #号开始的表示注释
    # 多个特征,每行一个,可以包含基础特征和衍生特征
    low
    high
    close
    open
    amount"""
    )
    
    m5 = M.use_datasource.v1(
        instruments=m1.data,
        features=m3.data,
        datasource_id='bar1d_CN_STOCK_A',
        start_date='',
        end_date=''
    )
    
    m10 = M.Tplot.v1(
        input_ds=m5.data,
        x='date',
        y='open',
        title='开盘价折线图',
        chart_type='spline',
        chart_options={'chart':{'height': 500}}
    )
    
    m4 = M.Tplot.v1(
        input_ds=m5.data,
        x='date',
        y='open,high,low,close,amount',
        title='K线图',
        chart_type='candlestick',
        chart_options={
        'chart': {'height': 600},
        'series': [{'color': 'green','lineColor': 'green','upColor': 'red','upLineColor': 'red'},{'type': 'column'}]
    }
    )