策略报错:“Exception: no data left after dropnan”怎么处理?

策略分享
标签: #<Tag:0x00007fb12225bd10>

(sunxking) #1
克隆策略

    {"Description":"实验创建于2019/11/4","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-288:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-295:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-288:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"DestinationInputPortId":"-295:input_data","SourceOutputPortId":"-288:data"},{"DestinationInputPortId":"-86:input_data","SourceOutputPortId":"-295:data"}],"ModuleNodes":[{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"amount_0\nclose_0\nshift(open_0, -1)\nshift(close_0, -1)\nshift(open_0, -2)\nshift(close_0, -2)\n","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features_ds","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":1,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2019-11-14","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2019-11-15","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"market","Value":"CN_STOCK_A","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"instrument_list","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"max_count","Value":"0","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"rolling_conf","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":2,"IsPartOfPartialRun":null,"Comment":"预测数据,用于回测和模拟","CommentCollapsed":true},{"Id":"-288","ModuleId":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","ModuleParameters":[{"Name":"start_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"before_start_days","Value":"0","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-288"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-288"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-288","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":3,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-295","ModuleId":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v3","ModuleParameters":[{"Name":"date_col","Value":"date","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"instrument_col","Value":"instrument","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"drop_na","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"remove_extra_columns","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"user_functions","Value":"","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-295"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-295"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-295","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":4,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-86","ModuleId":"BigQuantSpace.dropnan.dropnan-v1","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-86"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-86","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":5,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true}],"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='398.3380126953125,178,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-62' Position='719,281,200,200'/><NodePosition Node='-288' Position='721,413.3310241699219,200,200'/><NodePosition Node='-295' Position='722,505,200,200'/><NodePosition Node='-86' Position='719,593,200,200'/></NodePositions><NodeGroups /></DataV1>"},"IsDraft":true,"ParentExperimentId":null,"WebService":{"IsWebServiceExperiment":false,"Inputs":[],"Outputs":[],"Parameters":[{"Name":"交易日期","Value":"","ParameterDefinition":{"Name":"交易日期","FriendlyName":"交易日期","DefaultValue":"","ParameterType":"String","HasDefaultValue":true,"IsOptional":true,"ParameterRules":[],"HasRules":false,"MarkupType":0,"CredentialDescriptor":null}}],"WebServiceGroupId":null,"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions></NodePositions><NodeGroups /></DataV1>"},"DisableNodesUpdate":false,"Category":"user","Tags":[],"IsPartialRun":false}
    In [23]:
    # 本代码由可视化策略环境自动生成 2019年11月25日 00:30
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.input_features.v1(
        features="""amount_0
    close_0
    shift(open_0, -1)
    shift(close_0, -1)
    shift(open_0, -2)
    shift(close_0, -2)
    """
    )
    
    m2 = M.instruments.v2(
        start_date='2019-11-14',
        end_date='2019-11-15',
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m3 = M.general_feature_extractor.v7(
        instruments=m2.data,
        features=m1.data,
        start_date='',
        end_date='',
        before_start_days=0
    )
    
    m4 = M.derived_feature_extractor.v3(
        input_data=m3.data,
        features=m1.data,
        date_col='date',
        instrument_col='instrument',
        drop_na=False,
        remove_extra_columns=False
    )
    
    m5 = M.dropnan.v1(
        input_data=m4.data
    )
    

    缺失数据处理(dropnan)使用错误,你可以:

    1.一键查看文档

    2.一键搜索答案

    ---------------------------------------------------------------------------
    Exception                                 Traceback (most recent call last)
    <ipython-input-23-a815e9e64633> in <module>()
         39 
         40 m5 = M.dropnan.v1(
    ---> 41     input_data=m4.data
         42 )
    
    Exception: no data left after dropnan
    In [ ]:
     
    
    克隆策略

      {"Description":"实验创建于2019/11/4","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-288:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-295:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-288:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"DestinationInputPortId":"-295:input_data","SourceOutputPortId":"-288:data"},{"DestinationInputPortId":"-86:input_data","SourceOutputPortId":"-295:data"}],"ModuleNodes":[{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"amount_0\nclose_0\nshift(open_0, -1)\nshift(close_0, -1)\nshift(open_0, -2)\nshift(close_0, -2)\n","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features_ds","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":1,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2019-11-14","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2019-11-15","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"market","Value":"CN_STOCK_A","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"instrument_list","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"max_count","Value":"0","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"rolling_conf","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":2,"IsPartOfPartialRun":null,"Comment":"预测数据,用于回测和模拟","CommentCollapsed":true},{"Id":"-288","ModuleId":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","ModuleParameters":[{"Name":"start_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"before_start_days","Value":"0","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-288"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-288"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-288","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":3,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-295","ModuleId":"BigQuantSpace.derived_feature_extractor.derived_feature_extractor-v3","ModuleParameters":[{"Name":"date_col","Value":"date","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"instrument_col","Value":"instrument","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"drop_na","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"remove_extra_columns","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"user_functions","Value":"","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-295"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-295"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-295","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":4,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-86","ModuleId":"BigQuantSpace.dropnan.dropnan-v1","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-86"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-86","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":5,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true}],"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='398.3380126953125,178,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-62' Position='719,281,200,200'/><NodePosition Node='-288' Position='721,413.3310241699219,200,200'/><NodePosition Node='-295' Position='722,505,200,200'/><NodePosition Node='-86' Position='719,593,200,200'/></NodePositions><NodeGroups /></DataV1>"},"IsDraft":true,"ParentExperimentId":null,"WebService":{"IsWebServiceExperiment":false,"Inputs":[],"Outputs":[],"Parameters":[{"Name":"交易日期","Value":"","ParameterDefinition":{"Name":"交易日期","FriendlyName":"交易日期","DefaultValue":"","ParameterType":"String","HasDefaultValue":true,"IsOptional":true,"ParameterRules":[],"HasRules":false,"MarkupType":0,"CredentialDescriptor":null}}],"WebServiceGroupId":null,"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions></NodePositions><NodeGroups /></DataV1>"},"DisableNodesUpdate":false,"Category":"user","Tags":[],"IsPartialRun":false}
      In [23]:
      # 本代码由可视化策略环境自动生成 2019年11月25日 00:29
      # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
      
      
      m1 = M.input_features.v1(
          features="""amount_0
      close_0
      shift(open_0, -1)
      shift(close_0, -1)
      shift(open_0, -2)
      shift(close_0, -2)
      """
      )
      
      m2 = M.instruments.v2(
          start_date='2019-11-14',
          end_date='2019-11-15',
          market='CN_STOCK_A',
          instrument_list='',
          max_count=0
      )
      
      m3 = M.general_feature_extractor.v7(
          instruments=m2.data,
          features=m1.data,
          start_date='',
          end_date='',
          before_start_days=0
      )
      
      m4 = M.derived_feature_extractor.v3(
          input_data=m3.data,
          features=m1.data,
          date_col='date',
          instrument_col='instrument',
          drop_na=False,
          remove_extra_columns=False
      )
      
      m5 = M.dropnan.v1(
          input_data=m4.data
      )
      

      缺失数据处理(dropnan)使用错误,你可以:

      1.一键查看文档

      2.一键搜索答案

      ---------------------------------------------------------------------------
      Exception                                 Traceback (most recent call last)
      <ipython-input-23-a815e9e64633> in <module>()
           39 
           40 m5 = M.dropnan.v1(
      ---> 41     input_data=m4.data
           42 )
      
      Exception: no data left after dropnan
      In [22]:
       
      
      3699
              amount_0      close_0       date  instrument       open_0  shift(open_0, -1)  shift(close_0, -1)  shift(open_0, -2)  shift(close_0, -2)
      0   7.670063e+08  1781.645020 2019-11-14  000001.SZA  1793.653687        1789.286865         1783.828491        1784.920166         1795.837036
      1   9.965716e+08  3916.590576 2019-11-14  000002.SZA  3892.844482        3924.010986         3931.431641        3918.074707         3921.042969
      2   1.676473e+07    76.441246 2019-11-14  000004.SZA    76.359970          76.441246           74.937614          75.100166           74.571869
      3   1.183967e+07    27.154078 2019-11-14  000005.SZA    27.246754          27.061401           26.690697          26.690697           26.968725
      4   1.764153e+07   180.672394 2019-11-14  000006.SZA   181.380920         179.963882          179.255356         178.901093          179.963882
      5   3.139430e+08    91.615822 2019-11-14  000007.SZA    91.615822          86.977043           90.621796          87.059875           92.609840
      6   3.443671e+07    74.815025 2019-11-14  000008.SZA    74.591698          75.038353           74.145042          74.145042           74.368370
      7   4.217042e+07    39.776779 2019-11-14  000009.SZA    39.688190          39.776779           39.422421          39.688190           39.865368
      8   1.649698e+06    36.741211 2019-11-14  000010.SZA    36.741211          36.633465           36.848957          36.741211           36.417976
      9   7.890685e+06    32.358280 2019-11-14  000011.SZA    32.430347          32.358280           32.142078          32.106045           32.682583
      10  3.115034e+07   115.918045 2019-11-14  000012.SZA   115.125893         115.918045          114.069695         114.069695          114.333740
      11  1.056273e+07    49.167942 2019-11-14  000014.SZA    49.059525          49.222153           48.192173          48.192173           48.625851
      12  3.440654e+07    87.824028 2019-11-14  000016.SZA    87.390327          87.390327           87.607178          87.607178           87.390327
      13  2.528914e+07    11.643074 2019-11-14  000017.SZA    11.777211          11.643074           11.777211          11.643074           11.884521
      14  9.633850e+06    24.164589 2019-11-14  000019.SZA    24.534454          24.164589           23.753626          23.753626           24.041300
      15  8.041291e+06    18.709492 2019-11-14  000020.SZA    18.797083          18.919710           18.499271          18.481754           18.779564
      16  2.023245e+08   136.380203 2019-11-14  000021.SZA   135.260040         135.820114          136.520218         137.220322          143.101196
      17  1.084553e+07    34.032108 2019-11-14  000023.SZA    33.712055          34.005436           33.632042          34.058777           34.272144
      18  9.195290e+07    56.332176 2019-11-14  000025.SZA    55.321854          57.970531           55.431080          56.632542           56.004505
      19  1.271979e+08    65.111282 2019-11-14  000026.SZA    62.764244          65.414124           64.354172          63.067089           68.064003
      20  3.953954e+07    81.758247 2019-11-14  000027.SZA    82.705780          81.758247           80.269272          80.810722           81.758247
      21  5.269582e+07   175.506805 2019-11-14  000028.SZA   175.703964         175.270218          171.839737         171.839737          176.058838
      22  6.409280e+06    15.087454 2019-11-14  000030.SZA    15.021135          15.153772           15.054295          15.120613           15.153772
      23  7.760597e+07   100.277893 2019-11-14  000031.SZA    98.144325          99.993416           98.144325          96.295227           98.997749
      24  4.647854e+07    59.033699 2019-11-14  000032.SZA    58.660595          59.033699           57.541275          58.038750           57.624187
      25  1.099106e+08    45.842896 2019-11-14  000034.SZA    45.873035          45.993595           44.607155          44.908554           45.873035
      26  1.012104e+08    29.145224 2019-11-14  000035.SZA    28.130674          29.375803           29.744730          29.790846           30.482584
      27  9.040398e+06    41.886063 2019-11-14  000036.SZA    41.886063          41.886063           41.226440          40.896626           41.995998
      28  1.087734e+07    71.524529 2019-11-14  000037.SZA    71.411354          70.449394           69.374268          69.317680           69.374268
      29  6.845489e+07    29.676315 2019-11-14  000038.SZA    29.208511          29.880981           32.658566          33.623413           35.933193
      30  2.778358e+07   288.288910 2019-11-14  000039.SZA   286.771606         288.288910          287.378510         287.075073          288.288910
      31  9.087138e+07    18.091261 2019-11-14  000040.SZA    18.308704          18.047773           17.699863          17.612886           17.308466
      32  8.392403e+06   129.132614 2019-11-14  000042.SZA   127.680191         128.472412          127.416122         126.887970          129.132614
      33  2.160996e+08   188.341934 2019-11-14  000043.SZA   173.341248         190.675369          185.258469         185.258469          184.925110
      34  2.464647e+07    21.958282 2019-11-14  000045.SZA    21.636229          21.870449           21.811893          21.782616           23.012280
      35  2.510353e+07   141.623352 2019-11-14  000046.SZA   141.290909         141.623352          139.296219         138.963760          139.628662
      36  2.581229e+07   143.285324 2019-11-14  000048.SZA   139.941803         142.069504          138.178848         136.598282          138.422012
      37  3.023219e+08   204.010300 2019-11-14  000049.SZA   195.392441         202.059097          200.162079         199.999481          199.349075
      38  3.111041e+08   118.020279 2019-11-14  000050.SZA   115.773071         118.020279          117.187981         119.768112          122.847626
      39  8.424887e+06    40.229229 2019-11-14  000055.SZA    40.229229          40.422638           39.939114          40.035820           40.712753
      40  3.162058e+07    19.445568 2019-11-14  000056.SZA    19.115982          19.304317           19.492651          19.445568           19.869322
      41  1.218718e+08    24.232008 2019-11-14  000058.SZA    24.558146          24.101553           25.047352          24.655987           26.058378
      42  2.555540e+07     9.346159 2019-11-14  000059.SZA     9.248803           9.346159            9.248803           9.216351            9.313706
      43  4.361367e+07   144.211578 2019-11-14  000060.SZA   143.840851         144.582291          143.099396         142.357956          144.211578
      44  2.203415e+07   111.256386 2019-11-14  000061.SZA   109.764442         111.043251          109.977577         110.830116          110.616982
      45  3.374710e+07    95.558212 2019-11-14  000062.SZA    93.910652          95.271675           94.197182          93.839020           94.483719
      46  1.458327e+09   517.355530 2019-11-14  000063.SZA   514.040161         515.461060          494.779480         493.358582          495.095215
      47  1.255989e+07   121.139977 2019-11-14  000065.SZA   121.442825         121.139977          118.868599         118.868599          119.322876
      48  2.070097e+09   167.594025 2019-11-14  000066.SZA   156.781509         165.972153          166.620895         166.080276          171.162155
      49  2.627887e+07     8.867278 2019-11-14  000068.SZA     8.867278           8.890074            9.004048           8.890074            9.049639
      50  1.510304e+08   278.782318 2019-11-14  000069.SZA   282.019287         279.186951          279.186951         279.186951          277.568481
      51  1.122917e+08    36.622211 2019-11-14  000070.SZA    36.276394          36.345554           35.999737          35.965157           36.380138
      52  2.458429e+07    67.393944 2019-11-14  000078.SZA    66.574562          66.984253           66.779411          66.574562           66.984253
      53  1.635409e+07    40.024738 2019-11-14  000088.SZA    40.098316          40.098316           40.613338          40.392616           40.098316
      54  1.502241e+08    68.913193 2019-11-14  000089.SZA    68.772842          68.281609           69.264076          69.264076           68.702667
      55  2.177224e+07    35.394093 2019-11-14  000090.SZA    35.182995          35.886654           35.605190          35.675556           35.675556
      56  2.160883e+06    25.730917 2019-11-14  000096.SZA    26.048910          25.465923           24.935936          24.935936           25.306927
      57  1.506655e+07    26.996277 2019-11-14  000099.SZA    27.071791          26.996277           26.883005          26.807491           26.883005
      58  9.642626e+08    10.954062 2019-11-14  000100.SZA    10.582739          10.861232           10.768400          10.892176           10.892176
      59  1.987742e+08    22.123550 2019-11-14  000150.SZA    21.768627          22.005243           22.478474          22.162987           22.360167
      60  2.451826e+07    26.562473 2019-11-14  000151.SZA    26.287216          26.397320           26.755156          26.920311           26.837732
      61  3.225110e+07    36.003979 2019-11-14  000153.SZA    36.512669          36.060501           35.043118          35.043118           35.325726
      62  1.371926e+07     5.816112 2019-11-14  000155.SZA     5.769081           5.800435            5.894495           5.925849            5.910172
      63  3.028936e+07     8.460338 2019-11-14  000156.SZA     8.511675           8.460338            8.439803           8.470605            8.521942
      64  4.218425e+08   430.341522 2019-11-14  000157.SZA   423.950317         433.892181          425.370575         423.950317          434.602325
      65  2.447855e+08    18.449038 2019-11-14  000158.SZA    18.478556          17.415892           17.622520          17.652039           17.622520
      66  3.690262e+07    17.466017 2019-11-14  000159.SZA    17.657600          17.370224           17.114780          17.210571           17.178640
      67  8.143944e+07     6.774237 2019-11-14  000166.SZA     6.817112           6.774237            6.731362           6.717071            6.774237
      68  1.623384e+07    11.233220 2019-11-14  000301.SZA    11.278152          11.255687           11.188287          11.210753           11.143354
      69  1.184488e+09   255.399948 2019-11-14  000333.SZA   256.708771         255.986664          255.219421         255.219421          255.851273
      70  4.058806e+08   244.915649 2019-11-14  000338.SZA   245.109863         244.527191          242.390747         241.419617          253.849915
      71  1.039164e+08    73.553497 2019-11-14  000400.SZA    73.629875          73.171600           73.324356          73.400742           73.324356
      72  4.359168e+08    56.289906 2019-11-14  000401.SZA    55.305817          56.171814           55.305817          54.636635           55.896271
      73  5.654039e+07   271.577209 2019-11-14  000402.SZA   269.075836         272.649200          269.790497         261.571716          270.862518
      74  6.005979e+07   136.553940 2019-11-14  000403.SZA   136.722626         136.553940          137.060013         137.060013          136.343079
      75  5.640051e+06    12.639446 2019-11-14  000404.SZA    12.672621          12.639446           12.440400          12.440400           12.440400
      76  1.407317e+07    36.566383 2019-11-14  000407.SZA    36.675213          36.675213           35.913410          35.913410           36.457554
      77  1.513474e+07    47.162365 2019-11-14  000408.SZA    46.878597          47.559643           46.424568          46.992104           46.084045
      78  1.441918e+07    10.321310 2019-11-14  000409.SZA    10.235299          10.299808           10.192294          10.213797           10.084781
      79  1.678917e+07    31.166225 2019-11-14  000411.SZA    30.397322          30.986814           30.602364          30.474213           31.140596
      80  3.913248e+08    22.456434 2019-11-14  000413.SZA    22.089050          22.318665           21.951281          21.951281           22.043127
      81  3.655212e+07    71.751793 2019-11-14  000415.SZA    71.960976          71.960976           70.705841          71.124222           71.960976
      82  1.436006e+07    48.133438 2019-11-14  000416.SZA    47.942051          48.229130           47.272205          47.367897           47.846359
      83  5.274709e+06    73.757713 2019-11-14  000417.SZA    73.757713          74.101570           72.898064          72.554207           73.241928
      84  7.200621e+06    61.398033 2019-11-14  000419.SZA    61.687645          61.687645           60.529194          60.239578           60.818806
      85  7.260375e+06    13.021889 2019-11-14  000420.SZA    13.021889          13.085410           12.767803          12.704282           12.831325
      86  5.502468e+06    28.992622 2019-11-14  000421.SZA    28.718462          28.924082           29.061163          29.061163           28.787001
      87  3.795443e+06    39.333759 2019-11-14  000422.SZA    39.038017          39.629501           39.185890          41.108215           41.108215
      88  1.305714e+08   351.813782 2019-11-14  000423.SZA   349.799988         351.411041          353.827606         352.820709          355.237274
      89  1.585277e+08   169.713608 2019-11-14  000425.SZA   167.810989         169.713608          166.669418         165.908371          168.572037
      90  2.676011e+07    71.452148 2019-11-14  000426.SZA    71.621468          71.282829           71.452148          71.113510           70.097603
      91  3.040380e+06    29.618172 2019-11-14  000428.SZA    29.739557          29.739557           29.375401          29.375401           29.375401
      92  1.383857e+07    28.562405 2019-11-14  000429.SZA    28.420303          28.562405           28.171627          28.207151           28.420303
      93  3.183425e+06    22.831099 2019-11-14  000430.SZA    22.692728          22.738852           22.600481          22.738852           22.600481
      94  3.074983e+07    44.085590 2019-11-14  000488.SZA    43.899967          44.271214           43.435909          43.343098           43.621532
      95  2.135828e+07    12.573311 2019-11-14  000498.SZA    12.573311          12.545738           12.380300          12.325153           12.380300
      96  1.780932e+07    68.340340 2019-11-14  000501.SZA    68.142830          67.945312           67.023575          66.694382           68.076988
      97  1.162490e+07    22.417120 2019-11-14  000502.SZA    21.918962          22.261446           21.981232          22.230312           21.950098
      98  8.362459e+07   115.360451 2019-11-14  000503.SZA   113.989830         115.741173          122.061249         121.299797          130.132675
      99  4.882571e+06    16.718039 2019-11-14  000504.SZA    16.823183          16.739069           16.528778          16.297459           16.675982
      

      以上策略中,我取19年14-15日数据,提示:
      Exception: no data left after dropnan
      但是取到14-18日数据,就没有问题


      (iQuant) #2

      您好,可以参考这篇帖子:模拟交易策略运行出现 No data left after dropnan错误