因子 ta_willr(close_0, 10) 无法正确得到值

新手专区
标签: #<Tag:0x00007fb116f79210>

(snryang) #1

提示:derived_feature_extractor: 提取失败 wr10=ta_willr(close_0, 10): WILLR() takes at least 3 positional arguments (1 given)


(iQuant) #2

应该是提供的数据量太少了,可以分享策略到社区,我们帮您看一下。


(snryang) #3
克隆策略
In [25]:
m4.data.read_df().tail()
Out[25]:
close_0 date instrument ta_willr_14_0 ta_willr_28_0
260821 119.370003 2019-11-27 688188.SHA -88.643852 -82.801216
260828 58.200001 2019-11-27 688321.SHA -64.781288 -47.616405
260829 48.180000 2019-11-27 688333.SHA -92.720970 -97.597252
260832 68.180000 2019-11-27 688368.SHA -21.479252 -65.478836
260834 41.500000 2019-11-27 688388.SHA -61.805561 -76.535835

    {"Description":"实验创建于2019/11/27","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-288:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"DestinationInputPortId":"-295:input_data","SourceOutputPortId":"-288:data"},{"DestinationInputPortId":"-1143:input_data","SourceOutputPortId":"-295:data"},{"DestinationInputPortId":"-288:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-295:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"}],"ModuleNodes":[{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2019-11-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2019-11-27","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":1,"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":"80","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":2,"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":3,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"k=ta_kdj_k(high_0, low_0, close_0, 9, 3)\nd=ta_kdj_d(high_0, low_0, close_0, 9, 3)\nj=ta_kdj_j(high_0, low_0, close_0, 9, 3)\n\nwr10=ta_willr(close_0, 10)","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":5,"Comment":"","CommentCollapsed":true},{"Id":"-1143","ModuleId":"BigQuantSpace.dropnan.dropnan-v1","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-1143"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-1143","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":4,"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-62' Position='410,101,200,200'/><NodePosition Node='-288' Position='331,235,200,200'/><NodePosition Node='-295' Position='382,336,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='768,128,200,200'/><NodePosition Node='-1143' Position='378,442,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":true}
    In [9]:
    # 本代码由可视化策略环境自动生成 2019年11月29日 10:53
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.instruments.v2(
        start_date='2019-11-01',
        end_date='2019-11-27',
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m5 = M.input_features.v1(
        features="""k=ta_kdj_k(high_0, low_0, close_0, 9, 3)
    d=ta_kdj_d(high_0, low_0, close_0, 9, 3)
    j=ta_kdj_j(high_0, low_0, close_0, 9, 3)
    
    wr10=ta_willr(close_0, 10)"""
    )
    
    m2 = M.general_feature_extractor.v7(
        instruments=m1.data,
        features=m5.data,
        start_date='',
        end_date='',
        before_start_days=80
    )
    
    m3 = M.derived_feature_extractor.v3(
        input_data=m2.data,
        features=m5.data,
        date_col='date',
        instrument_col='instrument',
        drop_na=False,
        remove_extra_columns=False
    )
    
    m4 = M.dropnan.v1(
        input_data=m3.data
    )
    

    [2019-11-29 10:52:22.427697] INFO: derived_feature_extractor: 提取完成 k=ta_kdj_k(high_0, low_0, close_0, 9, 3), 8.889s

    [2019-11-29 10:52:22.430504] INFO: derived_feature_extractor: 提取失败 d=ta_kdj_d(high_0, low_0, close_0, 9, 3): ta_kdj_d() takes exactly 7 positional arguments (6 given)

    [2019-11-29 10:52:22.432938] INFO: derived_feature_extractor: 提取失败 j=ta_kdj_j(high_0, low_0, close_0, 9, 3): ta_kdj_j() takes exactly 7 positional arguments (6 given)

    [2019-11-29 10:52:22.522244] INFO: derived_feature_extractor: 提取失败 wr10=ta_willr(close_0, 10): WILLR() takes at least 3 positional arguments (1 given)


    (达达) #4

    有提示你抽取d和j失败,kdj指标中d和j是对k的平滑,要多输入一个参数,9,3,3



    (snryang) #5

    感谢!ta_kdj_d _j函数的代码提供有误导,少了一个参数提示。按你的代码,能获取值,但是结果不正确,都是一样的
    image


    (达达) #6

    大部分不一样啊

    克隆策略
    In [5]:
    df = m4.data.read_df()
    
    In [7]:
    df[df.instrument=='000001.SZA']
    
    Out[7]:
    close_0 date high_0 instrument low_0 k d j
    29215 1599.332153 2019-08-23 1609.157349 000001.SZA 1566.581299 44.117702 44.117702 44.117702
    32866 1555.664307 2019-08-26 1582.956665 000001.SZA 1544.747437 32.527046 40.254150 17.072838
    36519 1562.214478 2019-08-27 1580.773315 000001.SZA 1554.572632 26.764046 35.757450 8.777243
    40172 1557.847778 2019-08-28 1558.939453 000001.SZA 1533.830444 24.219528 31.911474 8.835632
    43828 1542.563965 2019-08-29 1554.572632 000001.SZA 1537.105591 18.465183 27.429379 0.536796
    47483 1545.839111 2019-08-30 1570.947998 000001.SZA 1539.288940 15.498537 23.452431 -0.409250
    51142 1577.498169 2019-09-02 1582.956665 000001.SZA 1540.380615 26.205366 24.370075 29.875946
    54802 1561.122803 2019-09-03 1584.048340 000001.SZA 1555.664307 29.547539 26.095898 36.450825
    58463 1576.406494 2019-09-04 1582.956665 000001.SZA 1562.214478 38.538929 30.243574 55.129635
    62123 1591.690186 2019-09-05 1621.166016 000001.SZA 1588.415161 47.775925 36.087688 71.152390
    65785 1616.799194 2019-09-06 1616.799194 000001.SZA 1596.057007 63.517265 45.230881 100.090034
    69447 1603.698853 2019-09-09 1637.541382 000001.SZA 1593.873657 64.800980 51.754250 90.894447
    73111 1588.415161 2019-09-10 1598.240356 000001.SZA 1573.131470 60.229633 54.579376 71.530144
    76772 1589.506836 2019-09-11 1605.882324 000001.SZA 1578.589966 57.190121 55.449623 60.671108
    80433 1602.607178 2019-09-12 1613.524170 000001.SZA 1586.231812 59.475063 56.791435 64.842316
    84094 1577.498169 2019-09-16 1606.973999 000001.SZA 1572.039795 48.538921 54.040596 37.535564
    87755 1554.572632 2019-09-17 1577.498169 000001.SZA 1548.022461 34.798306 47.626499 9.141919
    91419 1573.131470 2019-09-18 1580.773315 000001.SZA 1554.572632 32.548481 42.600494 12.444454
    95082 1620.074341 2019-09-19 1625.532715 000001.SZA 1580.773315 48.528278 44.576424 56.431995
    98743 1674.659058 2019-09-20 1681.209229 000001.SZA 1629.899536 64.046173 51.066341 90.005844
    102407 1679.025757 2019-09-23 1688.851074 000001.SZA 1657.191895 73.705185 58.612621 103.890312
    106069 1657.191895 2019-09-24 1696.492920 000001.SZA 1657.191895 73.646591 63.623943 93.691879
    109730 1719.418457 2019-09-25 1730.335449 000001.SZA 1658.283569 80.435043 69.227646 102.849838
    113394 1715.051758 2019-09-26 1751.077637 000001.SZA 1709.593262 81.042725 73.166008 96.796165
    117056 1735.793945 2019-09-27 1746.710815 000001.SZA 1713.959961 84.852859 77.061623 100.435333
    120719 1701.951416 2019-09-30 1734.702148 000001.SZA 1699.767944 81.568581 78.563942 87.577850
    124388 1768.544678 2019-10-08 1771.819824 000001.SZA 1703.043091 87.140945 81.422943 98.576950
    128053 1774.003174 2019-10-09 1803.478882 000001.SZA 1748.894165 85.766930 82.870941 91.558907
    131718 1772.911499 2019-10-10 1776.186523 000001.SZA 1745.619141 83.546120 83.096001 84.446365
    135384 1835.138062 2019-10-11 1850.421753 000001.SZA 1768.544678 86.394218 84.195404 90.791840
    ... ... ... ... ... ... ... ... ...
    150064 1823.129395 2019-10-17 1855.880249 000001.SZA 1806.754028 69.044678 77.315720 52.502605
    153735 1802.387207 2019-10-18 1860.247070 000001.SZA 1793.653687 61.196442 71.942627 39.704079
    157408 1843.871582 2019-10-21 1852.605225 000001.SZA 1793.653687 59.431156 67.772141 42.749199
    161079 1792.562012 2019-10-22 1848.238403 000001.SZA 1749.985962 48.523464 61.355911 22.858568
    164752 1795.837036 2019-10-23 1819.854370 000001.SZA 1771.819824 41.266159 54.659328 14.479816
    168426 1841.688232 2019-10-24 1855.880249 000001.SZA 1794.745361 45.345158 51.554604 32.926266
    172101 1842.779907 2019-10-25 1851.513428 000001.SZA 1810.029053 50.324661 51.144623 48.684734
    175777 1818.762695 2019-10-28 1860.247070 000001.SZA 1799.112183 48.443394 50.244213 44.841759
    179455 1846.055054 2019-10-29 1848.238403 000001.SZA 1807.845703 61.338505 53.942310 76.130890
    183136 1793.653687 2019-10-30 1851.513428 000001.SZA 1792.562012 54.093643 53.992756 54.295422
    186816 1775.094849 2019-10-31 1798.020508 000001.SZA 1772.911499 43.653164 50.546223 29.867044
    190498 1840.596558 2019-11-01 1855.880249 000001.SZA 1777.278320 56.494843 52.529099 64.426338
    194181 1847.146729 2019-11-04 1883.172607 000001.SZA 1830.771240 60.212254 55.090149 70.456467
    197866 1872.255615 2019-11-05 1903.914795 000001.SZA 1832.954712 65.419266 58.533188 79.191429
    201557 1851.513428 2019-11-06 1884.264282 000001.SZA 1842.779907 63.612835 60.226402 70.385689
    205248 1843.871582 2019-11-07 1863.522095 000001.SZA 1828.587891 60.464104 60.305637 60.781033
    208944 1817.671021 2019-11-08 1858.063599 000001.SZA 1816.579224 51.698307 57.436527 40.221867
    212643 1777.278320 2019-11-11 1804.570679 000001.SZA 1768.544678 36.616096 50.496384 8.855523
    216344 1782.736694 2019-11-12 1787.103516 000001.SZA 1764.177979 28.837795 43.276855 -0.040322
    220047 1782.736694 2019-11-13 1796.928711 000001.SZA 1753.260986 25.746927 37.433544 2.373693
    223744 1781.645020 2019-11-14 1799.112183 000001.SZA 1774.003174 23.444807 32.770634 4.793158
    227445 1783.828491 2019-11-15 1806.754028 000001.SZA 1772.911499 22.393171 29.311480 8.556557
    231148 1795.837036 2019-11-18 1806.754028 000001.SZA 1771.819824 25.762108 28.128355 21.029615
    234856 1791.470337 2019-11-19 1799.112183 000001.SZA 1780.553345 28.725910 28.327541 29.522652
    238563 1730.335449 2019-11-20 1779.461670 000001.SZA 1721.601807 21.283962 25.979681 11.892524
    242270 1731.427124 2019-11-21 1732.518799 000001.SZA 1706.318115 22.522652 24.827337 17.913279
    245980 1701.951416 2019-11-22 1737.977295 000001.SZA 1697.584595 16.348448 22.001041 5.043261
    249692 1724.876953 2019-11-25 1729.243774 000001.SZA 1696.492920 19.479818 21.160633 16.118189
    253407 1705.226440 2019-11-26 1734.702148 000001.SZA 1691.034424 17.074593 19.798620 11.626539
    257122 1688.851074 2019-11-27 1707.409790 000001.SZA 1680.117432 13.681935 17.759726 5.526354

    63 rows × 8 columns

      {"Description":"实验创建于2019/11/27","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-288:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"DestinationInputPortId":"-295:input_data","SourceOutputPortId":"-288:data"},{"DestinationInputPortId":"-1143:input_data","SourceOutputPortId":"-295:data"},{"DestinationInputPortId":"-288:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-295:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"}],"ModuleNodes":[{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2019-11-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2019-11-27","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":1,"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":"80","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":2,"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":3,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"k=ta_kdj_k(high_0, low_0, close_0, 9, 3)\nd=ta_kdj_d(high_0, low_0, close_0, 9, 3, 3)\nj=ta_kdj_j(high_0, low_0, close_0, 9, 3, 3)\n\nwr10=ta_willr(close_0, 10)","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":5,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-1143","ModuleId":"BigQuantSpace.dropnan.dropnan-v1","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-1143"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-1143","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":4,"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-62' Position='410,101,200,200'/><NodePosition Node='-288' Position='331,235,200,200'/><NodePosition Node='-295' Position='382,336,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='768,128,200,200'/><NodePosition Node='-1143' Position='378,442,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":true}
      In [3]:
      # 本代码由可视化策略环境自动生成 2019年11月29日 16:00
      # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
      
      
      m1 = M.instruments.v2(
          start_date='2019-11-01',
          end_date='2019-11-27',
          market='CN_STOCK_A',
          instrument_list='',
          max_count=0
      )
      
      m5 = M.input_features.v1(
          features="""k=ta_kdj_k(high_0, low_0, close_0, 9, 3)
      d=ta_kdj_d(high_0, low_0, close_0, 9, 3, 3)
      j=ta_kdj_j(high_0, low_0, close_0, 9, 3, 3)
      
      wr10=ta_willr(close_0, 10)"""
      )
      
      m2 = M.general_feature_extractor.v7(
          instruments=m1.data,
          features=m5.data,
          start_date='',
          end_date='',
          before_start_days=80
      )
      
      m3 = M.derived_feature_extractor.v3(
          input_data=m2.data,
          features=m5.data,
          date_col='date',
          instrument_col='instrument',
          drop_na=False,
          remove_extra_columns=False
      )
      
      m4 = M.dropnan.v1(
          input_data=m3.data
      )
      

      (snryang) #7

      感谢,我再试试