├── China Merchants Bank.csv ├── LICENSE ├── README.md ├── dataprocess.py ├── pics ├── history.jpg ├── pred_stock.jpg └── price.jpg └── stock_pre.py /China Merchants Bank.csv: -------------------------------------------------------------------------------- 1 | Date,Close,Chg,Net Capital Inflow,Extra Large Single Net Inflow,Large Order Net Inflow,Net inflow of intermediate orders,Net inflow of small orders 2 | 2021-09-17,47.99,0.0116,71383500.0,44908800.0,26474700.0,78791500.0,-150000000.0 3 | 2021-09-22,46.15,-0.0383,-779000000.0,-388000000.0,-391000000.0,131000000.0,648000000.0 4 | 2021-09-23,45.58,-0.0124,-146000000.0,-281000000.0,135000000.0,-91392000.0,237000000.0 5 | 2021-09-24,45.51,-0.0015,53415000.0,5624200.0,47790800.0,-33374800.0,-20040200.0 6 | 2021-09-27,45.83,0.007,25565800.0,-8766500.0,34332200.0,-81307600.0,55741900.0 7 | 2021-09-28,47.16,0.029,394000000.0,421000000.0,-26993700.0,-108000000.0,-286000000.0 8 | 2021-09-29,48.30,0.0242,301000000.0,71063800.0,230000000.0,-43703800.0,-257000000.0 9 | 2021-09-30,47.19,-0.023,-115000000.0,-82451600.0,-32580400.0,81191200.0,33840800.0 10 | 2021-10-08,47.67,0.0102,30735400.0,52469600.0,-21734300.0,16078500.0,-46813800.0 11 | 2021-10-11,49.74,0.0434,375000000.0,209000000.0,166000000.0,-334000000.0,-40726700.0 12 | 2021-10-12,49.83,0.0018,361000000.0,177000000.0,185000000.0,-207000000.0,-155000000.0 13 | 2021-10-13,49.77,-0.0012,107000000.0,-31128800.0,138000000.0,-215000000.0,108000000.0 14 | 2021-10-14,49.10,-0.0135,-138000000.0,-120000000.0,-17825300.0,57252800.0,81044600.0 15 | 2021-10-15,50.05,0.0193,292000000.0,132000000.0,159000000.0,-125000000.0,-167000000.0 16 | 2021-10-18,48.60,-0.029,-91497000.0,-180000000.0,88614700.0,-88259700.0,180000000.0 17 | 2021-10-19,49.62,0.021,122000000.0,32206500.0,89827200.0,-55826300.0,-66207400.0 18 | 2021-10-20,49.14,-0.0097,33739500.0,-42861800.0,76601300.0,-39288800.0,5549300.0 19 | 2021-10-21,50.49,0.0275,360000000.0,152000000.0,208000000.0,-141000000.0,-219000000.0 20 | 2021-10-22,51.03,0.0107,98902200.0,47686300.0,51216000.0,95486500.0,-194000000.0 21 | 2021-10-25,51.33,0.0059,140000000.0,-77337000.0,218000000.0,-4905500.0,-135000000.0 22 | 2021-10-26,52.04,0.0138,81299900.0,26788700.0,54511200.0,129000000.0,-210000000.0 23 | 2021-10-27,51.26,-0.015,-374000000.0,-307000000.0,-66558700.0,163000000.0,210000000.0 24 | 2021-10-28,50.96,-0.0059,-140000000.0,-117000000.0,-22267000.0,125000000.0,14655800.0 25 | 2021-10-29,50.71,-0.0049,-58797800.0,30281300.0,-89079100.0,65588300.0,-6790400.0 26 | 2021-11-01,50.86,0.003,52327600.0,72166000.0,-19838400.0,17263500.0,-69591100.0 27 | 2021-11-02,48.99,-0.0368,-441000000.0,-232000000.0,-209000000.0,270000000.0,170000000.0 28 | 2021-11-03,48.44,-0.0112,-15507400.0,-142000000.0,126000000.0,57175500.0,-41668100.0 29 | 2021-11-04,48.49,0.001,-199000000.0,-36150400.0,-162000000.0,138000000.0,60932000.0 30 | 2021-11-05,48.30,-0.0039,-39189500.0,-170000000.0,130000000.0,94536700.0,-55347200.0 31 | 2021-11-08,48.04,-0.0054,-366000000.0,-286000000.0,-80080300.0,269000000.0,96998300.0 32 | 2021-11-09,47.80,-0.005,-246000000.0,-204000000.0,-41604200.0,174000000.0,71143800.0 33 | 2021-11-10,47.37,-0.009,-360000000.0,-87682700.0,-272000000.0,82368600.0,277000000.0 34 | 2021-11-11,49.56,0.0462,801000000.0,674000000.0,127000000.0,-353000000.0,-448000000.0 35 | 2021-11-12,49.14,-0.0085,15010000.0,-90572600.0,106000000.0,3348700.0,-18358800.0 36 | 2021-11-15,49.67,0.0108,83653600.0,59210400.0,24443200.0,533300.0,-84186800.0 37 | 2021-11-16,49.24,-0.0087,-129000000.0,-62585400.0,-66339500.0,50823500.0,78101500.0 38 | 2021-11-17,48.58,-0.0134,-232000000.0,-47318400.0,-185000000.0,65227400.0,167000000.0 39 | 2021-11-18,48.15,-0.0089,-90381200.0,7103600.0,-97484900.0,33597500.0,56783700.0 40 | 2021-11-19,49.07,0.0191,270000000.0,174000000.0,96575400.0,-38784500.0,-231000000.0 41 | 2021-11-22,48.43,-0.013,-47983000.0,-3066300.0,-44916700.0,9265100.0,38718000.0 42 | 2021-11-23,48.49,0.0012,30354200.0,120000000.0,-89364600.0,-37453600.0,7099300.0 43 | 2021-11-24,48.48,-0.0002,-179000000.0,-124000000.0,-55651900.0,88537100.0,90689800.0 44 | 2021-11-25,48.16,-0.0066,-120000000.0,-31567800.0,-88656700.0,98026500.0,22198000.0 45 | 2021-11-26,46.84,-0.0274,-1055000000.0,-873000000.0,-182000000.0,406000000.0,648000000.0 46 | 2021-11-29,46.56,-0.006,-635000000.0,-560000000.0,-75110500.0,379000000.0,256000000.0 47 | 2021-11-30,46.23,-0.0071,-205000000.0,-52213800.0,-152000000.0,220000000.0,-15717100.0 48 | 2021-12-01,46.73,0.0108,224000000.0,116000000.0,108000000.0,41683900.0,-266000000.0 49 | 2021-12-02,47.63,0.0193,304000000.0,300000000.0,4658900.0,-95849100.0,-209000000.0 50 | 2021-12-03,47.99,0.0076,166000000.0,231000000.0,-64257700.0,3321700.0,-170000000.0 51 | 2021-12-06,48.56,0.0119,42067100.0,192000000.0,-150000000.0,-22177900.0,-19889200.0 52 | 2021-12-07,48.58,0.0004,39407500.0,74144500.0,-34737000.0,-56489600.0,17082100.0 53 | 2021-12-08,48.78,0.0041,179000000.0,98132900.0,80775200.0,18990500.0,-198000000.0 54 | 2021-12-09,49.87,0.0223,596000000.0,204000000.0,391000000.0,-98491700.0,-497000000.0 55 | 2021-12-10,50.23,0.0072,31801500.0,-70391300.0,102000000.0,-3824500.0,-27976900.0 56 | 2021-12-13,49.16,-0.0213,-181000000.0,-92910600.0,-88357100.0,114000000.0,67572000.0 57 | 2021-12-14,47.89,-0.0258,-797000000.0,-793000000.0,-4138700.0,301000000.0,496000000.0 58 | 2021-12-15,47.74,-0.0031,-268000000.0,-116000000.0,-152000000.0,180000000.0,87923100.0 59 | 2021-12-16,47.94,0.0042,-130000000.0,-125000000.0,-5308000.0,75252400.0,55223800.0 60 | 2021-12-17,47.51,-0.009,-78749600.0,-236000000.0,158000000.0,-40162200.0,119000000.0 61 | 2021-12-20,47.43,-0.0017,-107000000.0,-140000000.0,33536400.0,139000000.0,-32016700.0 62 | 2021-12-21,47.37,-0.0013,-37740700.0,-16436600.0,-21304200.0,-40446600.0,78187300.0 63 | 2021-12-22,46.75,-0.0131,-238000000.0,-129000000.0,-109000000.0,106000000.0,131000000.0 64 | 2021-12-23,46.96,0.0045,-56887300.0,-138000000.0,81115100.0,-69148600.0,126000000.0 65 | 2021-12-24,46.60,-0.0077,-153000000.0,-131000000.0,-22637900.0,82553000.0,70705400.0 66 | 2021-12-27,46.07,-0.0114,-675000000.0,-1109000000.0,434000000.0,271000000.0,405000000.0 67 | 2021-12-28,46.37,0.0065,-546000000.0,-438000000.0,-108000000.0,346000000.0,200000000.0 68 | 2021-12-29,44.36,-0.0433,-2698000000.0,-2461000000.0,-237000000.0,1099000000.0,1598000000.0 69 | 2021-12-30,45.24,0.0198,-199000000.0,49655600.0,-249000000.0,92455800.0,107000000.0 70 | 2021-12-31,45.45,0.0046,-40262400.0,-183000000.0,143000000.0,98823800.0,-58561400.0 71 | 2022-01-04,45.09,-0.0079,-542000000.0,-250000000.0,-292000000.0,76087900.0,466000000.0 72 | 2022-01-05,45.79,0.0155,572000000.0,360000000.0,212000000.0,-308000000.0,-264000000.0 73 | 2022-01-06,44.89,-0.0197,-247000000.0,-198000000.0,-48633800.0,138000000.0,108000000.0 74 | 2022-01-07,45.79,0.02,170000000.0,146000000.0,24026100.0,2836500.0,-173000000.0 75 | 2022-01-10,45.97,0.0039,121000000.0,22234600.0,98848400.0,-111000000.0,-10178400.0 76 | 2022-01-11,46.59,0.0135,478000000.0,559000000.0,-81161800.0,-379000000.0,-98922800.0 77 | 2022-01-12,46.50,-0.0019,83824400.0,38803100.0,45021300.0,-126000000.0,42094700.0 78 | 2022-01-13,46.08,-0.009,-35422400.0,-66742400.0,31320000.0,-8603500.0,44025900.0 79 | 2022-01-14,44.76,-0.0286,-397000000.0,-115000000.0,-282000000.0,35251100.0,361000000.0 80 | 2022-01-17,45.32,0.0125,-3807300.0,147000000.0,-151000000.0,-115000000.0,118000000.0 81 | 2022-01-18,45.75,0.0095,-181000000.0,281000000.0,-461000000.0,-17151600.0,198000000.0 82 | 2022-01-19,46.44,0.0151,107000000.0,222000000.0,-115000000.0,-116000000.0,9372000.0 83 | 2022-01-20,48.11,0.036,1009000000.0,843000000.0,166000000.0,-336000000.0,-672000000.0 84 | 2022-01-21,48.56,0.0094,459000000.0,381000000.0,77906000.0,-206000000.0,-253000000.0 85 | 2022-01-24,48.59,0.0006,-268000000.0,-128000000.0,-140000000.0,144000000.0,124000000.0 86 | 2022-01-25,47.64,-0.0196,-33944900.0,-23885800.0,-10059100.0,-36623700.0,70568600.0 87 | 2022-01-26,47.74,0.0021,-19191300.0,98735700.0,-118000000.0,11160200.0,8031100.0 88 | 2022-01-27,47.51,-0.0048,73860300.0,89665500.0,-15805200.0,-98930900.0,25070700.0 89 | 2022-01-28,45.95,-0.0328,-83027000.0,23584400.0,-107000000.0,21846000.0,61180900.0 90 | 2022-02-07,48.09,0.0466,249000000.0,132000000.0,117000000.0,-224000000.0,-25221600.0 91 | 2022-02-08,48.45,0.0075,206000000.0,93100800.0,113000000.0,-22144300.0,-184000000.0 92 | 2022-02-09,48.36,-0.0019,-155000000.0,52744900.0,-208000000.0,121000000.0,34480700.0 93 | 2022-02-10,48.45,0.0019,-17128600.0,64080100.0,-81208600.0,26496800.0,-9368200.0 94 | 2022-02-11,49.50,0.0217,653000000.0,443000000.0,210000000.0,-279000000.0,-374000000.0 95 | 2022-02-14,47.94,-0.0315,-172000000.0,-83023900.0,-88732100.0,439800.0,171000000.0 96 | 2022-02-15,46.96,-0.0204,-492000000.0,-293000000.0,-198000000.0,92648800.0,399000000.0 97 | 2022-02-16,47.81,0.0181,-161000000.0,32592300.0,-194000000.0,134000000.0,27158800.0 98 | 2022-02-17,48.20,0.0082,132000000.0,-32678800.0,165000000.0,-101000000.0,-31546100.0 99 | 2022-02-18,48.80,0.0124,107000000.0,198000000.0,-91498200.0,-8426700.0,-98223900.0 100 | 2022-02-21,48.50,-0.0061,-171000000.0,-68644900.0,-102000000.0,97078200.0,74006400.0 101 | 2022-02-22,47.96,-0.0111,-117000000.0,-80073300.0,-36551700.0,21667200.0,94957900.0 102 | 2022-02-23,47.57,-0.0081,-247000000.0,-140000000.0,-106000000.0,147000000.0,99334800.0 103 | 2022-02-24,46.76,-0.017,-379000000.0,-225000000.0,-153000000.0,181000000.0,197000000.0 104 | 2022-02-25,46.55,-0.0045,-338000000.0,-118000000.0,-220000000.0,194000000.0,144000000.0 105 | 2022-02-28,46.54,-0.0002,-270000000.0,-199000000.0,-71399600.0,163000000.0,107000000.0 106 | 2022-03-01,46.98,0.0095,-89594700.0,-46379700.0,-43215000.0,136000000.0,-46217600.0 107 | 2022-03-02,46.21,-0.0164,-471000000.0,-332000000.0,-139000000.0,292000000.0,179000000.0 108 | 2022-03-03,46.47,0.0056,-130000000.0,-37923100.0,-92518900.0,121000000.0,9736500.0 109 | 2022-03-04,45.44,-0.0222,-581000000.0,-455000000.0,-126000000.0,332000000.0,249000000.0 110 | 2022-03-07,43.50,-0.0427,-1133000000.0,-945000000.0,-188000000.0,293000000.0,840000000.0 111 | 2022-03-08,42.22,-0.0294,-336000000.0,-78320400.0,-257000000.0,-101000000.0,437000000.0 112 | 2022-03-09,41.13,-0.0258,-395000000.0,-85789800.0,-310000000.0,53713300.0,342000000.0 113 | 2022-03-10,41.44,0.0075,-40480400.0,42360900.0,-82841300.0,-245000000.0,285000000.0 114 | 2022-03-11,41.19,-0.006,-156000000.0,-188000000.0,31839800.0,-75230100.0,232000000.0 115 | 2022-03-14,38.89,-0.0558,-590000000.0,-491000000.0,-98722700.0,104000000.0,486000000.0 116 | 2022-03-15,36.19,-0.0694,-609000000.0,-228000000.0,-381000000.0,117000000.0,493000000.0 117 | 2022-03-16,39.32,0.0865,647000000.0,389000000.0,258000000.0,-366000000.0,-281000000.0 118 | 2022-03-17,41.25,0.0491,579000000.0,571000000.0,8226300.0,-394000000.0,-185000000.0 119 | 2022-03-18,42.91,0.0402,138000000.0,363000000.0,-225000000.0,-105000000.0,-33179600.0 120 | 2022-03-21,41.55,-0.0317,-619000000.0,-414000000.0,-205000000.0,318000000.0,301000000.0 121 | 2022-03-22,42.27,0.0173,140000000.0,208000000.0,-67477600.0,-12473000.0,-128000000.0 122 | 2022-03-23,42.50,0.0054,-191000000.0,-129000000.0,-61557700.0,65505000.0,125000000.0 123 | 2022-03-24,42.51,0.0002,-9707600.0,34504600.0,-44212200.0,57857300.0,-48149600.0 124 | 2022-03-25,41.92,-0.0139,-182000000.0,-149000000.0,-32660500.0,107000000.0,74702300.0 125 | 2022-03-28,41.79,-0.0031,-8017100.0,-119000000.0,111000000.0,90676400.0,-82659300.0 126 | 2022-03-29,41.75,-0.001,-32404900.0,-70836100.0,38431200.0,98162300.0,-65757400.0 127 | 2022-03-30,42.97,0.0292,-18813800.0,111000000.0,-129000000.0,11028900.0,7784800.0 128 | 2022-03-31,43.54,0.0133,159000000.0,252000000.0,-93630400.0,-88420100.0,-70216100.0 129 | 2022-04-01,43.84,0.0069,-172000000.0,-44926900.0,-127000000.0,173000000.0,-1024200.0 130 | 2022-04-06,44.13,0.0066,35179900.0,176000000.0,-141000000.0,-63505500.0,28325600.0 131 | 2022-04-07,43.60,-0.012,134000000.0,-2899900.0,137000000.0,-122000000.0,-12829300.0 132 | 2022-04-08,43.92,0.0073,-170000000.0,-121000000.0,-48673200.0,159000000.0,10776000.0 133 | 2022-04-11,42.64,-0.0291,-244000000.0,-368000000.0,124000000.0,54300100.0,190000000.0 134 | 2022-04-12,42.44,-0.0047,-101000000.0,-90816800.0,-10212400.0,-9194200.0,110000000.0 135 | 2022-04-13,42.49,0.0012,-244000000.0,-127000000.0,-118000000.0,114000000.0,131000000.0 136 | 2022-04-14,42.50,0.0002,-33244200.0,-87044000.0,53799800.0,40674600.0,-7430300.0 137 | 2022-04-15,43.57,0.0252,413000000.0,251000000.0,162000000.0,-228000000.0,-185000000.0 138 | 2022-04-18,40.13,-0.079,-1921000000.0,-1361000000.0,-560000000.0,926000000.0,995000000.0 139 | 2022-04-19,38.84,-0.0321,-698000000.0,-130000000.0,-568000000.0,318000000.0,380000000.0 140 | 2022-04-20,37.84,-0.0257,-859000000.0,-589000000.0,-269000000.0,355000000.0,504000000.0 141 | 2022-04-21,38.02,0.0048,-92623400.0,-113000000.0,19974700.0,97524700.0,-4901300.0 142 | 2022-04-22,39.24,0.0321,272000000.0,-10824500.0,283000000.0,-23430800.0,-248000000.0 143 | 2022-04-25,35.57,-0.0935,-1112000000.0,-575000000.0,-538000000.0,164000000.0,948000000.0 144 | 2022-04-26,35.15,-0.0118,148000000.0,96651600.0,50970600.0,-209000000.0,61559400.0 145 | 2022-04-27,34.78,-0.0105,-265000000.0,-59717200.0,-205000000.0,-148000000.0,413000000.0 146 | 2022-04-28,36.36,0.0454,527000000.0,332000000.0,195000000.0,-110000000.0,-417000000.0 147 | 2022-04-29,36.67,0.0085,237000000.0,130000000.0,107000000.0,-272000000.0,34725800.0 148 | 2022-05-05,36.00,-0.0183,-133000000.0,37092400.0,-170000000.0,-246000000.0,379000000.0 149 | 2022-05-06,34.65,-0.0375,-614000000.0,-259000000.0,-355000000.0,55201400.0,559000000.0 150 | 2022-05-09,33.21,-0.0416,-369000000.0,-256000000.0,-113000000.0,-208000000.0,578000000.0 151 | 2022-05-10,33.72,0.0154,328000000.0,182000000.0,146000000.0,-291000000.0,-37321200.0 152 | 2022-05-11,33.95,0.0068,452000000.0,327000000.0,126000000.0,-364000000.0,-87632100.0 153 | 2022-05-12,33.35,-0.0177,-210000000.0,-244000000.0,34023800.0,-64159100.0,274000000.0 154 | 2022-05-13,33.89,0.0162,76091200.0,-4261800.0,80353000.0,154000000.0,-230000000.0 155 | 2022-05-16,33.63,-0.0077,35328200.0,-39254600.0,74582900.0,-165000000.0,130000000.0 156 | 2022-05-17,35.34,0.0508,529000000.0,389000000.0,140000000.0,-70492300.0,-458000000.0 157 | 2022-05-18,35.24,-0.0028,-15884300.0,-25157700.0,9273400.0,93436700.0,-77552400.0 158 | 2022-05-19,34.77,-0.0133,-89634900.0,-28008900.0,-61625900.0,75430500.0,14204400.0 159 | 2022-05-20,36.70,0.0555,642000000.0,469000000.0,172000000.0,-40656900.0,-601000000.0 160 | 2022-05-23,36.23,-0.0128,-162000000.0,-83582400.0,-78462400.0,50382100.0,112000000.0 161 | 2022-05-24,35.64,-0.0163,-263000000.0,-49316900.0,-214000000.0,37764200.0,225000000.0 162 | 2022-05-25,35.52,-0.0034,-94650000.0,-34865100.0,-59784900.0,76547600.0,18102400.0 163 | 2022-05-26,35.17,-0.0099,-211000000.0,-103000000.0,-108000000.0,-61843200.0,273000000.0 164 | 2022-05-27,35.86,0.0196,51114300.0,-38671600.0,89785900.0,71045000.0,-122000000.0 165 | 2022-05-30,35.81,-0.0014,-18641200.0,18303400.0,-36944600.0,-36891500.0,55532700.0 166 | 2022-05-31,36.43,0.0173,200000000.0,55986100.0,144000000.0,-78280700.0,-122000000.0 167 | 2022-06-01,36.43,0.0,16846400.0,-55029900.0,71876300.0,1295700.0,-18142100.0 168 | 2022-06-02,35.66,-0.0211,-417000000.0,-70889300.0,-346000000.0,27560900.0,390000000.0 169 | 2022-06-06,35.71,0.0014,-130000000.0,-92020500.0,-38137400.0,-86740100.0,217000000.0 170 | 2022-06-07,36.09,0.0106,7703000.0,70155200.0,-62452200.0,8961800.0,-16664800.0 171 | 2022-06-08,36.27,0.005,190000000.0,49373600.0,141000000.0,-159000000.0,-31383300.0 172 | 2022-06-09,37.03,0.021,423000000.0,389000000.0,34183700.0,-172000000.0,-251000000.0 173 | 2022-06-10,36.86,-0.0046,165000000.0,-149000000.0,314000000.0,-108000000.0,-57250300.0 174 | 2022-06-13,35.31,-0.0421,-725000000.0,-718000000.0,-7191000.0,112000000.0,613000000.0 175 | 2022-06-14,35.98,0.019,-102000000.0,-26423300.0,-75605400.0,67281400.0,34747300.0 176 | 2022-06-15,37.22,0.0345,513000000.0,281000000.0,233000000.0,-16545700.0,-497000000.0 177 | 2022-06-16,36.70,-0.014,-234000000.0,-115000000.0,-119000000.0,166000000.0,67789000.0 178 | 2022-06-17,36.59,-0.003,-116000000.0,-80567400.0,-35516300.0,81926900.0,34156700.0 179 | 2022-06-20,36.44,-0.0041,-253000000.0,14641900.0,-267000000.0,72164100.0,180000000.0 180 | 2022-06-21,37.07,0.0173,74280300.0,-7757700.0,82038000.0,-53162000.0,-21118400.0 181 | 2022-06-22,36.05,-0.0275,-555000000.0,-179000000.0,-376000000.0,202000000.0,354000000.0 182 | 2022-06-23,36.88,0.023,158000000.0,140000000.0,18284200.0,-76766400.0,-81320300.0 183 | 2022-06-24,36.94,0.0016,-297000000.0,-235000000.0,-61399700.0,108000000.0,189000000.0 184 | 2022-06-27,37.99,0.0284,515000000.0,388000000.0,128000000.0,-230000000.0,-285000000.0 185 | 2022-06-28,38.02,0.0008,-84375700.0,-97190900.0,12815200.0,103000000.0,-18734900.0 186 | 2022-06-29,37.75,-0.0071,-160000000.0,-79869000.0,-80301900.0,150000000.0,10068300.0 187 | 2022-06-30,38.94,0.0315,408000000.0,92762800.0,315000000.0,-200000000.0,-208000000.0 188 | 2022-07-01,38.12,-0.0211,-350000000.0,-140000000.0,-210000000.0,89901500.0,260000000.0 189 | 2022-07-04,37.79,-0.0087,-257000000.0,-329000000.0,71489100.0,74141900.0,183000000.0 190 | 2022-07-05,37.72,-0.0019,-87395200.0,61388800.0,-149000000.0,-81398400.0,169000000.0 191 | 2022-07-06,36.54,-0.0313,-865000000.0,-783000000.0,-82098700.0,324000000.0,541000000.0 192 | 2022-07-07,36.49,-0.0014,-244000000.0,-81611300.0,-162000000.0,68868400.0,175000000.0 193 | 2022-07-08,36.55,0.0016,-150000000.0,-100000000.0,-49798500.0,-17727600.0,168000000.0 194 | 2022-07-11,36.18,-0.0101,-196000000.0,-128000000.0,-68587800.0,159000000.0,37361000.0 195 | 2022-07-12,36.04,-0.0039,-163000000.0,43186400.0,-207000000.0,77434900.0,86048000.0 196 | 2022-07-13,34.64,-0.0388,-1279000000.0,-837000000.0,-442000000.0,258000000.0,1021000000.0 197 | 2022-07-14,33.22,-0.041,-1251000000.0,-584000000.0,-667000000.0,131000000.0,1120000000.0 198 | 2022-07-15,33.13,-0.0027,-139000000.0,66259700.0,-205000000.0,-290000000.0,428000000.0 199 | 2022-07-18,33.89,0.0229,-110000000.0,-232000000.0,122000000.0,183000000.0,-72655800.0 200 | 2022-07-19,33.97,0.0024,-104000000.0,-23050200.0,-80710500.0,168000000.0,-64363200.0 201 | 2022-07-20,34.11,0.0041,-32564900.0,-10120000.0,-22445000.0,35846500.0,-3281600.0 202 | 2022-07-21,33.72,-0.0114,-155000000.0,-29089900.0,-126000000.0,69945600.0,85267600.0 203 | 2022-07-22,33.85,0.0039,-177000000.0,-193000000.0,15946900.0,180000000.0,-3449200.0 204 | 2022-07-25,34.11,0.0077,47227400.0,3472600.0,43754800.0,53229400.0,-100000000.0 205 | 2022-07-26,34.59,0.0141,117000000.0,57306800.0,59653900.0,26977300.0,-144000000.0 206 | 2022-07-27,34.31,-0.0081,-330000000.0,-197000000.0,-134000000.0,100000000.0,231000000.0 207 | 2022-07-28,34.04,-0.0079,-310000000.0,-171000000.0,-139000000.0,64651000.0,245000000.0 208 | 2022-07-29,33.33,-0.0209,-336000000.0,-111000000.0,-225000000.0,110000000.0,226000000.0 209 | 2022-08-01,32.78,-0.0165,-418000000.0,-186000000.0,-231000000.0,-7644600.0,425000000.0 210 | 2022-08-02,32.17,-0.0186,-450000000.0,-309000000.0,-141000000.0,93212700.0,357000000.0 211 | 2022-08-03,31.32,-0.0264,-714000000.0,-540000000.0,-174000000.0,160000000.0,554000000.0 212 | 2022-08-04,31.92,0.0192,46620300.0,-67761100.0,114000000.0,8562300.0,-55182600.0 213 | 2022-08-05,32.56,0.0201,77597300.0,-55623200.0,133000000.0,-120000000.0,42309200.0 214 | 2022-08-08,32.17,-0.012,-285000000.0,-116000000.0,-169000000.0,92810100.0,192000000.0 215 | 2022-08-09,31.86,-0.0096,-331000000.0,-167000000.0,-163000000.0,34733400.0,296000000.0 216 | 2022-08-10,31.41,-0.0141,-441000000.0,-227000000.0,-214000000.0,75729200.0,366000000.0 217 | 2022-08-11,32.62,0.0385,376000000.0,289000000.0,87128300.0,-128000000.0,-248000000.0 218 | 2022-08-12,32.63,0.0003,10539600.0,1565400.0,8974100.0,5245200.0,-15784800.0 219 | 2022-08-15,31.99,-0.0196,-267000000.0,-111000000.0,-156000000.0,126000000.0,141000000.0 220 | 2022-08-16,32.17,0.0056,56918600.0,206000000.0,-149000000.0,-71085900.0,14167300.0 221 | 2022-08-17,32.50,0.0103,131000000.0,52099600.0,78913700.0,-28160000.0,-103000000.0 222 | 2022-08-18,31.98,-0.016,-248000000.0,-136000000.0,-112000000.0,-2784900.0,251000000.0 223 | 2022-08-19,32.11,0.0041,131000000.0,58531000.0,72676500.0,-4954300.0,-126000000.0 224 | 2022-08-22,31.88,-0.0072,-77277100.0,-112000000.0,35165700.0,1971100.0,75306000.0 225 | 2022-08-23,31.36,-0.0163,-409000000.0,-279000000.0,-130000000.0,48155500.0,361000000.0 226 | 2022-08-24,31.10,-0.0083,-221000000.0,-228000000.0,7133100.0,-19278200.0,240000000.0 227 | 2022-08-25,31.95,0.0273,168000000.0,76032100.0,91786000.0,-14435100.0,-153000000.0 228 | 2022-08-26,31.96,0.0003,200000000.0,64849100.0,135000000.0,-94065300.0,-106000000.0 229 | 2022-08-29,31.54,-0.0131,-114000000.0,-7786400.0,-106000000.0,53909800.0,59636000.0 230 | 2022-08-30,32.05,0.0162,84974300.0,20566800.0,64407500.0,-21026600.0,-63947700.0 231 | 2022-08-31,33.31,0.0393,777000000.0,198000000.0,579000000.0,-215000000.0,-561000000.0 232 | 2022-09-01,32.76,-0.0165,-147000000.0,-100000000.0,-46810100.0,63574500.0,83463300.0 233 | 2022-09-02,32.58,-0.0055,-97350500.0,-14868300.0,-82482200.0,42794900.0,54555600.0 234 | 2022-09-05,32.49,-0.0028,-73281700.0,-116000000.0,43084900.0,-4366100.0,77647800.0 235 | 2022-09-06,31.88,-0.0188,-244000000.0,-131000000.0,-113000000.0,-53196000.0,297000000.0 236 | 2022-09-07,31.64,-0.0075,-269000000.0,-355000000.0,85404600.0,24507300.0,245000000.0 237 | 2022-09-08,31.56,-0.0025,11880300.0,32682500.0,-20802200.0,-28428100.0,16547800.0 238 | 2022-09-09,32.76,0.038,904000000.0,687000000.0,217000000.0,-449000000.0,-456000000.0 239 | 2022-09-13,33.61,0.0259,141000000.0,213000000.0,-71745600.0,-537000000.0,397000000.0 240 | 2022-09-14,33.12,-0.0146,-119000000.0,27827200.0,-147000000.0,42977700.0,76384800.0 241 | 2022-09-15,34.27,0.0347,555000000.0,457000000.0,97874700.0,-106000000.0,-449000000.0 242 | 2022-09-16,33.21,-0.0309,-9723800.0,-152000000.0,142000000.0,-19081500.0,28805300.0 243 | 2022-09-19,33.35,0.0042,123000000.0,88789500.0,34601100.0,-33807700.0,-89583000.0 244 | 2022-09-20,32.80,-0.0165,-82416200.0,-86704600.0,4288400.0,18424600.0,63991600.0 245 | 2022-09-21,32.67,-0.004,48899100.0,-4837400.0,53736500.0,-128000000.0,78848700.0 246 | 2022-09-22,32.43,-0.0073,-67151500.0,-37405200.0,-29746300.0,-46611200.0,114000000.0 247 | 2022-09-23,32.62,0.0059,-79409300.0,-4866600.0,-74542700.0,101000000.0,-21488800.0 248 | 2022-09-26,32.21,-0.0126,-169000000.0,-41325300.0,-128000000.0,73655900.0,95411500.0 249 | 2022-09-27,32.16,-0.0016,-77123900.0,-68381400.0,-8742600.0,18235900.0,58888000.0 250 | 2022-09-28,31.93,-0.0072,61084800.0,-28397800.0,89482500.0,-64082100.0,2997300.0 251 | 2022-09-29,31.41,-0.0163,-289000000.0,-204000000.0,-84577100.0,104000000.0,185000000.0 252 | 2022-09-30,31.91,0.0159,-37005000.0,-41103600.0,4098600.0,114000000.0,-76778100.0 253 | 2022-10-10,30.06,-0.058,-502000000.0,-65065800.0,-437000000.0,161000000.0,341000000.0 254 | 2022-10-11,29.66,-0.0133,-171000000.0,-149000000.0,-21267600.0,61863800.0,109000000.0 255 | 2022-10-12,29.21,-0.0152,-263000000.0,-47304700.0,-215000000.0,-19326500.0,282000000.0 256 | 2022-10-13,28.15,-0.0363,-306000000.0,-205000000.0,-101000000.0,-128000000.0,434000000.0 257 | 2022-10-14,29.34,0.0423,354000000.0,239000000.0,115000000.0,-214000000.0,-140000000.0 258 | 2022-10-17,29.28,-0.002,-30829300.0,-22016100.0,-8813200.0,-47529400.0,78358700.0 259 | 2022-10-18,29.06,-0.0075,-226000000.0,-186000000.0,-39261800.0,61093100.0,164000000.0 260 | 2022-10-19,28.52,-0.0186,-194000000.0,-27721600.0,-166000000.0,88954400.0,105000000.0 261 | 2022-10-20,28.33,-0.0067,-356000000.0,-91429500.0,-264000000.0,131000000.0,224000000.0 262 | 2022-10-21,27.84,-0.0173,-54831200.0,-21424200.0,-33407000.0,-90388000.0,145000000.0 263 | 2022-10-24,26.28,-0.056,-548000000.0,-353000000.0,-195000000.0,-15042200.0,563000000.0 264 | 2022-10-25,26.45,0.0065,-258000000.0,-27138100.0,-230000000.0,114000000.0,144000000.0 265 | 2022-10-26,26.19,-0.0098,-48114700.0,12349000.0,-60463700.0,-136000000.0,184000000.0 266 | 2022-10-27,26.20,0.0004,95684300.0,27656600.0,68027700.0,-95478700.0,-205500.0 267 | 2022-10-28,25.44,-0.029,-228000000.0,-127000000.0,-101000000.0,10981700.0,217000000.0 268 | 2022-10-31,25.08,-0.0142,38288200.0,166000000.0,-128000000.0,-122000000.0,84186500.0 269 | 2022-11-01,26.45,0.0546,420000000.0,275000000.0,145000000.0,-207000000.0,-214000000.0 270 | 2022-11-02,26.68,0.0087,120000000.0,102000000.0,17927700.0,-182000000.0,61990800.0 271 | 2022-11-03,26.31,-0.0139,-91791200.0,-134000000.0,41750200.0,-18809900.0,111000000.0 272 | 2022-11-04,27.34,0.0391,512000000.0,426000000.0,85819700.0,-219000000.0,-293000000.0 273 | 2022-11-07,27.42,0.0029,-18294200.0,-64437500.0,46143300.0,-49578700.0,67872900.0 274 | 2022-11-08,27.41,-0.0004,-173000000.0,-123000000.0,-50351500.0,90084900.0,83329600.0 275 | 2022-11-09,27.44,0.0011,73163100.0,-10457700.0,83620800.0,-68667400.0,-4495700.0 276 | 2022-11-10,27.45,0.0004,-126000000.0,-74727900.0,-51702100.0,67694700.0,58735300.0 277 | 2022-11-11,29.50,0.0747,882000000.0,617000000.0,265000000.0,-221000000.0,-661000000.0 278 | 2022-11-14,31.40,0.0644,172000000.0,128000000.0,44326600.0,50336300.0,-222000000.0 279 | 2022-11-15,31.54,0.0045,231000000.0,79993300.0,151000000.0,-70062800.0,-161000000.0 280 | 2022-11-16,31.64,0.0032,179000000.0,65157900.0,114000000.0,-51431100.0,-127000000.0 281 | 2022-11-17,30.57,-0.0338,-78921400.0,9850700.0,-88772100.0,-61303900.0,140000000.0 282 | 2022-11-18,30.33,-0.0079,-97088800.0,20027000.0,-117000000.0,-86137100.0,183000000.0 283 | 2022-11-21,30.13,-0.0066,-111000000.0,-126000000.0,14634000.0,20460000.0,90548900.0 284 | 2022-11-22,30.71,0.0192,36947600.0,89875300.0,-52927700.0,-36313400.0,-634200.0 285 | 2022-11-23,30.48,-0.0075,33652100.0,-45503500.0,79155600.0,-1897200.0,-31754800.0 286 | 2022-11-24,30.48,0.0,-9914100.0,-2597300.0,-7316800.0,-28295300.0,38209400.0 287 | 2022-11-25,31.28,0.0262,148000000.0,57196000.0,90455200.0,-53590200.0,-94061000.0 288 | 2022-11-28,30.22,-0.0339,-205000000.0,-225000000.0,19594800.0,96425900.0,109000000.0 289 | 2022-11-29,33.12,0.096,957000000.0,654000000.0,304000000.0,-177000000.0,-781000000.0 290 | 2022-11-30,33.22,0.003,155000000.0,-81995600.0,237000000.0,82822200.0,-238000000.0 291 | 2022-12-01,33.26,0.0012,166000000.0,345000000.0,-179000000.0,-98245700.0,-67772700.0 292 | 2022-12-02,32.65,-0.0183,20309700.0,20529700.0,-219900.0,81835500.0,-102000000.0 293 | 2022-12-05,34.36,0.0524,591000000.0,466000000.0,125000000.0,-285000000.0,-306000000.0 294 | 2022-12-06,34.11,-0.0073,178000000.0,-11752700.0,190000000.0,-19321400.0,-159000000.0 295 | 2022-12-07,33.58,-0.0155,143000000.0,180000000.0,-36751700.0,-95911800.0,-47048100.0 296 | 2022-12-08,33.71,0.0039,5546800.0,-61903400.0,67450200.0,15118100.0,-20664900.0 297 | 2022-12-09,35.01,0.0386,427000000.0,376000000.0,50815400.0,-105000000.0,-322000000.0 298 | 2022-12-12,34.05,-0.0274,-198000000.0,-209000000.0,10782100.0,71348400.0,127000000.0 299 | 2022-12-13,34.40,0.0103,-47137600.0,-29348500.0,-17789100.0,128000000.0,-80659200.0 300 | 2022-12-14,35.17,0.0224,350000000.0,103000000.0,247000000.0,-65835300.0,-284000000.0 301 | 2022-12-15,34.59,-0.0165,31454400.0,-69869200.0,101000000.0,-35119700.0,3665200.0 302 | 2022-12-16,35.35,0.022,174000000.0,26604900.0,148000000.0,17103900.0,-191000000.0 303 | 2022-12-19,34.76,-0.0167,-90117200.0,-76454000.0,-13663200.0,104000000.0,-14345300.0 304 | 2022-12-20,33.98,-0.0224,-81345700.0,-154000000.0,72218900.0,35236500.0,46109200.0 305 | 2022-12-21,34.21,0.0068,-43726500.0,-40921900.0,-2804600.0,-75740700.0,119000000.0 306 | 2022-12-22,34.76,0.0161,68575200.0,2009300.0,66566000.0,-11764200.0,-56811000.0 307 | 2022-12-23,34.63,-0.0037,-118000000.0,-64448800.0,-53535900.0,127000000.0,-8950800.0 308 | 2022-12-26,34.21,-0.0121,106000000.0,-48931700.0,155000000.0,-138000000.0,31483700.0 309 | 2022-12-27,34.93,0.021,84535800.0,-30618000.0,115000000.0,-40814500.0,-43721400.0 310 | 2022-12-28,35.59,0.0189,407000000.0,228000000.0,179000000.0,-114000000.0,-292000000.0 311 | 2022-12-29,35.49,-0.0028,-43480100.0,-196000000.0,152000000.0,65299800.0,-21819700.0 312 | 2022-12-30,35.52,0.0008,12942900.0,-56348300.0,69291200.0,103000000.0,-116000000.0 313 | 2023-01-03,35.84,0.009,-96938900.0,-78000800.0,-18938100.0,38412000.0,58526900.0 314 | 2023-01-04,36.91,0.0299,340000000.0,228000000.0,113000000.0,-79832500.0,-260000000.0 315 | 2023-01-05,36.76,-0.0041,75065700.0,63025900.0,12039800.0,-74300000.0,-765600.0 316 | 2023-01-06,36.64,-0.0033,-179000000.0,-217000000.0,37537100.0,28421900.0,151000000.0 317 | 2023-01-09,37.06,0.0115,101000000.0,173000000.0,-71333300.0,-141000000.0,39454000.0 318 | 2023-01-10,36.51,-0.0148,-9321700.0,-41457900.0,32136200.0,-108000000.0,117000000.0 319 | 2023-01-11,37.18,0.0184,176000000.0,127000000.0,48654700.0,-83367200.0,-92554100.0 320 | 2023-01-12,37.31,0.0035,65072900.0,21225700.0,43847200.0,-52413600.0,-12659300.0 321 | 2023-01-13,37.92,0.0163,56961300.0,28820200.0,28141000.0,31740000.0,-88701300.0 322 | 2023-01-16,38.73,0.0214,-96628100.0,-11571200.0,-85057000.0,159000000.0,-62727700.0 323 | 2023-01-17,38.94,0.0054,-135000000.0,-24419800.0,-111000000.0,153000000.0,-17529300.0 324 | 2023-01-18,38.64,-0.0077,51562400.0,42764600.0,8797800.0,-45881900.0,-5680500.0 325 | 2023-01-19,38.91,0.007,-13922300.0,91094500.0,-105000000.0,-107000000.0,121000000.0 326 | 2023-01-20,39.31,0.0103,217000000.0,287000000.0,-70227100.0,-226000000.0,9031400.0 327 | 2023-01-30,40.29,0.0249,175000000.0,427000000.0,-252000000.0,-250000000.0,75701800.0 328 | 2023-01-31,39.47,-0.0204,-269000000.0,-214000000.0,-55933500.0,253000000.0,15989200.0 329 | 2023-02-01,38.80,-0.017,-471000000.0,-675000000.0,204000000.0,218000000.0,253000000.0 330 | 2023-02-02,38.29,-0.0131,38964400.0,138000000.0,-99352700.0,-259000000.0,220000000.0 331 | 2023-02-03,37.56,-0.0191,-194000000.0,-3247400.0,-191000000.0,34294400.0,160000000.0 332 | 2023-02-06,36.61,-0.0253,-60923100.0,10875500.0,-71798600.0,-74862500.0,136000000.0 333 | 2023-02-07,36.67,0.0016,-13307400.0,-14482800.0,1175500.0,-70925100.0,84232500.0 334 | 2023-02-08,36.75,0.0022,-9830300.0,-28921400.0,19091100.0,-27060200.0,36890400.0 335 | 2023-02-09,36.75,0.0,-159000000.0,-237000000.0,78277300.0,108000000.0,50526900.0 336 | 2023-02-10,36.42,-0.009,-129000000.0,-53440200.0,-75254000.0,-50350200.0,179000000.0 337 | 2023-02-13,35.98,-0.0121,-151000000.0,-80454900.0,-70536000.0,-50683000.0,202000000.0 338 | 2023-02-14,36.26,0.0078,-103000000.0,-158000000.0,55104600.0,35322100.0,67518400.0 339 | 2023-02-15,35.43,-0.0229,-518000000.0,-543000000.0,24866700.0,146000000.0,373000000.0 340 | 2023-02-16,35.53,0.0028,-28982000.0,-83176100.0,54194100.0,-71715900.0,101000000.0 341 | 2023-02-17,34.97,-0.0158,-227000000.0,-43008700.0,-184000000.0,-62415200.0,290000000.0 342 | 2023-02-20,36.75,0.0509,532000000.0,410000000.0,122000000.0,-334000000.0,-198000000.0 343 | 2023-02-21,36.95,0.0054,-54546900.0,-1082500.0,-53464400.0,63944000.0,-9397200.0 344 | 2023-02-22,36.42,-0.0143,-186000000.0,-105000000.0,-81379400.0,51573300.0,135000000.0 345 | 2023-02-23,36.53,0.003,-84707800.0,-20896300.0,-63811400.0,-104000000.0,189000000.0 346 | 2023-02-24,35.72,-0.0222,-177000000.0,-91372800.0,-85665400.0,-7453800.0,184000000.0 347 | 2023-02-27,35.42,-0.0084,-80428700.0,-895100.0,-79533600.0,-52123200.0,133000000.0 348 | 2023-02-28,35.57,0.0042,-101000000.0,-26404800.0,-74832000.0,-8317500.0,110000000.0 349 | 2023-03-01,36.51,0.0264,60872600.0,-31226200.0,92098800.0,26607300.0,-87479900.0 350 | 2023-03-02,36.51,0.0,33885800.0,-41388900.0,75274700.0,1061300.0,-34947100.0 351 | 2023-03-03,36.51,0.0,-34569600.0,34139400.0,-68709100.0,-28502500.0,63072200.0 352 | 2023-03-06,35.26,-0.0342,-613000000.0,-293000000.0,-320000000.0,37091500.0,576000000.0 353 | 2023-03-07,34.82,-0.0125,-151000000.0,91591500.0,-242000000.0,9610000.0,141000000.0 354 | 2023-03-08,34.26,-0.0161,-262000000.0,-47518100.0,-215000000.0,28630500.0,234000000.0 355 | 2023-03-09,33.84,-0.0123,-188000000.0,-9873900.0,-178000000.0,-59143400.0,248000000.0 356 | 2023-03-10,33.29,-0.0163,-307000000.0,-104000000.0,-203000000.0,958000.0,306000000.0 357 | 2023-03-13,33.31,0.0006,-62802500.0,43451700.0,-106000000.0,-12544000.0,75346500.0 358 | 2023-03-14,32.84,-0.0141,-292000000.0,20884400.0,-313000000.0,111000000.0,181000000.0 359 | 2023-03-15,33.14,0.0091,-211000000.0,197000000.0,-408000000.0,1632600.0,209000000.0 360 | 2023-03-16,32.91,-0.0069,-60183000.0,-1287300.0,-58895700.0,31026200.0,29156800.0 361 | 2023-03-17,32.62,-0.0088,-67944000.0,24883100.0,-92827100.0,-21151400.0,89095400.0 362 | 2023-03-20,32.38,-0.0074,-237000000.0,-95815700.0,-141000000.0,-45922100.0,283000000.0 363 | 2023-03-21,32.49,0.0034,10040100.0,14819900.0,-4779800.0,-146000000.0,136000000.0 364 | 2023-03-22,32.80,0.0095,-20677400.0,67846400.0,-88523800.0,-75422800.0,96100200.0 365 | 2023-03-23,33.46,0.0201,-3709700.0,51934200.0,-55643900.0,51054000.0,-47344200.0 366 | 2023-03-24,32.69,-0.023,-87197200.0,-142000000.0,54681800.0,-65970100.0,153000000.0 367 | 2023-03-27,32.47,-0.0067,-65376000.0,-53136200.0,-12239800.0,-54487800.0,120000000.0 368 | 2023-03-28,32.66,0.0059,71508500.0,96419500.0,-24911000.0,-60884100.0,-10624400.0 369 | 2023-03-29,32.38,-0.0086,-51260300.0,-33987500.0,-17272700.0,-722800.0,51983100.0 370 | 2023-03-30,32.61,0.0071,-47267900.0,17226700.0,-64494600.0,-30881900.0,78149800.0 371 | 2023-03-31,32.53,-0.0025,-138000000.0,-21561400.0,-116000000.0,71999500.0,65509600.0 372 | 2023-04-03,32.63,0.0031,-153000000.0,985800.0,-154000000.0,28926700.0,124000000.0 373 | 2023-04-04,32.54,-0.0028,3635700.0,-245200.0,3881000.0,-19811000.0,16175300.0 374 | 2023-04-06,32.06,-0.0148,-444000000.0,-141000000.0,-304000000.0,126000000.0,318000000.0 375 | 2023-04-07,32.40,0.0106,-22389200.0,2116900.0,-24506100.0,-13087600.0,35476800.0 376 | 2023-04-10,32.50,0.0031,10360400.0,65456000.0,-55095600.0,-14163800.0,3803300.0 377 | 2023-04-11,31.99,-0.0157,-251000000.0,-319000000.0,68263200.0,-36727600.0,287000000.0 378 | 2023-04-12,32.00,0.0003,-116000000.0,-96410800.0,-19971700.0,-963700.0,117000000.0 379 | 2023-04-13,32.27,0.0084,156000000.0,51328000.0,105000000.0,-5698800.0,-150000000.0 380 | 2023-04-14,32.65,0.0118,-5502900.0,154000000.0,-159000000.0,92389400.0,-86886500.0 381 | 2023-04-17,33.46,0.0248,360000000.0,402000000.0,-42526600.0,-160000000.0,-200000000.0 382 | 2023-04-18,33.94,0.0143,189000000.0,83262600.0,105000000.0,-48753500.0,-140000000.0 383 | 2023-04-19,33.76,-0.0053,-130000000.0,-126000000.0,-4855000.0,91542700.0,38859300.0 384 | 2023-04-20,33.25,-0.0151,-262000000.0,-229000000.0,-33293500.0,157000000.0,105000000.0 385 | 2023-04-21,32.76,-0.0147,-144000000.0,-38642800.0,-105000000.0,25636200.0,118000000.0 386 | 2023-04-24,31.86,-0.0275,-247000000.0,-179000000.0,-68109400.0,63814100.0,183000000.0 387 | 2023-04-25,32.29,0.0135,-19521100.0,-21987500.0,2466400.0,-20798900.0,40320000.0 388 | 2023-04-26,32.08,-0.0065,-74988800.0,-64659000.0,-10329900.0,-32568800.0,108000000.0 389 | 2023-04-27,30.89,-0.0371,-616000000.0,-404000000.0,-212000000.0,-112000000.0,728000000.0 390 | 2023-04-28,31.86,0.0314,188000000.0,13607800.0,175000000.0,-170000000.0,-18341600.0 391 | 2023-05-04,32.39,0.0166,221000000.0,140000000.0,80985500.0,-123000000.0,-97622200.0 392 | 2023-05-05,32.95,0.0173,345000000.0,295000000.0,49668300.0,-147000000.0,-198000000.0 393 | 2023-05-08,33.86,0.0276,369000000.0,309000000.0,60149400.0,-274000000.0,-94901400.0 394 | 2023-05-09,33.25,-0.018,-48855600.0,-7409800.0,-41445800.0,-139000000.0,188000000.0 395 | 2023-05-10,32.66,-0.0177,-204000000.0,-114000000.0,-90329800.0,87705700.0,116000000.0 396 | 2023-05-11,32.71,0.0015,31542300.0,85156800.0,-53614600.0,-20666900.0,-10875300.0 397 | 2023-05-12,32.30,-0.0125,-316000000.0,-280000000.0,-35276900.0,111000000.0,204000000.0 398 | 2023-05-15,32.96,0.0204,-77499800.0,-29917900.0,-47581900.0,74243800.0,3256000.0 399 | 2023-05-16,33.08,0.0036,-51077500.0,19340100.0,-70417600.0,21285200.0,29792300.0 400 | 2023-05-17,32.76,-0.0097,-57877300.0,-47477900.0,-10399300.0,66542700.0,-8665400.0 401 | 2023-05-18,32.71,-0.0015,-46972300.0,-8344600.0,-38627800.0,7008800.0,39963600.0 402 | 2023-05-19,32.21,-0.0153,-136000000.0,-105000000.0,-30921500.0,-21945400.0,158000000.0 403 | 2023-05-22,32.46,0.0078,31512200.0,-2230200.0,33742400.0,-49181400.0,17669200.0 404 | 2023-05-23,31.86,-0.0185,-155000000.0,-109000000.0,-46076600.0,-24138300.0,180000000.0 405 | 2023-05-24,31.19,-0.021,-274000000.0,-177000000.0,-97569100.0,-44874700.0,319000000.0 406 | 2023-05-25,30.68,-0.0164,-276000000.0,-302000000.0,25597600.0,-21302600.0,298000000.0 407 | 2023-05-26,31.00,0.0104,-19753400.0,42015400.0,-61768900.0,-70108400.0,89861900.0 408 | 2023-05-29,30.95,-0.0016,-58398000.0,-64212400.0,5814400.0,-4071500.0,62469400.0 409 | 2023-05-30,30.90,-0.0016,-70469200.0,-26548200.0,-43920900.0,27292800.0,43176300.0 410 | 2023-05-31,30.56,-0.011,-236000000.0,-59927800.0,-176000000.0,155000000.0,80710500.0 411 | 2023-06-01,30.32,-0.0079,-248000000.0,-95883600.0,-152000000.0,74321700.0,174000000.0 412 | 2023-06-02,31.33,0.0333,347000000.0,206000000.0,141000000.0,-37481700.0,-310000000.0 413 | 2023-06-05,31.30,-0.001,-56356500.0,-50152000.0,-6204500.0,-47823500.0,104000000.0 414 | 2023-06-06,31.33,0.001,41436300.0,64666000.0,-23229700.0,-76913800.0,35477500.0 415 | 2023-06-07,31.56,0.0073,28050100.0,-44914400.0,72964500.0,9895400.0,-37945500.0 416 | 2023-06-08,32.34,0.0247,200000000.0,43743400.0,156000000.0,-23579500.0,-177000000.0 417 | 2023-06-09,32.00,-0.0105,-138000000.0,-23483200.0,-114000000.0,30778900.0,107000000.0 418 | 2023-06-12,31.99,-0.0003,-22355500.0,-28178300.0,5822800.0,-24113200.0,46468800.0 419 | 2023-06-13,31.99,0.0,-54908500.0,-34950100.0,-19958400.0,16755100.0,38153400.0 420 | 2023-06-14,31.65,-0.0106,-56724900.0,-62762500.0,6037600.0,-49999200.0,107000000.0 421 | 2023-06-15,31.98,0.0104,-112000000.0,-7347300.0,-105000000.0,3967400.0,109000000.0 422 | 2023-06-16,32.19,0.0066,84487100.0,-26562800.0,111000000.0,-29331800.0,-55155300.0 423 | 2023-06-19,31.84,-0.0109,-71241600.0,-54501400.0,-16740200.0,53592900.0,17648700.0 424 | 2023-06-20,31.45,-0.0122,-66763700.0,-94052300.0,27288700.0,14583400.0,52180300.0 425 | 2023-06-21,31.43,-0.0006,58281500.0,-71411100.0,130000000.0,23030600.0,-81312100.0 426 | 2023-06-26,30.87,-0.0178,-175000000.0,-86797100.0,-88496900.0,72067500.0,103000000.0 427 | 2023-06-27,31.08,0.0068,156000000.0,40961600.0,115000000.0,-110000000.0,-45279100.0 428 | 2023-06-28,31.31,0.0074,43442900.0,52028400.0,-8585400.0,-34404300.0,-9038700.0 429 | 2023-06-29,30.94,-0.0118,-143000000.0,-110000000.0,-33087000.0,52758900.0,90640900.0 430 | 2023-06-30,31.02,0.0026,11887800.0,-24175500.0,36063400.0,-52817100.0,40929300.0 431 | 2023-07-03,31.98,0.0309,155000000.0,136000000.0,19345200.0,6593000.0,-162000000.0 432 | 2023-07-04,31.77,-0.0066,8586200.0,47090600.0,-38504400.0,-7811100.0,-775100.0 433 | 2023-07-05,31.29,-0.0151,-44960800.0,-12496500.0,-32464400.0,-46152500.0,91113400.0 434 | 2023-07-06,30.84,-0.0144,-151000000.0,-93026300.0,-58073500.0,-20304300.0,171000000.0 435 | 2023-07-07,30.57,-0.0088,-173000000.0,-89728900.0,-83067200.0,-20845300.0,194000000.0 436 | 2023-07-10,30.71,0.0046,-44255300.0,5665800.0,-49921200.0,16550900.0,27704400.0 437 | 2023-07-11,30.97,0.0085,-29348500.0,-30787500.0,1439000.0,56176300.0,-26827800.0 438 | 2023-07-12,31.46,0.0158,180000000.0,66138700.0,114000000.0,-36803400.0,-144000000.0 439 | 2023-07-13,31.85,0.0124,-30060000.0,17239800.0,-47299800.0,-39845900.0,69905900.0 440 | 2023-07-14,31.93,0.0025,5350900.0,-10407600.0,15758500.0,25262700.0,-30613600.0 441 | 2023-07-17,31.65,-0.0088,-41943100.0,-29710300.0,-12232900.0,-77643000.0,120000000.0 442 | 2023-07-18,31.46,-0.006,12138800.0,-41072100.0,53210900.0,-75950500.0,63811700.0 443 | 2023-07-19,31.58,0.0038,-38717000.0,-36842900.0,-1874100.0,6427300.0,32289700.0 444 | 2023-07-20,31.69,0.0035,4876700.0,24897700.0,-20021000.0,15866900.0,-20743600.0 445 | 2023-07-21,31.80,0.0035,72085000.0,109000000.0,-37115200.0,-49146000.0,-22939000.0 446 | 2023-07-24,31.45,-0.011,-86631100.0,-60397500.0,-26233600.0,21330800.0,65300300.0 447 | 2023-07-25,33.27,0.0579,848000000.0,410000000.0,438000000.0,-346000000.0,-502000000.0 448 | 2023-07-26,33.35,0.0024,-95778300.0,-101000000.0,4934600.0,-36111200.0,132000000.0 449 | 2023-07-27,33.66,0.0093,169000000.0,174000000.0,-4695700.0,-130000000.0,-39762900.0 450 | 2023-07-28,35.10,0.0428,361000000.0,280000000.0,80492700.0,31571900.0,-392000000.0 451 | 2023-07-31,35.56,0.0131,-159000000.0,-155000000.0,-4244700.0,196000000.0,-37422100.0 452 | 2023-08-01,34.99,-0.016,-189000000.0,-108000000.0,-81699700.0,157000000.0,32080300.0 453 | 2023-08-02,34.03,-0.0274,-385000000.0,-151000000.0,-235000000.0,173000000.0,212000000.0 454 | 2023-08-03,34.68,0.0191,152000000.0,74551300.0,77262000.0,5128000.0,-157000000.0 455 | 2023-08-04,34.88,0.0058,-208000000.0,-54469100.0,-153000000.0,46144200.0,162000000.0 456 | 2023-08-07,34.50,-0.0109,-83490100.0,-45790000.0,-37700000.0,158000000.0,-74769700.0 457 | 2023-08-08,34.15,-0.0101,-24124200.0,-73626300.0,49502100.0,23554900.0,569300.0 458 | 2023-08-09,34.02,-0.0038,-115000000.0,-35598600.0,-79257000.0,72105100.0,42750500.0 459 | 2023-08-10,34.14,0.0035,-66501300.0,-25150700.0,-41350600.0,56486100.0,10015200.0 460 | 2023-08-11,33.15,-0.029,-219000000.0,-131000000.0,-87086300.0,-159000000.0,378000000.0 461 | 2023-08-14,32.46,-0.0208,-138000000.0,-27537800.0,-111000000.0,-89976400.0,228000000.0 462 | 2023-08-15,32.36,-0.0031,-175000000.0,-61437900.0,-113000000.0,59974700.0,115000000.0 463 | 2023-08-16,31.97,-0.0121,-194000000.0,-23266000.0,-171000000.0,1625900.0,192000000.0 464 | 2023-08-17,31.79,-0.0056,-181000000.0,-12257900.0,-169000000.0,76212800.0,105000000.0 465 | 2023-08-18,31.88,0.0028,141000000.0,36656800.0,105000000.0,-37950700.0,-103000000.0 466 | 2023-08-21,31.13,-0.0235,-133000000.0,-68510400.0,-64220600.0,-31013700.0,164000000.0 467 | 2023-08-22,31.32,0.0061,62490500.0,110000000.0,-47217100.0,-89168400.0,26678000.0 468 | 2023-08-23,30.85,-0.015,-213000000.0,19879700.0,-233000000.0,-57326200.0,270000000.0 469 | 2023-08-24,31.06,0.0068,-122000000.0,-104000000.0,-18303100.0,-5357900.0,128000000.0 470 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 使用LSTM进行多变量时间序列预测股价——学习记录 2 | ## 背景 3 | 作为一个资深的A股韭菜,一切有利于解套的手段都值得尝试一下。\ 4 | 偶然看到了一篇机器学习的博文,主要介绍利用深度学习方法(LSTM)进行多元时间序列预测。跟股价的模型有点相似,尝试一下,说干就干! 5 | ## 目录 6 | ### 基本概念 7 | * 什么是时间序列分析? 8 | * 什么是 LSTM? 9 | 10 | **时间序列分析**:时间序列表示基于时间顺序的一系列数据。它可以是秒、分钟、小时、天、周、月、年。未来的数据将取决于它以前的值。主要有两种类型的时间序列分析—— 11 | * 单变量时间序列 12 | * 多元时间序列 13 | 14 | 在多元时间序列数据的情况下,将有不同类型的特征值并且目标数据将依赖于这些特征。 15 | ![](/pics/price.jpg) 16 | 17 | 例如在上图中看到的,在多元变量中将有多个列来对目标值进行预测,Close列为收盘价格,不仅取决于它以前的值,还取决于其他特征。因此,要预测即将到来的Close值,我们必须考虑包括目标列在内的所有列来对目标值进行预测。 18 | 19 | 在训练时,如果我们使用 7 列 [target,feature1, feature2, feature3, feature4, feature5, feature6] 来训练模型,我们需要为即将到来的预测日提供 6 列 [feature1, feature2, feature3, feature4, feature5, feature6] 20 | 21 | **LSTM**:是一个循环神经网络,能够处理长期依赖关系,不做过多的介绍,可以参考 [LSTM 长短期记忆人工神经网络](https://baike.baidu.com/item/%E9%95%BF%E7%9F%AD%E6%9C%9F%E8%AE%B0%E5%BF%86%E4%BA%BA%E5%B7%A5%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C/17541107?fr=ge_ala) 22 | 23 | 24 | ### 预测招商银行股价实现思路 25 | ## 训练数据获取 26 | 从百度股市通中抓取招商银行的历史资金流向,保存文件 zhaoshang ![招商银行资金流向](/pics/history.jpg) \ 27 | 使用脚本 dataprocess.py进行数据格式化处理,处理后的数据参见 \ 28 | [股价数据预处理脚本 dataprocess.py](/dataprocess.py) \ 29 | [股价数据预处理结果 China Merchants Bank.csv](/China%20Merchants%20Bank.csv) 30 | 31 | ## 预测模型实现 32 | 这里我选取了 Close 列,收盘价作为将要预测的值 33 | ### 训练数据拆分 34 | ``` 35 | df=pd.read_csv("China Merchants Bank.csv",parse_dates=["Date"],index_col=[0]) 36 | df.head() 37 | print(df.head()) 38 | # print(df.tail()) 39 | # print(df.shape) 40 | 41 | test_split=round(len(df)*0.20) 42 | 43 | # print(test_split) 44 | 45 | df_for_training=df[:-test_split] 46 | df_for_testing=df[-test_split:] 47 | ``` 48 | 49 | ### 数据缩放 50 | 可以注意到数据范围非常大,并且它们没有在相同的范围内缩放,因此为了避免预测错误,让我们先使用MinMaxScaler缩放数据。 51 | 52 | ``` 53 | scaler=MinMaxScaler(feature_range=(0,1)) 54 | df_for_training_scaled = scaler.fit_transform(df_for_training) 55 | df_for_testing_scaled = scaler.fit_transform(df_for_testing) 56 | ``` 57 | 58 | ### 数据拆分 59 | 将数据拆分为X和Y,这是最重要的部分 60 | 61 | ``` 62 | def createXY(dataset,n_past): 63 | dataX = [] 64 | dataY = [] 65 | for i in range(n_past, len(dataset)): 66 | dataX.append(dataset[i - n_past:i, 0:dataset.shape[1]]) 67 | dataY.append(dataset[i,0]) 68 | return np.array(dataX),np.array(dataY) 69 | 70 | trainX,trainY=createXY(df_for_training_scaled,30) 71 | testX,testY=createXY(df_for_testing_scaled,30) 72 | ``` 73 | 74 | 解释 \ 75 | n_past是我们在预测下一个目标值时将在过去查看的步骤数。这里使用30,意味着将使用过去的30个值(包括目标列在内的所有特性)来预测第31个目标值。因此,在trainX中我们会有所有的特征值,而在trainY中我们只有目标值。 76 | 77 | for循环分解:对于训练,dataset = df_for_training_scaled, n_past=30 78 | * 当i=30时:data_X.addend (df_for_training_scaled[i - n_past:i, 0:df_for_training.shape[1]]), 79 | 从n_past开始的范围是30,所以第一次数据范围将是 [30 - 30,30,0:6] 相当于 [0:30,0:7] 80 | * 因此在dataX列表中,df_for_training_scaled[0:30,0:7]数组将第一次出现。 81 | * dataY.append(df_for_training_scaled[i,0]),i = 30,所以它将只取第30行开始的Close(因为在预测中,我们只需要Close列,所以列范围仅为0,表示Close列)。第一次在dataY列表中存储df_for_training_scaled[30,0]值。 82 | 83 | 所以包含7列的前30行存储在dataX中,只有Close列的第31行存储在dataY中。然后我们将dataX和dataY列表转换为数组,它们以数组格式在LSTM中进行训练 。 84 | 85 | ### 训练模型 86 | 87 | ``` 88 | def build_model(optimizer): 89 | grid_model = Sequential() 90 | grid_model.add(LSTM(50,return_sequences=True,input_shape=(30,7))) 91 | grid_model.add(LSTM(50)) 92 | grid_model.add(Dropout(0.2)) 93 | grid_model.add(Dense(1)) 94 | 95 | grid_model.compile(loss = 'mse',optimizer = optimizer) 96 | return grid_model 97 | 98 | grid_model = KerasRegressor(build_fn=build_model,verbose=1,validation_data=(testX,testY)) 99 | parameters = {'batch_size' : [16,20], 100 | 'epochs' : [8,10], 101 | 'optimizer' : ['adam','Adadelta'] } 102 | 103 | grid_search = GridSearchCV(estimator = grid_model, 104 | param_grid = parameters, 105 | cv = 2) 106 | 107 | grid_search = grid_search.fit(trainX,trainY) 108 | ``` 109 | 110 | ### 测试模型 111 | 利用测试数据集测试模型 112 | ``` 113 | my_model=grid_search.best_estimator_.model 114 | prediction=my_model.predict(testX) 115 | ``` 116 | 117 | ### 图形化预测结果和真实数据 118 | 119 | ``` 120 | plt.plot(original, color = 'red', label = 'Real Stock Price') 121 | plt.plot(pred, color = 'blue', label = 'Predicted Stock Price') 122 | plt.title('Stock Price Prediction') 123 | plt.xlabel('Time') 124 | plt.ylabel('China Merchants Bank Stock Price') 125 | plt.legend() 126 | plt.show() 127 | 128 | ``` 129 | 130 | **真实股价与预测股价对比** 131 | ![预测结果](/pics/pred_stock.jpg) 132 | 133 | ### 未解决的问题&一些思考 134 | 正如上文介绍,利用一些多元的参数,实现了对股价的“预测”,预测的趋势折现图与实际折线图趋势基本吻合,仔细的读者会发现,“预测” 是加了引号的,也就是说,当前只实现了基于历史多元参数的历史趋势的“预测”,而历史的数据是已经发生过的,实际值真实存在。并没有真正实现对未来数据的预测。 \ 135 | 而互联网上的大多数资料均出自以下参考链接中的中文翻译版本,甚至连代码和测试数据集都没有调整,并没有解决实际问题。 136 | 137 | 这里就出现了一个悖论,要对未来的股价进行预测,当前选取的多元变量也是还未发生,且未来不确定值的变量,这些数据如何产生?当前我还没搞懂,以下是几个猜测的方向,将继续探索。 138 | 139 | * 多元变量选取的错误,不应该选取未来不确定的参数作为多元变量? 140 | * 预测模型的入参需要基础数据,预测未来的数据,入参从哪来?入参如果也是未来的数据怎么办? 141 | 142 | 机器学习理论近几年发展较为迅速,但成功的应用于实际业务助力业务发展的案例却较少,可能受限于自己的知识范围,还没有接触到有比较成功的将机器学习应用于证券交易的案例,希望能发现学习一下 143 | 144 | ### 参考 145 | [Stock Price Prediction – Machine Learning Project in Python](https://data-flair.training/blogs/stock-price-prediction-machine-learning-project-in-python/) 146 | 147 | -------------------------------------------------------------------------------- /dataprocess.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | with open("zhaoshang", "r") as file: 4 | lines = file.readlines() 5 | i = 0 6 | newLines = [] 7 | newLine = '' 8 | 9 | for line in lines: 10 | line = line.strip("\n") 11 | 12 | if line.find("/") != -1: 13 | line = line.replace("/","-") 14 | if line.find("+") != -1: 15 | line = line.replace("+","") 16 | 17 | if line.find("万") != -1: 18 | line = line.replace("万","") 19 | line = str(round(float(line) * 10000, 1)) 20 | elif line.find("亿") != -1: 21 | line = line.replace("亿","") 22 | line = str(round(float(line) * 100000000, 1)) 23 | elif line.find("%") != -1: 24 | line = line.replace("%","") 25 | line = str(round(float(line) / 100, 4)) 26 | 27 | if i % 8 == 7: 28 | newLine = newLine + line + "\n" 29 | newLines.append(newLine) 30 | newLine = '' 31 | elif i % 8 < 7: 32 | line = line + "," 33 | newLine = newLine + line 34 | i = i + 1 35 | # print(line) 36 | # print(newLines) 37 | 38 | # print(newLines[-1:-len(newLines):-1]) 39 | 40 | sortedLines = newLines[-1:-len(newLines):-1] 41 | 42 | # print(newLines[0]) 43 | 44 | sortedLines.insert(0, newLines[0]) 45 | 46 | print(sortedLines) 47 | 48 | 49 | with open("China Merchants Bank.csv", "w") as file: 50 | file.writelines(sortedLines) 51 | -------------------------------------------------------------------------------- /pics/history.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubguoheng/Stock-Price-Prediction-Project-Code/cc5554ca75d1baa1c99ced43cd8f92a4445522f0/pics/history.jpg -------------------------------------------------------------------------------- /pics/pred_stock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubguoheng/Stock-Price-Prediction-Project-Code/cc5554ca75d1baa1c99ced43cd8f92a4445522f0/pics/pred_stock.jpg -------------------------------------------------------------------------------- /pics/price.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubguoheng/Stock-Price-Prediction-Project-Code/cc5554ca75d1baa1c99ced43cd8f92a4445522f0/pics/price.jpg -------------------------------------------------------------------------------- /stock_pre.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import numpy as np 3 | 4 | import matplotlib.pyplot as plt 5 | 6 | from matplotlib.pylab import rcParams 7 | rcParams['figure.figsize']=20,10 8 | 9 | from sklearn.preprocessing import MinMaxScaler 10 | 11 | from keras.models import Sequential 12 | from keras.layers import LSTM,Dropout,Dense 13 | 14 | from keras.wrappers.scikit_learn import KerasRegressor 15 | from sklearn.model_selection import GridSearchCV 16 | 17 | def createXY(dataset,n_past): 18 | dataX = [] 19 | dataY = [] 20 | for i in range(n_past, len(dataset)): 21 | dataX.append(dataset[i - n_past:i, 0:dataset.shape[1]]) 22 | dataY.append(dataset[i,0]) 23 | return np.array(dataX),np.array(dataY) 24 | 25 | def build_model(optimizer): 26 | grid_model = Sequential() 27 | grid_model.add(LSTM(50,return_sequences=True,input_shape=(30,7))) 28 | grid_model.add(LSTM(50)) 29 | grid_model.add(Dropout(0.2)) 30 | grid_model.add(Dense(1)) 31 | 32 | grid_model.compile(loss = 'mse',optimizer = optimizer) 33 | return grid_model 34 | 35 | 36 | df=pd.read_csv("China Merchants Bank.csv",parse_dates=["Date"],index_col=[0]) 37 | df.head() 38 | print(df.head()) 39 | # print(df.tail()) 40 | # print(df.shape) 41 | 42 | test_split=round(len(df)*0.20) 43 | 44 | # print(test_split) 45 | 46 | df_for_training=df[:-test_split] 47 | df_for_testing=df[-test_split:] 48 | 49 | # print(df_for_training.shape) 50 | # print(df_for_testing.shape) 51 | 52 | scaler=MinMaxScaler(feature_range=(0,1)) 53 | df_for_training_scaled = scaler.fit_transform(df_for_training) 54 | df_for_testing_scaled = scaler.fit_transform(df_for_testing) 55 | 56 | trainX,trainY=createXY(df_for_training_scaled,30) 57 | testX,testY=createXY(df_for_testing_scaled,30) 58 | 59 | print("trainX Shape-- ", trainX.shape) 60 | print("trainY Shape-- ",trainY.shape) 61 | 62 | print("testX Shape-- ",testX.shape) 63 | print("testY Shape-- ",testY.shape) 64 | 65 | 66 | print("trainX[0].shape-- \n",trainX[0].shape) 67 | # print("trainY[0]-- ",trainY[0]) 68 | 69 | grid_model = KerasRegressor(build_fn=build_model,verbose=1,validation_data=(testX,testY)) 70 | parameters = {'batch_size' : [16,20], 71 | 'epochs' : [8,10], 72 | 'optimizer' : ['adam','Adadelta'] } 73 | 74 | grid_search = GridSearchCV(estimator = grid_model, 75 | param_grid = parameters, 76 | cv = 2) 77 | 78 | grid_search = grid_search.fit(trainX,trainY) 79 | 80 | print(grid_search.best_params_) 81 | 82 | my_model=grid_search.best_estimator_.model 83 | 84 | prediction=my_model.predict(testX) 85 | # print("prediction\n", prediction) 86 | # print("\nPrediction Shape-",prediction.shape) 87 | 88 | prediction_copies_array = np.repeat(prediction,7, axis=-1) 89 | 90 | pred=scaler.inverse_transform(np.reshape(prediction_copies_array,(len(prediction),7)))[:,0] 91 | 92 | original_copies_array = np.repeat(testY,7, axis=-1) 93 | original=scaler.inverse_transform(np.reshape(original_copies_array,(len(testY),7)))[:,0] 94 | 95 | print("Pred Values-- " ,pred) 96 | print("\nOriginal Values-- " ,original) 97 | 98 | plt.plot(original, color = 'red', label = 'Real Stock Price') 99 | plt.plot(pred, color = 'blue', label = 'Predicted Stock Price') 100 | plt.title('Stock Price Prediction') 101 | plt.xlabel('Time') 102 | plt.ylabel('China Merchants Bank Stock Price') 103 | plt.legend() 104 | plt.show() --------------------------------------------------------------------------------