我想保存一个stockranker模型,代码写错了吗

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

(caoweii) #1


(adhaha111) #2

您好,模型的保存应该先将模型训练出来,拿到模型的id,然后就能在预测模块中使用了:


克隆策略
In [5]:
model = m4.model
In [15]:
model.read()
Out[15]:
'75d2058ae34e11ea83a90a580a80028a'
In [22]:
M.stock_ranker_predict.v5(model=model.read(), data=m10.data, m_lazy_run=False)
Out[22]:
{'version': 'v3', 'predictions': DataSource(a4d946530daa48f786545666db967489T, v3), 'ndcg': None, 'start_date': '2014-10-08', 'end_date': '2015-12-31', 'instruments': ['600598.SHA', '601016.SHA', '600211.SHA', '600401.SHA', '600636.SHA', '601901.SHA', '002139.SZA', '002620.SZA', '600958.SHA', '600589.SHA', '002045.SZA', '600583.SHA', '600790.SHA', '603669.SHA', '002172.SZA', '600645.SHA', '002282.SZA', '300410.SZA', '300352.SZA', '300112.SZA', '600821.SHA', '300190.SZA', '000901.SZA', '600051.SHA', '600066.SHA', '002509.SZA', '600114.SHA', '600175.SHA', '600616.SHA', '002149.SZA', '601002.SHA', '300302.SZA', '300075.SZA', '603268.SHA', '000401.SZA', '002112.SZA', '002127.SZA', '000520.SZA', '000755.SZA', '300030.SZA', '600728.SHA', '603838.SHA', '000789.SZA', '300469.SZA', '600122.SHA', '600292.SHA', '300350.SZA', '002648.SZA', '600496.SHA', '603988.SHA', '600725.SHA', '600376.SHA', '600004.SHA', '300103.SZA', '300070.SZA', '300131.SZA', '300084.SZA', '600392.SHA', '600614.SHA', '002232.SZA', '600801.SHA', '002391.SZA', '002042.SZA', '300106.SZA', '000898.SZA', '300268.SZA', '600318.SHA', '600751.SHA', '600343.SHA', '600750.SHA', '300160.SZA', '300102.SZA', '600438.SHA', '300358.SZA', '000767.SZA', '000659.SZA', '603678.SHA', '300458.SZA', '600150.SHA', '300130.SZA', '000701.SZA', '300435.SZA', '300432.SZA', '002558.SZA', '000858.SZA', '300193.SZA', '002098.SZA', '002412.SZA', '601369.SHA', '600880.SHA', '600053.SHA', '000777.SZA', '600779.SHA', '603568.SHA', '002397.SZA', '600890.SHA', '002449.SZA', '300099.SZA', '600528.SHA', '300370.SZA', '600267.SHA', '002673.SZA', '002693.SZA', '603000.SHA', '600830.SHA', '000983.SZA', '002444.SZA', '300175.SZA', '300140.SZA', '002587.SZA', '600692.SHA', '300385.SZA', '002542.SZA', '000430.SZA', '300150.SZA', '000882.SZA', '000702.SZA', '603085.SHA', '600195.SHA', '002651.SZA', '300449.SZA', '000665.SZA', '300463.SZA', '603328.SHA', '002571.SZA', '600299.SHA', '002054.SZA', '002551.SZA', '600018.SHA', '002464.SZA', '600656.SHA', '000752.SZA', '002354.SZA', '000673.SZA', '002475.SZA', '300440.SZA', '603199.SHA', '600833.SHA', '600372.SHA', '600576.SHA', '600529.SHA', '002463.SZA', '002536.SZA', '002335.SZA', '601225.SHA', '600986.SHA', '600845.SHA', '300301.SZA', '600289.SHA', '600160.SHA', '002281.SZA', '000166.SZA', '002647.SZA', '600681.SHA', '600073.SHA', '002718.SZA', '300141.SZA', '600644.SHA', '300489.SZA', '600380.SHA', '603618.SHA', '603703.SHA', '600979.SHA', '002393.SZA', '000652.SZA', '600730.SHA', '300448.SZA', '600098.SHA', '300313.SZA', '600629.SHA', '300392.SZA', '000026.SZA', '002565.SZA', '002506.SZA', '601000.SHA', '600760.SHA', '600832.SHA', '600664.SHA', '600059.SHA', '600665.SHA', '600459.SHA', '600129.SHA', '600126.SHA', '002019.SZA', '002541.SZA', '600580.SHA', '600033.SHA', '601008.SHA', '000153.SZA', '002041.SZA', '600416.SHA', '000039.SZA', '002157.SZA', '002034.SZA', '000885.SZA', '002553.SZA', '002627.SZA', '600527.SHA', '000968.SZA', '002488.SZA', '600634.SHA', '002601.SZA', '600400.SHA', '000929.SZA', '002681.SZA', '000727.SZA', '603636.SHA', '000993.SZA', '002715.SZA', '600090.SHA', '002613.SZA', '002075.SZA', '600406.SHA', '002485.SZA', '000018.SZA', '600031.SHA', '000089.SZA', '300020.SZA', '600085.SHA', '300006.SZA', '002605.SZA', '300479.SZA', '600797.SHA', '002023.SZA', '300162.SZA', '600739.SHA', '002263.SZA', '600072.SHA', '600970.SHA', '000605.SZA', '300248.SZA', '002097.SZA', '600717.SHA', '002644.SZA', '002386.SZA', '002700.SZA', '002561.SZA', '002453.SZA', '002705.SZA', '600538.SHA', '002496.SZA', '000766.SZA', '600768.SHA', '300300.SZA', '002431.SZA', '000612.SZA', '002283.SZA', '300299.SZA', '600165.SHA', '601113.SHA', '002178.SZA', '300262.SZA', '300061.SZA', '000631.SZA', '002304.SZA', '002427.SZA', '000078.SZA', '603519.SHA', '002438.SZA', '002243.SZA', '600859.SHA', '600458.SHA', '600327.SHA', '300446.SZA', '600736.SHA', '000761.SZA', '002345.SZA', '002305.SZA', '300456.SZA', '300284.SZA', '000651.SZA', '300345.SZA', '000972.SZA', '600722.SHA', '600303.SHA', '300065.SZA', '300149.SZA', '000514.SZA', '002133.SZA', '000560.SZA', '002580.SZA', '600107.SHA', '300229.SZA', '002716.SZA', '002017.SZA', '002446.SZA', '300169.SZA', '002180.SZA', '002040.SZA', '002251.SZA', '601003.SHA', '600874.SHA', '300283.SZA', '002372.SZA', '002295.SZA', '600775.SHA', '002521.SZA', '002011.SZA', '600433.SHA', '002333.SZA', '600587.SHA', '002168.SZA', '600231.SHA', '300095.SZA', '300029.SZA', '000552.SZA', '601588.SHA', '600873.SHA', '300286.SZA', '002070.SZA', '600596.SHA', '002030.SZA', '300078.SZA', '002629.SZA', '600243.SHA', '300228.SZA', '000411.SZA', '002596.SZA', '000973.SZA', '600052.SHA', '002711.SZA', '600468.SHA', '000785.SZA', '600345.SHA', '600635.SHA', '600572.SHA', '601618.SHA', '000666.SZA', '600493.SHA', '002603.SZA', '600371.SHA', '600305.SHA', '300022.SZA', '600847.SHA', '002430.SZA', '000921.SZA', '002315.SZA', '600626.SHA', '000875.SZA', '000822.SZA', '000698.SZA', '000402.SZA', '600856.SHA', '000159.SZA', '000922.SZA', '000554.SZA', '600887.SHA', '600006.SHA', '600462.SHA', '600857.SHA', '300043.SZA', '000035.SZA', '300198.SZA', '000810.SZA', '300174.SZA', '000821.SZA', '000637.SZA', '300364.SZA', '000978.SZA', '300459.SZA', '600861.SHA', '601107.SHA', '002203.SZA', '002504.SZA', '000912.SZA', '600785.SHA', '600747.SHA', '000915.SZA', '300245.SZA', '002761.SZA', '601001.SHA', '002102.SZA', '000565.SZA', '600895.SHA', '002721.SZA', '600707.SHA', '300185.SZA', '300273.SZA', '603601.SHA', '002072.SZA', '300062.SZA', '002636.SZA', '300159.SZA', '600755.SHA', '300423.SZA', '603227.SHA', '600083.SHA', '002235.SZA', '300488.SZA', '002667.SZA', '002226.SZA', '002619.SZA', '000510.SZA', '002153.SZA', '002099.SZA', '002426.SZA', '002080.SZA', '600295.SHA', '300351.SZA', '000688.SZA', '300348.SZA', '600745.SHA', '002358.SZA', '300058.SZA', '002654.SZA', '002192.SZA', '300032.SZA', '000555.SZA', '002218.SZA', '000012.SZA', '002267.SZA', '002293.SZA', '000540.SZA', '603885.SHA', '600227.SHA', '603799.SHA', '300165.SZA', '000721.SZA', '600822.SHA', '600106.SHA', '300445.SZA', '002441.SZA', '002697.SZA', '601069.SHA', '000751.SZA', '300476.SZA', '002626.SZA', '600207.SHA', '002568.SZA', '002719.SZA', '002367.SZA', '002052.SZA', '300192.SZA', '300216.SZA', '002579.SZA', '002093.SZA', '000669.SZA', '300416.SZA', '300353.SZA', '300390.SZA', '601789.SHA', '600172.SHA', '601818.SHA', '603589.SHA', '300436.SZA', '000886.SZA', '000715.SZA', '600297.SHA', '300419.SZA', '600662.SHA', '600523.SHA', '300123.SZA', '002424.SZA', '600017.SHA', '002007.SZA', '002395.SZA', '600744.SHA', '603789.SHA', '600237.SHA', '600463.SHA', '000055.SZA', '002066.SZA', '601919.SHA', '000100.SZA', '300374.SZA', '300219.SZA', '002175.SZA', '600219.SHA', '600789.SHA', '601558.SHA', '300018.SZA', '300197.SZA', '600879.SHA', '300033.SZA', '000587.SZA', '002421.SZA', '002378.SZA', '000835.SZA', '002746.SZA', '603168.SHA', '002433.SZA', '002625.SZA', '601998.SHA', '300040.SZA', '600067.SHA', '600168.SHA', '002314.SZA', '000425.SZA', '300052.SZA', '002179.SZA', '601515.SHA', '002355.SZA', '002063.SZA', '300297.SZA', '000682.SZA', '002776.SZA', '000790.SZA', '601009.SHA', '300400.SZA', '601799.SHA', '600007.SHA', '000988.SZA', '002286.SZA', '002630.SZA', '002124.SZA', '601218.SHA', '002516.SZA', '600423.SHA', '600998.SHA', '600099.SHA', '601368.SHA', '002759.SZA', '000780.SZA', '002214.SZA', '600825.SHA', '601699.SHA', '600854.SHA', '002659.SZA', '300318.SZA', '002686.SZA', '002148.SZA', '002279.SZA', '300295.SZA', '002313.SZA', '300151.SZA', '600866.SHA', '300096.SZA', '002600.SZA', '002186.SZA', '600597.SHA', '600876.SHA', '300153.SZA', '002065.SZA', '002287.SZA', '002137.SZA', '000713.SZA', '000695.SZA', '600628.SHA', '300187.SZA', '002489.SZA', '002193.SZA', '300281.SZA', '601991.SHA', '300045.SZA', '300223.SZA', '300274.SZA', '600622.SHA', '601633.SHA', '601933.SHA', '000068.SZA', '300044.SZA', '600340.SHA', '300227.SZA', '601599.SHA', '300148.SZA', '601872.SHA', '002650.SZA', '300372.SZA', '002752.SZA', '000636.SZA', '600157.SHA', '002156.SZA', '600179.SHA', '300389.SZA', '002400.SZA', '001696.SZA', '002368.SZA', '600234.SHA', '603788.SHA', '603399.SHA', '300347.SZA', '002556.SZA', '600787.SHA', '600097.SHA', '600197.SHA', '601808.SHA', '600602.SHA', '002772.SZA', '600565.SHA', '600806.SHA', '000096.SZA', '002680.SZA', '600867.SHA', '002763.SZA', '300486.SZA', '000692.SZA', '002254.SZA', '300213.SZA', '000925.SZA', '600149.SHA', '600117.SHA', '000038.SZA', '002370.SZA', '601028.SHA', '002687.SZA', '600081.SHA', '601880.SHA', '300118.SZA', '002494.SZA', '002105.SZA', '600761.SHA', '002100.SZA', '601101.SHA', '002084.SZA', '002068.SZA', '002679.SZA', '600252.SHA', '600184.SHA', '002748.SZA', '002324.SZA', '300257.SZA', '002590.SZA', '002669.SZA', '300413.SZA', '000868.SZA', '600766.SHA', '603698.SHA', '000667.SZA', '002141.SZA', '300304.SZA', '300397.SZA', '002349.SZA', '002770.SZA', '000792.SZA', '300290.SZA', '000892.SZA', '002006.SZA', '300309.SZA', '601166.SHA', '601988.SHA', '300393.SZA', '600212.SHA', '002229.SZA', '300218.SZA', '000708.SZA', '600432.SHA', '300312.SZA', '000002.SZA', '002341.SZA', '600624.SHA', '600100.SHA', '002346.SZA', '000683.SZA', '600152.SHA', '300332.SZA', '600585.SHA', '000739.SZA', '000629.SZA', '002454.SZA', '600385.SHA', '002730.SZA', '600320.SHA', '002394.SZA', '000948.SZA', '002375.SZA', '600704.SHA', '600319.SHA', '600530.SHA', '002407.SZA', '600807.SHA', '601177.SHA', '300340.SZA', '600898.SHA', '600317.SHA', '300265.SZA', '002410.SZA', '601099.SHA', '600540.SHA', '600375.SHA', '600796.SHA', '600298.SHA', '002621.SZA', '000976.SZA', '002611.SZA', '600757.SHA', '000970.SZA', '601857.SHA', '002050.SZA', '300224.SZA', '000409.SZA', '600115.SHA', '300168.SZA', '002413.SZA', '000488.SZA', '000545.SZA', '600963.SHA', '601969.SHA', '300424.SZA', '600367.SHA', '002051.SZA', '600323.SHA', '002336.SZA', '300034.SZA', '000997.SZA', '002264.SZA', '300296.SZA', '600225.SHA', '000723.SZA', '002445.SZA', '002503.SZA', '002415.SZA', '000757.SZA', '300221.SZA', '300156.SZA', '600699.SHA', '600308.SHA', '000533.SZA', '002036.SZA', '000800.SZA', '002562.SZA', '300117.SZA', '600356.SHA', '002010.SZA', '600837.SHA', '002020.SZA', '002482.SZA', '002499.SZA', '600688.SHA', '300395.SZA', '300183.SZA', '000779.SZA', '002545.SZA', '600422.SHA', '601231.SHA', '603308.SHA', '600851.SHA', '600712.SHA', '600667.SHA', '002768.SZA', '600104.SHA', '000729.SZA', '002684.SZA', '000599.SZA', '002678.SZA', '000710.SZA', '600784.SHA', '600660.SHA', '300177.SZA', '002538.SZA', '300215.SZA', '000157.SZA', '600671.SHA', '000707.SZA', '600259.SHA', '603599.SHA', '300317.SZA', '600169.SHA', '600680.SHA', '002708.SZA', '002164.SZA', '300222.SZA', '600640.SHA', '600820.SHA', '300100.SZA', '300307.SZA', '002751.SZA', '300355.SZA', '002406.SZA', '300349.SZA', '601908.SHA', '300447.SZA', '600612.SHA', '002638.SZA', '002674.SZA', '002569.SZA', '300249.SZA', '000503.SZA', '000795.SZA', '000681.SZA', '001896.SZA', '600110.SHA', '600353.SHA', '600351.SHA', '000613.SZA', '300272.SZA', '300094.SZA', '300323.SZA', '600651.SHA', '000623.SZA', '300202.SZA', '600148.SHA', '600461.SHA', '002606.SZA', '002096.SZA', '300288.SZA', '300386.SZA', '000627.SZA', '600192.SHA', '300373.SZA', '300244.SZA', '600410.SHA', '300196.SZA', '000678.SZA', '603167.SHA', '002691.SZA', '002081.SZA', '600748.SHA', '300135.SZA', '600118.SHA', '300182.SZA', '300019.SZA', '600686.SHA', '603699.SHA', '600409.SHA', '000045.SZA', '000539.SZA', '000829.SZA', '600536.SHA', '300360.SZA', '002643.SZA', '002472.SZA', '002459.SZA', '002332.SZA', '600770.SHA', '000979.SZA', '300369.SZA', '300167.SZA', '002325.SZA', '002308.SZA', '000021.SZA', '603118.SHA', '600818.SHA', '002228.SZA', '300321.SZA', '601918.SHA', '002733.SZA', '000705.SZA', '002123.SZA', '600208.SHA', '600070.SHA', '600753.SHA', '002517.SZA', '002712.SZA', '300343.SZA', '600222.SHA', '000504.SZA', '600489.SHA', '000338.SZA', '600089.SHA', '000531.SZA', '600091.SHA', '002599.SZA', '000697.SZA', '300292.SZA', '600502.SHA', '600138.SHA', '300415.SZA', '002059.SZA', '300275.SZA', '600123.SHA', '002225.SZA', '300298.SZA', '002266.SZA', '002623.SZA', '601669.SHA', '600050.SHA', '002154.SZA', '300233.SZA', '600507.SHA', '600139.SHA', '600690.SHA', '300319.SZA', '300009.SZA', '300461.SZA', '300342.SZA', '002756.SZA', '600683.SHA', '600256.SHA', '002738.SZA', '002255.SZA', '300271.SZA', '000676.SZA', '600005.SHA', '600608.SHA', '002452.SZA', '000521.SZA', '002171.SZA', '601616.SHA', '002497.SZA', '600011.SHA', '002518.SZA', '300200.SZA', '601992.SHA', '000985.SZA', '603012.SHA', '000620.SZA', '600982.SHA', '000668.SZA', '600860.SHA', '600687.SHA', '601989.SHA', '000626.SZA', '600368.SHA', '600248.SHA', '000957.SZA', '000926.SZA', '600517.SHA', '600167.SHA', '000150.SZA', '300208.SZA', '600278.SHA', '300004.SZA', '000928.SZA', '002458.SZA', '000040.SZA', '600869.SHA', '002567.SZA', '002758.SZA', '600795.SHA', '600176.SHA', '600161.SHA', '300380.SZA', '601877.SHA', '600601.SHA', '300407.SZA', '603309.SHA', '002161.SZA', '300027.SZA', '000917.SZA', '002492.SZA', '600331.SHA', '002134.SZA', '600993.SHA', '600163.SHA', '600711.SHA', '600063.SHA', '002664.SZA', '600479.SHA', '300225.SZA', '000088.SZA', '300147.SZA', '000615.SZA', '600105.SHA', '000716.SZA', '601311.SHA', '002200.SZA', '600156.SHA', '601566.SHA', '002092.SZA', '002432.SZA', '603128.SHA', '600388.SHA', '002655.SZA', '002484.SZA', '002728.SZA', '002456.SZA', '300252.SZA', '002182.SZA', '600654.SHA', '600774.SHA', '600425.SHA', '600579.SHA', '600590.SHA', '300270.SZA', '600054.SHA', '000856.SZA', '300138.SZA', '600387.SHA', '000537.SZA', '601727.SHA', '000852.SZA', '300036.SZA', '000006.SZA', '600617.SHA', '600648.SHA', '300005.SZA', '300170.SZA', '002135.SZA', '600885.SHA', '002723.SZA', '000890.SZA', '000498.SZA', '000639.SZA', '002119.SZA', '300220.SZA', '000608.SZA', '600452.SHA', '000955.SZA', '603006.SHA', '002371.SZA', '600518.SHA', '601788.SHA', '002481.SZA', '600510.SHA', '600269.SHA', '002306.SZA', '002221.SZA', '000797.SZA', '000951.SZA', '000592.SZA', '000952.SZA', '600216.SHA', '000801.SZA', '000811.SZA', '600843.SHA', '000987.SZA', '601800.SHA', '000812.SZA', '600109.SHA', '600456.SHA', '002435.SZA', '600563.SHA', '000938.SZA', '300242.SZA', '002385.SZA', '600369.SHA', '000638.SZA', '002447.SZA', '600697.SHA', '300189.SZA', '300483.SZA', '000959.SZA', '600230.SHA', '300178.SZA', '002109.SZA', '300377.SZA', '600548.SHA', '601939.SHA', '002698.SZA', '002535.SZA', '000672.SZA', '000902.SZA', '300316.SZA', '601179.SHA', '600255.SHA', '002747.SZA', '600075.SHA', '600573.SHA', '600532.SHA', '000063.SZA', '600366.SHA', '002566.SZA', '300269.SZA', '002174.SZA', '300379.SZA', '600382.SHA', '000851.SZA', '300161.SZA', '300008.SZA', '600247.SHA', '600336.SHA', '300409.SZA', '300013.SZA', '603979.SHA', '300172.SZA', '000783.SZA', '600381.SHA', '000990.SZA', '300457.SZA', '600361.SHA', '000762.SZA', '002493.SZA', '601866.SHA', '600521.SHA', '000661.SZA', '600273.SHA', '603918.SHA', '000408.SZA', '002028.SZA', '300023.SZA', '600116.SHA', '600128.SHA', '000693.SZA', '300121.SZA', '600151.SHA', '300405.SZA', '002765.SZA', '002366.SZA', '600966.SHA', '600439.SHA', '000513.SZA', '300291.SZA', '002524.SZA', '000748.SZA', '000007.SZA', '300063.SZA', '000796.SZA', '600675.SHA', '002532.SZA', '002507.SZA', '002348.SZA', '600817.SHA', '600543.SHA', '600235.SHA', '600133.SHA', '300024.SZA', '002388.SZA', '603288.SHA', '002311.SZA', '002159.SZA', '600827.SHA', '603968.SHA', '002689.SZA', '002465.SZA', '300109.SZA', '000731.SZA', '601555.SHA', '600732.SHA', '000525.SZA', '000815.SZA', '300378.SZA', '600010.SHA', '600486.SHA', '002534.SZA', '002519.SZA', '603222.SHA', '300195.SZA', '600505.SHA', '002594.SZA', '600239.SHA', '002062.SZA', '600186.SHA', '000823.SZA', '300166.SZA', '002478.SZA', '600729.SHA', '000819.SZA', '000895.SZA', '600824.SHA', '300088.SZA', '600657.SHA', '600038.SHA', '002292.SZA', '000609.SZA', '002215.SZA', '002635.SZA', '300394.SZA', '300186.SZA', '002027.SZA', '002666.SZA', '300235.SZA', '002129.SZA', '600863.SHA', '600121.SHA', '300110.SZA', '002581.SZA', '600714.SHA', '600519.SHA', '601929.SHA', '600677.SHA', '300132.SZA', '601677.SHA', '600082.SHA', '000836.SZA', '600678.SHA', '603997.SHA', '600655.SHA', '002702.SZA', '300076.SZA', '002142.SZA', '601965.SHA', '600228.SHA', '300204.SZA', '000017.SZA', '600575.SHA', '603015.SHA', '600831.SHA', '300049.SZA', '002280.SZA', '002227.SZA', '300481.SZA', '300056.SZA', '600257.SHA', '002656.SZA', '002591.SZA', '000011.SZA', '600558.SHA', '300367.SZA', '600882.SHA', '300122.SZA', '002219.SZA', '600696.SHA', '600586.SHA', '000543.SZA', '002289.SZA', '002409.SZA', '002003.SZA', '300255.SZA', '002399.SZA', '600028.SHA', '000099.SZA', '601313.SHA', '002389.SZA', '002490.SZA', '600189.SHA', '600315.SHA', '600595.SHA', '300427.SZA', '300021.SZA', '600684.SHA', '000679.SZA', '000567.SZA', '603003.SHA', '002514.SZA', '000802.SZA', '300176.SZA', '002615.SZA', '600701.SHA', '300466.SZA', '000596.SZA', '300451.SZA', '300278.SZA', '300438.SZA', '600499.SHA', '601106.SHA', '000816.SZA', '000400.SZA', '603025.SHA', '000528.SZA', '600187.SHA', '002520.SZA', '600071.SHA', '002383.SZA', '002533.SZA', '300403.SZA', '002491.SZA', '002152.SZA', '002422.SZA', '002116.SZA', '300439.SZA', '601318.SHA', '000981.SZA', '600379.SHA', '002419.SZA', '000048.SZA', '600398.SHA', '600567.SHA', '300068.SZA', '002554.SZA', '000880.SZA', '600170.SHA', '002288.SZA', '600328.SHA', '603030.SHA', '600975.SHA', '600359.SHA', '002189.SZA', '600853.SHA', '000759.SZA', '002309.SZA', '600835.SHA', '600008.SHA', '000517.SZA', '603026.SHA', '600302.SHA', '002145.SZA', '600556.SHA', '002466.SZA', '000029.SZA', '300041.SZA', '300081.SZA', '002483.SZA', '002660.SZA', '002384.SZA', '002291.SZA', '002455.SZA', '603333.SHA', '000571.SZA', '300337.SZA', '600436.SHA', '300139.SZA', '600793.SHA', '002487.SZA', '002602.SZA', '300478.SZA', '000023.SZA', '002373.SZA', '300236.SZA', '300285.SZA', '600509.SHA', '000518.SZA', '002222.SZA', '000883.SZA', '601985.SHA', '002284.SZA', '002616.SZA', '601336.SHA', '000070.SZA', '300339.SZA', '000611.SZA', '600217.SHA', '600516.SHA', '300011.SZA', '000573.SZA', '300129.SZA', '600337.SHA', '002628.SZA', '300007.SZA', '000833.SZA', '002699.SZA', '002113.SZA', '600199.SHA', '002249.SZA', '002008.SZA', '300146.SZA', '601299.SHA', '002462.SZA', '000760.SZA', '600193.SHA', '603969.SHA', '000893.SZA', '002312.SZA', '002265.SZA', '000066.SZA', '600200.SHA', '002319.SZA', '603023.SHA', '002767.SZA', '601186.SHA', '300179.SZA', '600135.SHA', '000617.SZA', '002440.SZA', '603456.SHA', '002233.SZA', '000032.SZA', '600555.SHA', '002401.SZA', '600511.SHA', '600058.SHA', '300344.SZA', '000703.SZA', '300016.SZA', '600012.SHA', '000863.SZA', '002500.SZA', '002158.SZA', '002125.SZA', '002234.SZA', '002047.SZA', '600393.SHA', '002381.SZA', '600557.SHA', '600365.SHA', '002379.SZA', '300047.SZA', '000960.SZA', '000557.SZA', '300201.SZA', '000838.SZA', '600522.SHA', '002326.SZA', '600888.SHA', '600666.SHA', '600449.SHA', '002079.SZA', '002270.SZA', '600360.SHA', '000546.SZA', '002064.SZA', '603883.SHA', '002101.SZA', '600715.SHA', '000625.SZA', '300128.SZA', '000930.SZA', '300240.SZA', '600188.SHA', '002633.SZA', '002417.SZA', '603001.SHA', '002416.SZA', '600638.SHA', '002122.SZA', '002130.SZA', '300082.SZA', '300205.SZA', '600277.SHA', '002502.SZA', '600702.SHA', '600346.SHA', '601636.SHA', '600526.SHA', '600663.SHA', '600740.SHA', '600383.SHA', '300125.SZA', '002248.SZA', '300341.SZA', '000423.SZA', '000690.SZA', '002757.SZA', '000687.SZA', '300115.SZA', '000421.SZA', '600805.SHA', '600988.SHA', '000155.SZA', '603558.SHA', '300031.SZA', '002310.SZA', '600980.SHA', '000877.SZA', '000918.SZA', '603338.SHA', '600804.SHA', '000966.SZA', '300356.SZA', '601021.SHA', '600710.SHA', '601777.SHA', '000828.SZA', '600771.SHA', '600513.SHA', '600119.SHA', '600533.SHA', '000937.SZA', '000600.SZA', '002240.SZA', '300331.SZA', '600673.SHA', '600020.SHA', '601233.SHA', '600754.SHA', '601005.SHA', '600708.SHA', '000014.SZA', '002661.SZA', '000750.SZA', '002437.SZA', '002570.SZA', '000551.SZA', '000758.SZA', '300079.SZA', '603686.SHA', '002337.SZA', '600794.SHA', '300054.SZA', '002624.SZA', '300119.SZA', '002087.SZA', '603315.SHA', '000548.SZA', '000913.SZA', '002106.SZA', '600490.SHA', '601888.SHA', '600061.SHA', '002298.SZA', '000967.SZA', '300444.SZA', '002029.SZA', '000034.SZA', '002151.SZA', '300259.SZA', '600610.SHA', '600512.SHA', '002523.SZA', '000919.SZA', '002069.SZA', '002196.SZA', '002176.SZA', '000657.SZA', '600027.SHA', '000728.SZA', '300475.SZA', '600077.SHA', '600258.SHA', '002353.SZA', '300069.SZA', '000547.SZA', '600498.SHA', '603311.SHA', '300203.SZA', '300152.SZA', '600201.SHA', '000622.SZA', '002140.SZA', '600864.SHA', '600983.SHA', '002095.SZA', '300077.SZA', '600213.SHA', '600549.SHA', '002303.SZA', '601519.SHA', '603899.SHA', '002690.SZA', '600435.SHA', '002077.SZA', '000595.SZA', '002250.SZA', '300387.SZA', '601010.SHA', '600718.SHA', '600828.SHA', '002547.SZA', '600773.SHA', '002107.SZA', '002618.SZA', '000963.SZA', '600737.SHA', '601601.SHA', '601928.SHA', '600630.SHA', '002632.SZA', '002775.SZA', '002612.SZA', '600112.SHA', '600198.SHA', '603018.SHA', '600378.SHA', '300039.SZA', '002555.SZA', '600113.SHA', '002026.SZA', '600716.SHA', '600271.SHA', '002290.SZA', '600726.SHA', '300324.SZA', '603606.SHA', '603869.SHA', '002197.SZA', '002363.SZA', '300363.SZA', '002531.SZA', '601899.SHA', '002649.SZA', '600588.SHA', '002588.SZA', '600130.SHA', '000601.SZA', '600727.SHA', '002474.SZA', '600481.SHA', '600881.SHA', '600886.SHA', '002742.SZA', '000700.SZA', '000910.SZA', '601169.SHA', '600971.SHA', '300328.SZA', '600057.SHA', '002692.SZA', '002657.SZA', '600022.SHA', '002477.SZA', '603099.SHA', '002498.SZA', '600488.SHA', '000037.SZA', '603368.SHA', '600995.SHA', '002688.SZA', '600497.SHA', '600875.SHA', '002360.SZA', '600426.SHA', '000778.SZA', '600270.SHA', '600137.SHA', '002236.SZA', '600812.SHA', '600272.SHA', '600132.SHA', '600674.SHA', '600973.SHA', '002046.SZA', '000799.SZA', '002004.SZA', '601188.SHA', '300289.SZA', '600111.SHA', '002162.SZA', '000593.SZA', '000033.SZA', '300246.SZA', '000418.SZA', '603998.SHA', '002706.SZA', '002675.SZA', '601168.SHA', '002061.SZA', '600015.SHA', '002021.SZA', '300396.SZA', '000404.SZA', '000632.SZA', '300452.SZA', '002597.SZA', '002342.SZA', '600713.SHA', '300258.SZA', '600848.SHA', '600094.SHA', '300243.SZA', '600759.SHA', '600643.SHA', '002204.SZA', '002528.SZA', '002002.SZA', '603005.SHA', '600819.SHA', '002038.SZA', '002414.SZA', '600326.SHA', '000900.SZA', '002584.SZA', '000939.SZA', '002261.SZA', '000989.SZA', '600781.SHA', '000670.SZA', '600377.SHA', '002468.SZA', '300346.SZA', '000923.SZA', '600251.SHA', '000635.SZA', '002540.SZA', '600891.SHA', '300306.SZA', '600249.SHA', '600731.SHA', '000008.SZA', '002713.SZA', '300311.SZA', '600604.SHA', '300173.SZA', '603011.SHA', '000019.SZA', '300399.SZA', '002374.SZA', '002610.SZA', '002593.SZA', '002614.SZA', '002111.SZA', '002724.SZA', '002302.SZA', '002734.SZA', '300238.SZA', '300254.SZA', '600706.SHA', '002037.SZA', '600723.SHA', '002583.SZA', '000516.SZA', '002155.SZA', '600584.SHA', '300477.SZA', '002575.SZA', '000069.SZA', '600658.SHA', '300256.SZA', '002035.SZA', '002170.SZA', '600202.SHA', '002056.SZA', '603077.SHA', '002682.SZA', '002083.SZA', '600992.SHA', '000056.SZA', '600329.SHA', '600322.SHA', '002511.SZA', '002245.SZA', '300010.SZA', '300433.SZA', '002223.SZA', '000009.SZA', '002546.SZA', '002268.SZA', '002237.SZA', '002617.SZA', '000782.SZA', '000628.SZA', '000753.SZA', '002557.SZA', '600397.SHA', '300485.SZA', '002637.SZA', '300085.SZA', '000410.SZA', '002423.SZA', '600865.SHA', '000429.SZA', '000558.SZA', '002147.SZA', '300230.SZA', '002365.SZA', '002418.SZA', '601890.SHA', '002559.SZA', '000415.SZA', '601117.SHA', '600300.SHA', '600962.SHA', '000717.SZA', '002012.SZA', '600196.SHA', '600282.SHA', '002576.SZA', '002058.SZA', '600420.SHA', '002726.SZA', '600338.SHA', '000786.SZA', '600883.SHA', '300046.SZA', '600171.SHA', '300191.SZA', '600218.SHA', '600460.SHA', '300133.SZA', '300051.SZA', '601999.SHA', '000791.SZA', '300366.SZA', '300338.SZA', '603566.SHA', '300124.SZA', '002722.SZA', '002195.SZA', '603518.SHA', '600108.SHA', '300171.SZA', '300279.SZA', '000541.SZA', '002013.SZA', '002213.SZA', '002033.SZA', '002166.SZA', '000798.SZA', '600566.SHA', '600599.SHA', '600639.SHA', '002049.SZA', '601208.SHA', '002773.SZA', '002347.SZA', '603169.SHA', '300026.SZA', '000962.SZA', '002741.SZA', '000903.SZA', '000887.SZA', '002307.SZA', '002131.SZA', '000010.SZA', '002387.SZA', '601258.SHA', '600093.SHA', '002239.SZA', '000031.SZA', '000889.SZA', '603009.SHA', '601886.SHA', '300428.SZA', '002564.SZA', '300315.SZA', '000530.SZA', '002043.SZA', '002552.SZA', '000426.SZA', '002560.SZA', '603010.SHA', '600088.SHA', '300336.SZA', '002160.SZA', '300401.SZA', '000961.SZA', '002277.SZA', '002146.SZA', '002769.SZA', '002316.SZA', '600778.SHA', '603008.SHA', '600279.SHA', '600021.SHA', '600080.SHA', '600444.SHA', '000529.SZA', '000506.SZA', '600546.SHA', '600312.SHA', '300067.SZA', '603993.SHA', '600395.SHA', '600767.SHA', '002641.SZA', '603611.SHA', '300048.SZA', '002646.SZA', '600370.SHA', '002057.SZA', '603123.SHA', '603616.SHA', '002329.SZA', '002753.SZA', '002382.SZA', '600074.SHA', '600389.SHA', '600738.SHA', '300126.SZA', '300072.SZA', '000584.SZA', '002408.SZA', '600545.SHA', '000043.SZA', '600960.SHA', '300015.SZA', '600173.SHA', '002652.SZA', '002755.SZA', '600581.SHA', '002198.SZA', '600399.SHA', '002181.SZA', '300003.SZA', '002108.SZA', '603729.SHA', '600600.SHA', '300239.SZA', '300247.SZA', '603158.SHA', '603223.SHA', '002361.SZA', '601567.SHA', '601328.SHA', '000839.SZA', '002572.SZA', '002480.SZA', '600236.SHA', '601968.SHA', '300375.SZA', '600503.SHA', '601216.SHA', '600734.SHA', '000550.SZA', '600325.SHA', '000416.SZA', '601518.SHA', '002473.SZA', '300333.SZA', '000686.SZA', '600609.SHA', '600280.SHA', '600026.SHA', '300113.SZA', '600547.SHA', '002138.SZA', '601388.SHA', '002039.SZA', '603718.SHA', '601333.SHA', '300214.SZA', '600306.SHA', '002683.SZA', '600633.SHA', '601579.SHA', '600615.SHA', '300414.SZA', '000830.SZA', '601012.SHA', '002085.SZA', '601011.SHA', '002016.SZA', '600984.SHA', '002317.SZA', '603898.SHA', '300430.SZA', '603117.SHA', '300145.SZA', '601058.SHA', '603188.SHA', '603818.SHA', '600501.SHA', '002377.SZA', '000090.SZA', '600826.SHA', '000616.SZA', '002390.SZA', '600578.SHA', '300329.SZA', '300017.SZA', '002018.SZA', '300217.SZA', '002031.SZA', '300059.SZA', '601718.SHA', '300422.SZA', '002727.SZA', '600030.SHA', '300241.SZA', '000028.SZA', '000333.SZA', '600719.SHA', '002163.SZA', '002762.SZA', '600335.SHA', '600703.SHA', '603022.SHA', '300371.SZA', '300104.SZA', '600127.SHA', '600358.SHA', '600084.SHA', '002622.SZA', '002548.SZA', '002359.SZA', '300105.SZA', '600241.SHA', '600096.SHA', '000969.SZA', '300382.SZA', '002701.SZA', '300260.SZA', '600332.SHA', '603688.SHA', '600884.SHA', '000908.SZA', '000965.SZA', '600693.SHA', '300053.SZA', '600838.SHA', '002725.SZA', '600641.SHA', '300450.SZA', '300398.SZA', '000606.SZA', '000995.SZA', '600275.SHA', '300163.SZA', '002067.SZA', '002297.SZA', '603889.SHA', '600182.SHA', '000848.SZA', '300111.SZA', '000712.SZA', '000422.SZA', '300066.SZA', '002104.SZA', '300164.SZA', '600016.SHA', '603017.SHA', '600649.SHA', '300237.SZA', '300092.SZA', '000061.SZA', '000663.SZA', '000788.SZA', '600339.SHA', '600777.SHA', '000737.SZA', '600141.SHA', '000677.SZA', '601678.SHA', '002169.SZA', '000572.SZA', '002177.SZA', '600146.SHA', '002501.SZA', '600811.SHA', '600577.SHA', '300429.SZA', '300211.SZA', '002015.SZA', '000655.SZA', '000301.SZA', '603166.SHA', '600418.SHA', '600551.SHA', '300465.SZA', '603198.SHA', '300411.SZA', '002328.SZA', '000881.SZA', '000591.SZA', '601007.SHA', '002024.SZA', '600415.SHA', '600582.SHA', '603318.SHA', '002322.SZA', '601118.SHA', '300357.SZA', '002246.SZA', '000709.SZA', '600428.SHA', '002396.SZA', '000597.SZA', '002076.SZA', '002216.SZA', '300080.SZA', '600735.SHA', '601198.SHA', '601111.SHA', '603002.SHA', '600872.SHA', '000860.SZA', '000586.SZA', '601088.SHA', '300471.SZA', '600293.SHA', '300434.SZA', '000553.SZA', '000809.SZA', '600362.SHA', '000936.SZA', '000607.SZA', '002187.SZA', '000633.SZA', '601339.SHA', '300303.SZA', '002188.SZA', '600180.SHA', '600221.SHA', '600220.SHA', '603111.SHA', '002537.SZA', '600310.SHA', '300083.SZA', '002110.SZA', '300028.SZA', '600623.SHA', '002515.SZA', '600233.SHA', '603901.SHA', '600776.SHA', '600266.SHA', '300199.SZA', '002352.SZA', '002071.SZA', '601211.SHA', '600405.SHA', '002331.SZA', '000825.SZA', '600780.SHA', '600421.SHA', '000971.SZA', '600802.SHA', '600476.SHA', '601607.SHA', '600242.SHA', '002676.SZA', '300251.SZA', '300464.SZA', '002073.SZA', '603300.SHA', '002585.SZA', '002740.SZA', '300482.SZA', '002522.SZA', '002086.SZA', '600724.SHA', '600611.SHA', '600307.SHA', '002258.SZA', '603806.SHA', '002362.SZA', '002338.SZA', '600552.SHA', '601018.SHA', '300137.SZA', '300154.SZA', '002703.SZA', '600791.SHA', '002299.SZA', '002185.SZA', '002595.SZA', '002274.SZA', '300108.SZA', '300294.SZA', '300417.SZA', '600539.SHA', '300473.SZA', '601996.SHA', '002671.SZA', '002448.SZA', '600288.SHA', '600569.SHA', '300418.SZA', '000813.SZA', '600455.SHA', '000046.SZA', '600036.SHA', '300064.SZA', '000590.SZA', '002658.SZA', '002343.SZA', '000062.SZA', '603019.SHA', '600999.SHA', '002731.SZA', '002405.SZA', '000058.SZA', '600691.SHA', '000820.SZA', '002088.SZA', '000722.SZA', '002402.SZA', '002244.SZA', '600232.SHA', '002320.SZA', '601126.SHA', '002461.SZA', '600162.SHA', '600506.SHA', '002323.SZA', '600800.SHA', '000523.SZA', '000933.SZA', '000909.SZA', '000534.SZA', '300210.SZA', '300093.SZA', '600408.SHA', '600959.SHA', '600287.SHA', '300127.SZA', '002334.SZA', '600652.SHA', '600769.SHA', '002729.SZA', '300194.SZA', '600682.SHA', '600079.SHA', '300142.SZA', '601038.SHA', '002530.SZA', '002586.SZA', '600550.SHA', '002428.SZA', '002404.SZA', '600000.SHA', '000732.SZA', '002207.SZA', '600653.SHA', '002273.SZA', '600746.SHA', '600153.SHA', '000720.SZA', '300014.SZA', '600386.SHA', '600313.SHA', '002356.SZA', '300362.SZA', '600155.SHA', '000519.SZA', '300368.SZA', '600862.SHA', '002634.SZA', '002526.SZA', '601116.SHA', '600281.SHA', '600396.SHA', '300087.SZA', '002121.SZA', '300455.SZA', '002296.SZA', '300359.SZA', '002749.SZA', '600354.SHA', '600290.SHA', '600535.SHA', '002714.SZA', '600846.SHA', '600568.SHA', '300158.SZA', '002212.SZA', '600178.SHA', '600265.SHA', '600143.SHA', '000419.SZA', '002330.SZA', '601898.SHA', '000022.SZA', '000059.SZA', '601006.SHA', '000509.SZA', '600039.SHA', '601098.SHA', '002577.SZA', '600348.SHA', '002495.SZA', '000806.SZA', '002665.SZA', '600240.SHA', '600560.SHA', '002434.SZA', '000428.SZA', '600391.SHA', '603116.SHA', '603355.SHA', '600203.SHA', '300055.SZA', '600650.SHA', '002009.SZA', '600997.SHA', '600850.SHA', '600605.SHA', '002442.SZA', '000685.SZA', '002275.SZA', '600131.SHA', '600858.SHA', '601688.SHA', '000420.SZA', '002005.SZA', '600037.SHA', '300267.SZA', '600480.SHA', '600246.SHA', '002120.SZA', '300388.SZA', '000561.SZA', '600284.SHA', '000610.SZA', '000526.SZA', '002094.SZA', '002206.SZA', '002150.SZA', '600515.SHA', '600593.SHA', '300325.SZA', '300282.SZA', '002165.SZA', '002252.SZA', '000719.SZA', '600035.SHA', '600896.SHA', '300437.SZA', '600810.SHA', '000417.SZA', '002470.SZA', '000407.SZA', '002357.SZA', '002272.SZA', '002205.SZA', '600814.SHA', '601668.SHA', '002285.SZA', '600469.SHA', '603126.SHA', '002604.SZA', '600808.SHA', '002739.SZA', '600226.SHA', '600508.SHA', '600841.SHA', '300089.SZA', '600223.SHA', '300234.SZA', '002694.SZA', '600475.SHA', '000594.SZA', '300406.SZA', '300277.SZA', '002103.SZA', '002685.SZA', '002301.SZA', '000581.SZA', '600620.SHA', '300330.SZA', '000932.SZA', '002253.SZA', '600741.SHA', '002217.SZA', '603020.SHA', '300443.SZA', '600185.SHA', '000065.SZA', '002544.SZA', '300335.SZA', '600262.SHA', '601958.SHA', '002578.SZA', '002736.SZA', '600419.SHA', '600477.SHA', '000996.SZA', '600694.SHA', '002318.SZA', '600048.SHA', '300470.SZA', '002114.SZA', '300144.SZA', '002527.SZA', '002369.SZA', '002486.SZA', '600446.SHA', '600967.SHA', '002563.SZA', '000566.SZA', '002707.SZA', '601628.SHA', '300334.SZA', '002344.SZA', '300074.SZA', '600721.SHA', '300421.SZA', '300209.SZA', '600352.SHA', '600990.SHA', '300322.SZA', '002760.SZA', '000776.SZA', '000598.SZA', '300462.SZA', '600190.SHA', '601608.SHA', '603939.SHA', '600763.SHA', '002190.SZA', '002512.SZA', '002642.SZA', '603766.SHA', '300120.SZA', '002074.SZA', '600373.SHA', '300057.SZA', '600333.SHA', '300157.SZA', '000980.SZA', '600537.SHA', '300038.SZA', '600166.SHA', '300293.SZA', '002460.SZA', '600829.SHA', '000060.SZA', '000793.SZA', '300467.SZA', '002001.SZA', '300212.SZA', '000570.SZA', '601766.SHA', '002609.SZA', '300107.SZA', '000001.SZA', '000927.SZA', '600238.SHA', '603369.SHA', '300012.SZA', '000030.SZA', '002392.SZA', '600868.SHA', '600355.SHA', '600836.SHA', '002199.SZA', '300404.SZA', '002672.SZA', '002194.SZA', '000005.SZA', '000878.SZA', '300098.SZA', '000977.SZA', '000953.SZA', '300232.SZA', '600229.SHA', '600283.SHA', '000151.SZA', '000524.SZA', '300426.SZA', '000869.SZA', '000582.SZA', '000004.SZA', '002607.SZA', '000850.SZA', '002278.SZA', '300091.SZA', '600978.SHA', '300442.SZA', '002589.SZA', '300498.SZA', '002321.SZA', '600894.SHA', '600330.SHA', '601158.SHA', '002167.SZA', '002022.SZA', '300037.SZA', '600559.SHA', '002631.SZA', '002364.SZA', '300326.SZA', '600019.SHA', '600485.SHA', '600981.SHA', '300472.SZA', '300250.SZA', '002549.SZA', '002173.SZA', '000803.SZA', '600594.SHA', '002230.SZA', '600078.SHA', '600758.SHA', '603100.SHA', '000726.SZA', '600661.SHA', '600390.SHA', '601717.SHA', '300408.SZA', '300266.SZA', '300420.SZA', '002256.SZA', '000711.SZA', '000589.SZA', '601700.SHA', '300276.SZA', '600870.SHA', '002709.SZA', '600291.SHA', '600062.SHA', '000564.SZA', '002126.SZA', '600834.SHA', '000691.SZA', '002505.SZA', '000662.SZA', '300412.SZA', '002420.SZA', '600689.SHA', '600756.SHA', '600029.SHA', '002351.SZA', '000861.SZA', '603598.SHA', '002677.SZA', '000818.SZA', '603108.SHA', '300354.SZA', '002539.SZA', '002670.SZA', '002668.SZA', '000650.SZA', '300487.SZA', '600520.SHA', '300480.SZA', '600268.SHA', '600429.SHA', '600679.SHA', '002300.SZA', '002479.SZA', '600261.SHA', '601226.SHA', '600900.SHA', '000042.SZA', '300305.SZA', '300468.SZA', '600965.SHA', '002224.SZA', '600705.SHA', '000568.SZA', '002737.SZA', '002262.SZA', '002208.SZA', '600023.SHA', '002695.SZA', '002510.SZA', '600809.SHA', '600695.SHA', '300453.SZA', '600311.SHA', '002238.SZA', '300134.SZA', '600892.SHA', '600816.SHA', '002750.SZA', '002294.SZA', '002118.SZA', '000562.SZA', '600613.SHA', '000559.SZA', '000532.SZA', '300327.SZA', '300384.SZA', '000025.SZA', '000756.SZA', '000735.SZA', '000999.SZA', '300001.SZA', '300381.SZA', '601199.SHA', '000826.SZA', '600987.SHA', '600764.SHA', '300376.SZA', '002735.SZA', '000950.SZA', '002339.SZA', '002210.SZA', '300035.SZA', '000544.SZA', '002276.SZA', '000505.SZA', '002202.SZA', '600009.SHA', '002582.SZA', '300207.SZA', '603021.SHA', '600056.SHA', '000403.SZA', '601798.SHA', '000931.SZA', '002231.SZA', '600815.SHA', '300365.SZA', '000024.SZA', '300050.SZA', '603555.SHA', '600159.SHA', '002732.SZA', '300431.SZA', '002014.SZA', '000888.SZA', '601238.SHA', '600976.SHA', '600570.SHA', '002078.SZA', '300025.SZA', '600285.SHA', '600482.SHA', '600466.SHA', '603808.SHA', '000585.SZA', '601100.SHA', '002091.SZA', '600823.SHA', '600210.SHA', '002451.SZA', '300181.SZA', '002090.SZA', '002645.SZA', '603989.SHA', '002143.SZA', '300391.SZA', '000020.SZA', '600531.SHA', '603588.SHA', '002060.SZA', '600260.SHA', '300310.SZA', '002350.SZA', '000862.SZA', '002467.SZA', '300143.SZA', '300116.SZA', '600969.SHA', '002745.SZA', '600733.SHA', '600637.SHA', '600467.SHA', '300314.SZA', '002513.SZA', '600897.SHA', '601288.SHA', '000538.SZA', '601600.SHA', '600621.SHA', '600749.SHA', '002403.SZA', '600448.SHA', '600765.SHA', '002242.SZA', '600309.SHA', '000897.SZA', '600158.SHA', '002048.SZA', '600798.SHA', '002271.SZA', '000876.SZA', '002269.SZA', '300002.SZA', '300263.SZA', '600086.SHA', '300441.SZA', '600321.SHA', '002128.SZA', '300090.SZA', '600301.SHA', '002766.SZA', '601377.SHA', '600095.SHA', '300261.SZA', '000837.SZA', '600500.SHA', '002340.SZA', '000536.SZA', '300402.SZA', '600145.SHA', '600792.SHA', '000050.SZA', '000911.SZA', '002055.SZA', '000736.SZA', '000502.SZA', '000036.SZA', '601689.SHA', '002639.SZA', '002136.SZA', '000671.SZA', '002191.SZA', '002247.SZA', '601139.SHA', '002476.SZA', '600060.SHA', '600478.SHA', '002450.SZA', '000831.SZA', '300206.SZA', '600782.SHA', '002443.SZA', '601666.SHA', '002241.SZA', '002696.SZA', '600069.SHA', '002211.SZA', '603567.SHA', '002608.SZA', '002380.SZA', '600961.SHA', '600698.SHA', '600276.SHA', '300231.SZA', '300180.SZA', '601801.SHA', '600592.SHA', '300136.SZA', '000725.SZA', '600720.SHA', '002327.SZA', '002543.SZA', '300042.SZA', '600562.SHA', '600606.SHA', '002032.SZA', '000049.SZA', '002663.SZA', '300073.SZA', '600676.SHA', '603306.SHA', '000656.SZA', '300253.SZA', '600403.SHA', '600483.SHA', '002457.SZA', '002376.SZA', '603600.SHA', '603828.SHA', '000603.SZA', '600136.SHA', '600183.SHA', '002598.SZA', '000027.SZA', '000958.SZA', '000807.SZA', '600363.SHA', '300425.SZA', '300086.SZA', '002132.SZA', '300155.SZA', '300101.SZA', '002717.SZA', '000016.SZA', '002743.SZA', '600803.SHA', '600893.SHA', '000768.SZA', '002089.SZA', '603066.SHA', '002573.SZA', '000738.SZA', '603366.SHA', '002220.SZA', '300226.SZA', '000998.SZA', '002508.SZA', '600618.SHA', '000158.SZA', '600125.SHA', '600855.SHA', '600206.SHA', '002574.SZA', '002082.SZA', '600647.SHA', '000718.SZA', '603088.SHA', '000935.SZA', '600889.SHA', '300188.SZA', '000680.SZA', '000975.SZA', '600191.SHA', '000501.SZA', '300460.SZA', '002425.SZA', '000899.SZA', '000920.SZA', '002184.SZA', '000511.SZA', '002209.SZA', '600316.SHA', '002550.SZA', '000563.SZA', '600783.SHA', '300184.SZA', '600571.SHA', '600742.SHA', '002471.SZA', '600603.SHA', '000156.SZA', '002662.SZA', '002592.SZA', '600877.SHA', '000859.SZA', '600839.SHA', '300320.SZA', '000507.SZA', '000949.SZA', '300308.SZA', '000619.SZA', '601015.SHA', '300383.SZA', '600470.SHA', '002053.SZA', '600215.SHA', '002260.SZA', '002429.SZA', '000576.SZA', '600209.SHA', '000413.SZA', '600491.SHA', '600844.SHA', '002436.SZA', '600619.SHA', '300287.SZA', '002201.SZA', '601137.SHA', '300114.SZA', '000906.SZA', '600685.SHA', '600120.SHA', '600743.SHA', '603609.SHA', '600068.SHA', '601222.SHA', '600076.SHA', '300280.SZA', '300097.SZA', '002144.SZA', '002640.SZA', '002653.SZA', '002469.SZA', '601390.SHA', '600525.SHA', '002398.SZA', '600487.SHA', '600103.SHA', '600561.SHA', '600064.SHA', '600250.SHA', '300264.SZA', '002044.SZA', '300071.SZA', '002115.SZA', '600985.SHA', '002025.SZA', '600055.SHA', '000630.SZA', '002411.SZA', '600642.SHA', '002117.SZA', '600495.SHA', '002183.SZA', '002529.SZA', '000905.SZA', '600871.SHA', '600350.SHA', '002439.SZA', '600917.SHA', '000916.SZA', '601398.SHA', '000733.SZA', '600668.SHA', '600101.SHA', '002259.SZA', '002771.SZA', '600177.SHA'], 'plot_ndcg': <bound method plot_ndcg of {...}>}

    {"Description":"实验创建于2017/8/26","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-15:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"DestinationInputPortId":"-215:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-8:data"},{"DestinationInputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data1","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-15:data"},{"DestinationInputPortId":"-215:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-222:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-231:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-238:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-488:features","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-24:data"},{"DestinationInputPortId":"-502:input_data","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data"},{"DestinationInputPortId":"-250:options_data","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:predictions"},{"DestinationInputPortId":"-231:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"DestinationInputPortId":"-250:instruments","SourceOutputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-62:data"},{"DestinationInputPortId":"-222:input_data","SourceOutputPortId":"-215:data"},{"DestinationInputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-53:data2","SourceOutputPortId":"-222:data"},{"DestinationInputPortId":"-238:input_data","SourceOutputPortId":"-231:data"},{"DestinationInputPortId":"-506:input_data","SourceOutputPortId":"-238:data"},{"DestinationInputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:model","SourceOutputPortId":"-488:model"},{"DestinationInputPortId":"-488:training_ds","SourceOutputPortId":"-502:data"},{"DestinationInputPortId":"287d2cb0-f53c-4101-bdf8-104b137c8601-60:data","SourceOutputPortId":"-506:data"}],"ModuleNodes":[{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2010-01-01","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"2011-01-01","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-8"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-8","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":1,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-15","ModuleId":"BigQuantSpace.advanced_auto_labeler.advanced_auto_labeler-v2","ModuleParameters":[{"Name":"label_expr","Value":"# #号开始的表示注释\n# 0. 每行一个,顺序执行,从第二个开始,可以使用label字段\n# 1. 可用数据字段见 https://bigquant.com/docs/develop/datasource/deprecated/history_data.html\n# 添加benchmark_前缀,可使用对应的benchmark数据\n# 2. 可用操作符和函数见 `表达式引擎 <https://bigquant.com/docs/develop/bigexpr/usage.html>`_\n\n# 计算收益:5日收盘价(作为卖出价格)除以明日开盘价(作为买入价格)\nshift(close, -5) / shift(open, -1)\n\n# 极值处理:用1%和99%分位的值做clip\nclip(label, all_quantile(label, 0.01), all_quantile(label, 0.99))\n\n# 将分数映射到分类,这里使用20个分类\nall_wbins(label, 20)\n\n# 过滤掉一字涨停的情况 (设置label为NaN,在后续处理和训练中会忽略NaN的label)\nwhere(shift(high, -1) == shift(low, -1), NaN, label)\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"start_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"benchmark","Value":"000300.SHA","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"drop_na_label","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"cast_label_int","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"user_functions","Value":"","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-15"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-15","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":2,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-24","ModuleId":"BigQuantSpace.input_features.input_features-v1","ModuleParameters":[{"Name":"features","Value":"# #号开始的表示注释\n# 多个特征,每行一个,可以包含基础特征和衍生特征\nreturn_5\nreturn_10\nreturn_20\navg_amount_0/avg_amount_5\navg_amount_5/avg_amount_20\nrank_avg_amount_0/rank_avg_amount_5\nrank_avg_amount_5/rank_avg_amount_10\nrank_return_0\nrank_return_5\nrank_return_10\nrank_return_0/rank_return_5\nrank_return_5/rank_return_10\npe_ttm_0\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":3,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-53","ModuleId":"BigQuantSpace.join.join-v3","ModuleParameters":[{"Name":"on","Value":"date,instrument","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"how","Value":"inner","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"sort","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data1","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-53"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data2","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-53"}],"OutputPortsInternal":[{"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-53","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":7,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-60","ModuleId":"BigQuantSpace.stock_ranker_predict.stock_ranker_predict-v5","ModuleParameters":[{"Name":"m_lazy_run","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"model","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-60"}],"OutputPortsInternal":[{"Name":"predictions","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-60","OutputType":null},{"Name":"m_lazy_run","NodeId":"287d2cb0-f53c-4101-bdf8-104b137c8601-60","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":8,"Comment":"","CommentCollapsed":true},{"Id":"287d2cb0-f53c-4101-bdf8-104b137c8601-62","ModuleId":"BigQuantSpace.instruments.instruments-v2","ModuleParameters":[{"Name":"start_date","Value":"2015-01-01","ValueType":"Literal","LinkedGlobalParameter":"交易日期"},{"Name":"end_date","Value":"2016-01-01","ValueType":"Literal","LinkedGlobalParameter":"交易日期"},{"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":9,"Comment":"预测数据,用于回测和模拟","CommentCollapsed":false},{"Id":"-215","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":90,"ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-215"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-215"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-215","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":15,"Comment":"","CommentCollapsed":true},{"Id":"-222","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":"-222"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-222"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-222","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":16,"Comment":"","CommentCollapsed":true},{"Id":"-231","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":90,"ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-231"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-231"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-231","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":17,"Comment":"","CommentCollapsed":true},{"Id":"-238","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":"-238"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-238"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-238","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":18,"Comment":"","CommentCollapsed":true},{"Id":"-250","ModuleId":"BigQuantSpace.trade.trade-v4","ModuleParameters":[{"Name":"start_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"end_date","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"initialize","Value":"# 回测引擎:初始化函数,只执行一次\ndef bigquant_run(context):\n # 加载预测数据\n context.ranker_prediction = context.options['data'].read_df()\n\n # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数\n context.set_commission(PerOrder(buy_cost=0.0003, sell_cost=0.0013, min_cost=5))\n # 预测数据,通过options传入进来,使用 read_df 函数,加载到内存 (DataFrame)\n # 设置买入的股票数量,这里买入预测股票列表排名靠前的5只\n stock_count = 5\n # 每只的股票的权重,如下的权重分配会使得靠前的股票分配多一点的资金,[0.339160, 0.213986, 0.169580, ..]\n context.stock_weights = T.norm([1 / math.log(i + 2) for i in range(0, stock_count)])\n # 设置每只股票占用的最大资金比例\n context.max_cash_per_instrument = 0.2\n context.options['hold_days'] = 5\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"handle_data","Value":"# 回测引擎:每日数据处理函数,每天执行一次\ndef bigquant_run(context, data):\n # 按日期过滤得到今日的预测数据\n ranker_prediction = context.ranker_prediction[\n context.ranker_prediction.date == data.current_dt.strftime('%Y-%m-%d')]\n\n # 1. 资金分配\n # 平均持仓时间是hold_days,每日都将买入股票,每日预期使用 1/hold_days 的资金\n # 实际操作中,会存在一定的买入误差,所以在前hold_days天,等量使用资金;之后,尽量使用剩余资金(这里设置最多用等量的1.5倍)\n is_staging = context.trading_day_index < context.options['hold_days'] # 是否在建仓期间(前 hold_days 天)\n cash_avg = context.portfolio.portfolio_value / context.options['hold_days']\n cash_for_buy = min(context.portfolio.cash, (1 if is_staging else 1.5) * cash_avg)\n cash_for_sell = cash_avg - (context.portfolio.cash - cash_for_buy)\n positions = {e.symbol: p.amount * p.last_sale_price\n for e, p in context.portfolio.positions.items()}\n\n # 2. 生成卖出订单:hold_days天之后才开始卖出;对持仓的股票,按机器学习算法预测的排序末位淘汰\n if not is_staging and cash_for_sell > 0:\n equities = {e.symbol: e for e, p in context.portfolio.positions.items()}\n instruments = list(reversed(list(ranker_prediction.instrument[ranker_prediction.instrument.apply(\n lambda x: x in equities)])))\n\n for instrument in instruments:\n context.order_target(context.symbol(instrument), 0)\n cash_for_sell -= positions[instrument]\n if cash_for_sell <= 0:\n break\n\n # 3. 生成买入订单:按机器学习算法预测的排序,买入前面的stock_count只股票\n buy_cash_weights = context.stock_weights\n buy_instruments = list(ranker_prediction.instrument[:len(buy_cash_weights)])\n max_cash_per_instrument = context.portfolio.portfolio_value * context.max_cash_per_instrument\n for i, instrument in enumerate(buy_instruments):\n cash = cash_for_buy * buy_cash_weights[i]\n if cash > max_cash_per_instrument - positions.get(instrument, 0):\n # 确保股票持仓量不会超过每次股票最大的占用资金量\n cash = max_cash_per_instrument - positions.get(instrument, 0)\n if cash > 0:\n context.order_value(context.symbol(instrument), cash)\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"prepare","Value":"# 回测引擎:准备数据,只执行一次\ndef bigquant_run(context):\n pass\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"before_trading_start","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"volume_limit","Value":0.025,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"order_price_field_buy","Value":"open","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"order_price_field_sell","Value":"close","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"capital_base","Value":1000000,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"auto_cancel_non_tradable_orders","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"data_frequency","Value":"daily","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"price_type","Value":"真实价格","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"product_type","Value":"股票","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"plot_charts","Value":"True","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"backtest_only","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"benchmark","Value":"000300.SHA","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"instruments","NodeId":"-250"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"options_data","NodeId":"-250"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"history_ds","NodeId":"-250"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"benchmark_ds","NodeId":"-250"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"trading_calendar","NodeId":"-250"}],"OutputPortsInternal":[{"Name":"raw_perf","NodeId":"-250","OutputType":null}],"UsePreviousResults":false,"moduleIdForCode":19,"Comment":"","CommentCollapsed":true},{"Id":"-488","ModuleId":"BigQuantSpace.stock_ranker_train.stock_ranker_train-v6","ModuleParameters":[{"Name":"learning_algorithm","Value":"排序","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"number_of_leaves","Value":30,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"minimum_docs_per_leaf","Value":1000,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"number_of_trees","Value":20,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"learning_rate","Value":0.1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"max_bins","Value":1023,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"feature_fraction","Value":1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"data_row_fraction","Value":1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"ndcg_discount_base","Value":1,"ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"m_lazy_run","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"training_ds","NodeId":"-488"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-488"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"test_ds","NodeId":"-488"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"base_model","NodeId":"-488"}],"OutputPortsInternal":[{"Name":"model","NodeId":"-488","OutputType":null},{"Name":"feature_gains","NodeId":"-488","OutputType":null},{"Name":"m_lazy_run","NodeId":"-488","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":4,"Comment":"","CommentCollapsed":true},{"Id":"-502","ModuleId":"BigQuantSpace.dropnan.dropnan-v2","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-502"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-502"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-502","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":5,"Comment":"","CommentCollapsed":true},{"Id":"-506","ModuleId":"BigQuantSpace.dropnan.dropnan-v2","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data","NodeId":"-506"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"features","NodeId":"-506"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-506","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":10,"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-8' Position='211,64,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-15' Position='70,183,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-24' Position='765,21,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-53' Position='249,375,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-60' Position='891.534423828125,642.1781005859375,200,200'/><NodePosition Node='287d2cb0-f53c-4101-bdf8-104b137c8601-62' Position='1074,127,200,200'/><NodePosition Node='-215' Position='381,188,200,200'/><NodePosition Node='-222' Position='385,280,200,200'/><NodePosition Node='-231' Position='1078,236,200,200'/><NodePosition Node='-238' Position='1081,327,200,200'/><NodePosition Node='-250' Position='1037,751,200,200'/><NodePosition Node='-488' Position='638,561,200,200'/><NodePosition Node='-502' Position='376,467,200,200'/><NodePosition Node='-506' Position='1078,418,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 [21]:
    # 本代码由可视化策略环境自动生成 2020年8月21日 09:55
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    # 回测引擎:初始化函数,只执行一次
    def m19_initialize_bigquant_run(context):
        # 加载预测数据
        context.ranker_prediction = context.options['data'].read_df()
    
        # 系统已经设置了默认的交易手续费和滑点,要修改手续费可使用如下函数
        context.set_commission(PerOrder(buy_cost=0.0003, sell_cost=0.0013, min_cost=5))
        # 预测数据,通过options传入进来,使用 read_df 函数,加载到内存 (DataFrame)
        # 设置买入的股票数量,这里买入预测股票列表排名靠前的5只
        stock_count = 5
        # 每只的股票的权重,如下的权重分配会使得靠前的股票分配多一点的资金,[0.339160, 0.213986, 0.169580, ..]
        context.stock_weights = T.norm([1 / math.log(i + 2) for i in range(0, stock_count)])
        # 设置每只股票占用的最大资金比例
        context.max_cash_per_instrument = 0.2
        context.options['hold_days'] = 5
    
    # 回测引擎:每日数据处理函数,每天执行一次
    def m19_handle_data_bigquant_run(context, data):
        # 按日期过滤得到今日的预测数据
        ranker_prediction = context.ranker_prediction[
            context.ranker_prediction.date == data.current_dt.strftime('%Y-%m-%d')]
    
        # 1. 资金分配
        # 平均持仓时间是hold_days,每日都将买入股票,每日预期使用 1/hold_days 的资金
        # 实际操作中,会存在一定的买入误差,所以在前hold_days天,等量使用资金;之后,尽量使用剩余资金(这里设置最多用等量的1.5倍)
        is_staging = context.trading_day_index < context.options['hold_days'] # 是否在建仓期间(前 hold_days 天)
        cash_avg = context.portfolio.portfolio_value / context.options['hold_days']
        cash_for_buy = min(context.portfolio.cash, (1 if is_staging else 1.5) * cash_avg)
        cash_for_sell = cash_avg - (context.portfolio.cash - cash_for_buy)
        positions = {e.symbol: p.amount * p.last_sale_price
                     for e, p in context.portfolio.positions.items()}
    
        # 2. 生成卖出订单:hold_days天之后才开始卖出;对持仓的股票,按机器学习算法预测的排序末位淘汰
        if not is_staging and cash_for_sell > 0:
            equities = {e.symbol: e for e, p in context.portfolio.positions.items()}
            instruments = list(reversed(list(ranker_prediction.instrument[ranker_prediction.instrument.apply(
                    lambda x: x in equities)])))
    
            for instrument in instruments:
                context.order_target(context.symbol(instrument), 0)
                cash_for_sell -= positions[instrument]
                if cash_for_sell <= 0:
                    break
    
        # 3. 生成买入订单:按机器学习算法预测的排序,买入前面的stock_count只股票
        buy_cash_weights = context.stock_weights
        buy_instruments = list(ranker_prediction.instrument[:len(buy_cash_weights)])
        max_cash_per_instrument = context.portfolio.portfolio_value * context.max_cash_per_instrument
        for i, instrument in enumerate(buy_instruments):
            cash = cash_for_buy * buy_cash_weights[i]
            if cash > max_cash_per_instrument - positions.get(instrument, 0):
                # 确保股票持仓量不会超过每次股票最大的占用资金量
                cash = max_cash_per_instrument - positions.get(instrument, 0)
            if cash > 0:
                context.order_value(context.symbol(instrument), cash)
    
    # 回测引擎:准备数据,只执行一次
    def m19_prepare_bigquant_run(context):
        pass
    
    
    m1 = M.instruments.v2(
        start_date='2010-01-01',
        end_date='2011-01-01',
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m2 = M.advanced_auto_labeler.v2(
        instruments=m1.data,
        label_expr="""# #号开始的表示注释
    # 0. 每行一个,顺序执行,从第二个开始,可以使用label字段
    # 1. 可用数据字段见 https://bigquant.com/docs/develop/datasource/deprecated/history_data.html
    #   添加benchmark_前缀,可使用对应的benchmark数据
    # 2. 可用操作符和函数见 `表达式引擎 <https://bigquant.com/docs/develop/bigexpr/usage.html>`_
    
    # 计算收益:5日收盘价(作为卖出价格)除以明日开盘价(作为买入价格)
    shift(close, -5) / shift(open, -1)
    
    # 极值处理:用1%和99%分位的值做clip
    clip(label, all_quantile(label, 0.01), all_quantile(label, 0.99))
    
    # 将分数映射到分类,这里使用20个分类
    all_wbins(label, 20)
    
    # 过滤掉一字涨停的情况 (设置label为NaN,在后续处理和训练中会忽略NaN的label)
    where(shift(high, -1) == shift(low, -1), NaN, label)
    """,
        start_date='',
        end_date='',
        benchmark='000300.SHA',
        drop_na_label=True,
        cast_label_int=True
    )
    
    m3 = M.input_features.v1(
        features="""# #号开始的表示注释
    # 多个特征,每行一个,可以包含基础特征和衍生特征
    return_5
    return_10
    return_20
    avg_amount_0/avg_amount_5
    avg_amount_5/avg_amount_20
    rank_avg_amount_0/rank_avg_amount_5
    rank_avg_amount_5/rank_avg_amount_10
    rank_return_0
    rank_return_5
    rank_return_10
    rank_return_0/rank_return_5
    rank_return_5/rank_return_10
    pe_ttm_0
    """
    )
    
    m15 = M.general_feature_extractor.v7(
        instruments=m1.data,
        features=m3.data,
        start_date='',
        end_date='',
        before_start_days=90
    )
    
    m16 = M.derived_feature_extractor.v3(
        input_data=m15.data,
        features=m3.data,
        date_col='date',
        instrument_col='instrument',
        drop_na=False,
        remove_extra_columns=False
    )
    
    m7 = M.join.v3(
        data1=m2.data,
        data2=m16.data,
        on='date,instrument',
        how='inner',
        sort=False
    )
    
    m5 = M.dropnan.v2(
        input_data=m7.data
    )
    
    m4 = M.stock_ranker_train.v6(
        training_ds=m5.data,
        features=m3.data,
        learning_algorithm='排序',
        number_of_leaves=30,
        minimum_docs_per_leaf=1000,
        number_of_trees=20,
        learning_rate=0.1,
        max_bins=1023,
        feature_fraction=1,
        data_row_fraction=1,
        ndcg_discount_base=1,
        m_lazy_run=False
    )
    
    m9 = M.instruments.v2(
        start_date=T.live_run_param('trading_date', '2015-01-01'),
        end_date=T.live_run_param('trading_date', '2016-01-01'),
        market='CN_STOCK_A',
        instrument_list='',
        max_count=0
    )
    
    m17 = M.general_feature_extractor.v7(
        instruments=m9.data,
        features=m3.data,
        start_date='',
        end_date='',
        before_start_days=90
    )
    
    m18 = M.derived_feature_extractor.v3(
        input_data=m17.data,
        features=m3.data,
        date_col='date',
        instrument_col='instrument',
        drop_na=False,
        remove_extra_columns=False
    )
    
    m10 = M.dropnan.v2(
        input_data=m18.data
    )
    
    m8 = M.stock_ranker_predict.v5(
        model=m4.model,
        data=m10.data,
        m_lazy_run=False
    )
    
    m19 = M.trade.v4(
        instruments=m9.data,
        options_data=m8.predictions,
        start_date='',
        end_date='',
        initialize=m19_initialize_bigquant_run,
        handle_data=m19_handle_data_bigquant_run,
        prepare=m19_prepare_bigquant_run,
        volume_limit=0.025,
        order_price_field_buy='open',
        order_price_field_sell='close',
        capital_base=1000000,
        auto_cancel_non_tradable_orders=True,
        data_frequency='daily',
        price_type='真实价格',
        product_type='股票',
        plot_charts=True,
        backtest_only=False,
        benchmark='000300.SHA'
    )