Browse Source

Initial commit

master
William Davis 1 year ago
commit
81b88e70fb
  1. 1
      README.md
  2. 252
      data
  3. 9
      main.py
  4. 10
      plot.py
  5. 7095
      spy_data

1
README.md

@ -0,0 +1 @@
https://towardsdatascience.com/a-comprehensive-guide-to-downloading-stock-prices-in-python-2cd93ff821d4

252
data

@ -0,0 +1,252 @@
Date,Open,High,Low,Close,Adj Close,Volume
2019-01-02,61.220001220703125,63.0260009765625,59.7599983215332,62.02399826049805,62.02399826049805,58293000
2019-01-03,61.400001525878906,61.880001068115234,59.47600173950195,60.071998596191406,60.071998596191406,34826000
2019-01-04,61.20000076293945,63.599998474121094,60.54600143432617,63.53799819946289,63.53799819946289,36970500
2019-01-07,64.34400177001953,67.3479995727539,63.54999923706055,66.99199676513672,66.99199676513672,37756000
2019-01-08,68.39199829101562,68.802001953125,65.40399932861328,67.06999969482422,67.06999969482422,35042500
2019-01-09,67.0999984741211,68.69999694824219,66.29399871826172,67.70600128173828,67.70600128173828,27164500
2019-01-10,66.87999725341797,69.0780029296875,66.35800170898438,68.99400329589844,68.99400329589844,30282000
2019-01-11,68.41799926757812,69.68199920654297,67.75399780273438,69.4520034790039,69.4520034790039,25195500
2019-01-14,68.47599792480469,68.5,66.80000305175781,66.87999725341797,66.87999725341797,26236500
2019-01-15,67.0,69.76000213623047,66.9000015258789,68.88600158691406,68.88600158691406,30283000
2019-01-16,68.95600128173828,70.4000015258789,68.69999694824219,69.20999908447266,69.20999908447266,23458500
2019-01-17,69.24199676513672,70.30000305175781,68.83000183105469,69.46199798583984,69.46199798583984,18383500
2019-01-18,64.5999984741211,65.4260025024414,59.94599914550781,60.45199966430664,60.45199966430664,120754000
2019-01-22,60.9640007019043,61.599998474121094,59.099998474121094,59.784000396728516,59.784000396728516,60333500
2019-01-23,58.5,58.900001525878906,56.3380012512207,57.518001556396484,57.518001556396484,62650000
2019-01-24,56.60599899291992,58.736000061035156,55.85599899291992,58.301998138427734,58.301998138427734,40061000
2019-01-25,58.87799835205078,59.70399856567383,57.90999984741211,59.40800094604492,59.40800094604492,36248000
2019-01-28,58.582000732421875,59.492000579833984,57.54999923706055,59.2760009765625,59.2760009765625,32116500
2019-01-29,59.05400085449219,59.71200180053711,58.36000061035156,59.492000579833984,59.492000579833984,23108500
2019-01-30,60.09000015258789,61.79999923706055,59.698001861572266,61.75400161743164,61.75400161743164,56251500
2019-01-31,60.20000076293945,62.3120002746582,58.79999923706055,61.40399932861328,61.40399932861328,62846000
2019-02-01,61.08399963378906,63.220001220703125,60.70000076293945,62.44200134277344,62.44200134277344,36417000
2019-02-04,62.59600067138672,63.060001373291016,60.375999450683594,62.577999114990234,62.577999114990234,36760500
2019-02-05,62.49800109863281,64.48799896240234,62.45000076293945,64.2699966430664,64.2699966430664,33714000
2019-02-06,63.917999267578125,64.8479995727539,63.124000549316406,63.444000244140625,63.444000244140625,25192500
2019-02-07,62.65999984741211,62.939998626708984,60.599998474121094,61.50199890136719,61.50199890136719,32603000
2019-02-08,61.36600112915039,61.4900016784668,59.70000076293945,61.15999984741211,61.15999984741211,29221000
2019-02-11,62.31999969482422,63.720001220703125,62.099998474121094,62.56800079345703,62.56800079345703,35648500
2019-02-12,63.2400016784668,63.63800048828125,61.92399978637695,62.36199951171875,62.36199951171875,27588000
2019-02-13,62.470001220703125,62.54999923706055,61.11399841308594,61.63399887084961,61.63399887084961,25708000
2019-02-14,60.67599868774414,61.354000091552734,60.20000076293945,60.75400161743164,60.75400161743164,26004000
2019-02-15,60.900001525878906,61.599998474121094,60.779998779296875,61.57600021362305,61.57600021362305,19524500
2019-02-19,61.3120002746582,62.30799865722656,61.09400177001953,61.12799835205078,61.12799835205078,20842000
2019-02-20,60.88199996948242,61.2599983215332,59.79999923706055,60.512001037597656,60.512001037597656,35710500
2019-02-21,60.36199951171875,60.64799880981445,58.099998474121094,58.24599838256836,58.24599838256836,44546000
2019-02-22,58.89799880981445,59.29999923706055,58.41999816894531,58.94200134277344,58.94200134277344,28703000
2019-02-25,59.582000732421875,60.58000183105469,59.400001525878906,59.75400161743164,59.75400161743164,33132500
2019-02-26,58.444000244140625,60.402000427246094,57.75400161743164,59.571998596191406,59.571998596191406,42912500
2019-02-27,60.35599899291992,63.2599983215332,60.11000061035156,62.948001861572266,62.948001861572266,55919500
2019-02-28,63.784000396728516,64.0,62.1619987487793,63.97600173950195,63.97600173950195,52603500
2019-03-01,61.38800048828125,61.42599868774414,58.380001068115234,58.95800018310547,58.95800018310547,114557000
2019-03-04,59.624000549316406,59.79999923706055,56.555999755859375,57.071998596191406,57.071998596191406,85484000
2019-03-05,56.400001525878906,56.79999923706055,54.02000045776367,55.30799865722656,55.30799865722656,93823500
2019-03-06,55.29600143432617,56.301998138427734,54.87799835205078,55.24800109863281,55.24800109863281,51677500
2019-03-07,55.768001556396484,56.939998626708984,54.849998474121094,55.31800079345703,55.31800079345703,47212500
2019-03-08,55.38199996948242,57.11800003051758,55.178001403808594,56.827999114990234,56.827999114990234,44098000
2019-03-11,56.70399856567383,58.25600051879883,56.099998474121094,58.183998107910156,58.183998107910156,36961500
2019-03-12,57.29800033569336,57.61399841308594,56.21200180053711,56.672000885009766,56.672000885009766,37520500
2019-03-13,56.779998779296875,58.39799880981445,56.540000915527344,57.79199981689453,57.79199981689453,34223500
2019-03-14,58.4900016784668,59.077999114990234,57.65800094604492,57.992000579833984,57.992000579833984,35517000
2019-03-15,56.70199966430664,56.74399948120117,54.880001068115234,55.08599853515625,55.08599853515625,73927500
2019-03-18,55.20000076293945,55.61000061035156,53.459999084472656,53.89799880981445,53.89799880981445,51405000
2019-03-19,53.5,54.65999984741211,52.69200134277344,53.49399948120117,53.49399948120117,59003000
2019-03-20,53.9379997253418,54.99399948120117,53.2599983215332,54.720001220703125,54.720001220703125,34541000
2019-03-21,54.52000045776367,55.290000915527344,53.689998626708984,54.80400085449219,54.80400085449219,29735500
2019-03-22,54.51599884033203,54.560001373291016,52.79999923706055,52.90599822998047,52.90599822998047,43728000
2019-03-25,51.94200134277344,52.63600158691406,50.891998291015625,52.08399963378906,52.08399963378906,51075000
2019-03-26,52.88800048828125,54.051998138427734,52.88600158691406,53.55400085449219,53.55400085449219,36754500
2019-03-27,53.75,55.07400131225586,53.63600158691406,54.965999603271484,54.965999603271484,43896000
2019-03-28,55.43199920654297,56.066001892089844,55.02000045776367,55.7239990234375,55.7239990234375,33870500
2019-03-29,55.7400016784668,56.03200149536133,54.900001525878906,55.97200012207031,55.97200012207031,29956500
2019-04-01,56.52399826049805,57.84000015258789,56.25600051879883,57.83599853515625,57.83599853515625,40552000
2019-04-02,57.65999984741211,57.88800048828125,56.7760009765625,57.17599868774414,57.17599868774414,27394500
2019-04-03,57.4640007019043,59.23400115966797,57.433998107910156,58.36199951171875,58.36199951171875,39597000
2019-04-04,52.37799835205078,54.2400016784668,52.11800003051758,53.555999755859375,53.555999755859375,118603500
2019-04-05,53.97200012207031,55.220001220703125,53.22200012207031,54.992000579833984,54.992000579833984,65191500
2019-04-08,55.53799819946289,56.231998443603516,54.0880012512207,54.63999938964844,54.63999938964844,52052000
2019-04-09,54.33000183105469,55.0,53.922000885009766,54.46200180053711,54.46200180053711,29520000
2019-04-10,55.347999572753906,55.67599868774414,54.577999114990234,55.21200180053711,55.21200180053711,35306500
2019-04-11,53.65999984741211,54.099998474121094,53.119998931884766,53.683998107910156,53.683998107910156,49179500
2019-04-12,54.04399871826172,54.38999938964844,53.36600112915039,53.540000915527344,53.540000915527344,33730000
2019-04-15,53.72600173950195,53.7760009765625,51.72600173950195,53.2760009765625,53.2760009765625,50193000
2019-04-16,53.150001525878906,55.0,52.944000244140625,54.672000885009766,54.672000885009766,36364500
2019-04-17,54.95000076293945,54.95800018310547,53.70800018310547,54.24599838256836,54.24599838256836,25632500
2019-04-18,54.24599838256836,54.96799850463867,53.95000076293945,54.652000427246094,54.652000427246094,29381500
2019-04-22,53.79999923706055,53.93600082397461,52.49599838256836,52.54999923706055,52.54999923706055,60735500
2019-04-23,52.029998779296875,53.119998931884766,51.150001525878906,52.779998779296875,52.779998779296875,54719500
2019-04-24,52.77000045776367,53.06399917602539,51.599998474121094,51.731998443603516,51.731998443603516,53637500
2019-04-25,51.0,51.79999923706055,49.2140007019043,49.5260009765625,49.5260009765625,109247000
2019-04-26,49.29999923706055,49.33599853515625,46.22600173950195,47.02799987792969,47.02799987792969,111803500
2019-04-29,47.172000885009766,48.79600143432617,46.433998107910156,48.29399871826172,48.29399871826172,83572500
2019-04-30,48.4119987487793,48.84199905395508,47.400001525878906,47.737998962402344,47.737998962402344,47323000
2019-05-01,47.77000045776367,48.0,46.29999923706055,46.801998138427734,46.801998138427734,53522000
2019-05-02,49.104000091552734,49.42599868774414,47.54399871826172,48.81999969482422,48.81999969482422,90796500
2019-05-03,48.77199935913086,51.321998596191406,48.698001861572266,51.00600051879883,51.00600051879883,118534000
2019-05-06,50.00400161743164,51.66999816894531,49.70000076293945,51.06800079345703,51.06800079345703,54169500
2019-05-07,51.36000061035156,51.44200134277344,49.02000045776367,49.4119987487793,49.4119987487793,50657000
2019-05-08,49.38800048828125,50.119998931884766,48.84000015258789,48.96799850463867,48.96799850463867,30882000
2019-05-09,48.400001525878906,48.736000061035156,47.38800048828125,48.395999908447266,48.395999908447266,33557000
2019-05-10,47.95000076293945,48.39799880981445,47.20399856567383,47.90399932861328,47.90399932861328,35041500
2019-05-13,46.402000427246094,46.49399948120117,44.900001525878906,45.402000427246094,45.402000427246094,54174000
2019-05-14,45.86000061035156,46.900001525878906,45.599998474121094,46.46200180053711,46.46200180053711,36262000
2019-05-15,45.86399841308594,46.487998962402344,45.04999923706055,46.38999938964844,46.38999938964844,36480000
2019-05-16,45.89799880981445,46.20000076293945,45.29999923706055,45.66600036621094,45.66600036621094,37416500
2019-05-17,44.391998291015625,44.448001861572266,41.784000396728516,42.20600128173828,42.20600128173828,88933500
2019-05-20,40.560001373291016,41.20000076293945,39.04999923706055,41.071998596191406,41.071998596191406,102631000
2019-05-21,39.551998138427734,41.47999954223633,39.20800018310547,41.01599884033203,41.01599884033203,90019500
2019-05-22,39.81999969482422,40.78799819946289,38.35599899291992,38.54600143432617,38.54600143432617,93426000
2019-05-23,38.86800003051758,39.89400100708008,37.24399948120117,39.097999572753906,39.097999572753906,132735500
2019-05-24,39.965999603271484,39.99599838256836,37.75,38.125999450683594,38.125999450683594,70683000
2019-05-28,38.2400016784668,39.0,37.56999969482422,37.7400016784668,37.7400016784668,51564500
2019-05-29,37.41999816894531,38.47800064086914,37.007999420166016,37.97200012207031,37.97200012207031,59843000
2019-05-30,37.75,38.45199966430664,37.40399932861328,37.64400100708008,37.64400100708008,39632500
2019-05-31,37.02000045776367,37.98400115966797,36.81999969482422,37.03200149536133,37.03200149536133,52033500
2019-06-03,37.10200119018555,37.33599853515625,35.39799880981445,35.79399871826172,35.79399871826172,65322000
2019-06-04,36.220001220703125,38.79600143432617,35.922000885009766,38.720001220703125,38.720001220703125,69037500
2019-06-05,39.736000061035156,40.25600051879883,38.369998931884766,39.31800079345703,39.31800079345703,67554000
2019-06-06,40.88800048828125,42.20000076293945,40.36000061035156,41.189998626708984,41.189998626708984,101211000
2019-06-07,41.0,42.167999267578125,40.70000076293945,40.900001525878906,40.900001525878906,80017500
2019-06-10,42.04999923706055,43.38800048828125,41.801998138427734,42.57600021362305,42.57600021362305,52925000
2019-06-11,43.827999114990234,44.18000030517578,42.70000076293945,43.41999816894531,43.41999816894531,58267500
2019-06-12,44.59000015258789,44.67599868774414,41.79999923706055,41.85200119018555,41.85200119018555,75987500
2019-06-13,42.07600021362305,42.97999954223633,41.50199890136719,42.78200149536133,42.78200149536133,40841500
2019-06-14,42.25,43.33000183105469,42.08000183105469,42.98400115966797,42.98400115966797,37167000
2019-06-17,43.09600067138672,45.400001525878906,42.854000091552734,45.00600051879883,45.00600051879883,61584000
2019-06-18,45.74399948120117,46.948001861572266,44.512001037597656,44.948001861572266,44.948001861572266,63579000
2019-06-19,45.02199935913086,45.55400085449219,44.21200180053711,45.2859992980957,45.2859992980957,32875500
2019-06-20,44.599998474121094,45.380001068115234,43.27000045776367,43.92399978637695,43.92399978637695,59317500
2019-06-21,43.24399948120117,44.43600082397461,43.099998474121094,44.37200164794922,44.37200164794922,41010500
2019-06-24,44.64799880981445,45.172000885009766,44.20399856567383,44.72800064086914,44.72800064086914,28754000
2019-06-25,44.87799835205078,45.06800079345703,43.89799880981445,43.95199966430664,43.95199966430664,30910500
2019-06-26,44.0620002746582,45.44599914550781,43.619998931884766,43.854000091552734,43.854000091552734,42536000
2019-06-27,43.88999938964844,44.58000183105469,43.470001220703125,44.56800079345703,44.56800079345703,31698500
2019-06-28,44.198001861572266,45.034000396728516,44.15999984741211,44.69200134277344,44.69200134277344,34257000
2019-07-01,46.04199981689453,46.619998931884766,45.25600051879883,45.433998107910156,45.433998107910156,41067000
2019-07-02,45.77799987792969,45.83000183105469,44.444000244140625,44.90999984741211,44.90999984741211,46295000
2019-07-03,47.87799835205078,48.31399917602539,46.902000427246094,46.97999954223633,46.97999954223633,71005500
2019-07-05,46.91400146484375,47.09000015258789,46.15999984741211,46.619998931884766,46.619998931884766,35328500
2019-07-08,46.24800109863281,46.45000076293945,45.731998443603516,46.06800079345703,46.06800079345703,29402500
2019-07-09,45.79399871826172,46.20000076293945,45.45600128173828,46.012001037597656,46.012001037597656,30954000
2019-07-10,46.83000183105469,47.78799819946289,46.62799835205078,47.784000396728516,47.784000396728516,45728500
2019-07-11,47.62799835205078,48.29999923706055,47.15999984741211,47.720001220703125,47.720001220703125,37572000
2019-07-12,47.95000076293945,49.07600021362305,47.94200134277344,49.01599884033203,49.01599884033203,46002500
2019-07-15,49.599998474121094,50.88399887084961,48.97200012207031,50.70000076293945,50.70000076293945,55000500
2019-07-16,49.86000061035156,50.70600128173828,49.58599853515625,50.47600173950195,50.47600173950195,40745000
2019-07-17,51.13399887084961,51.6619987487793,50.66999816894531,50.97200012207031,50.97200012207031,48823500
2019-07-18,51.0099983215332,51.150001525878906,50.37799835205078,50.70800018310547,50.70800018310547,23793000
2019-07-19,51.13800048828125,51.992000579833984,50.92399978637695,51.63600158691406,51.63600158691406,35242000
2019-07-22,51.75,52.43000030517578,50.8380012512207,51.13600158691406,51.13600158691406,34212000
2019-07-23,51.34199905395508,52.09600067138672,50.900001525878906,52.034000396728516,52.034000396728516,25115500
2019-07-24,51.83399963378906,53.2140007019043,51.63199996948242,52.97600173950195,52.97600173950195,55364000
2019-07-25,46.70000076293945,46.900001525878906,45.11000061035156,45.763999938964844,45.763999938964844,112091500
2019-07-26,45.38399887084961,46.051998138427734,44.45000076293945,45.608001708984375,45.608001708984375,50138500
2019-07-29,45.417999267578125,47.1879997253418,45.20600128173828,47.15399932861328,47.15399932861328,46366500
2019-07-30,46.58000183105469,48.672000885009766,46.43600082397461,48.45199966430664,48.45199966430664,40545000
2019-07-31,48.599998474121094,49.33599853515625,47.33000183105469,48.321998596191406,48.321998596191406,45891000
2019-08-01,48.529998779296875,48.902000427246094,46.354000091552734,46.77000045776367,46.77000045776367,41297500
2019-08-02,46.27000045776367,47.25400161743164,45.84600067138672,46.86800003051758,46.86800003051758,30682500
2019-08-05,45.91999816894531,46.27399826049805,45.15599822998047,45.66400146484375,45.66400146484375,35141500
2019-08-06,46.375999450683594,46.5,45.150001525878906,46.150001525878906,46.150001525878906,27821000
2019-08-07,45.29999923706055,46.7140007019043,45.15999984741211,46.683998107910156,46.683998107910156,23882500
2019-08-08,46.88999938964844,47.959999084472656,46.529998779296875,47.65999984741211,47.65999984741211,26371500
2019-08-09,47.209999084472656,47.79199981689453,46.762001037597656,47.00199890136719,47.00199890136719,19491000
2019-08-12,46.597999572753906,47.15399932861328,45.75,45.801998138427734,45.801998138427734,23319500
2019-08-13,45.762001037597656,47.20000076293945,45.5099983215332,47.0,47.0,24240500
2019-08-14,46.242000579833984,46.29999923706055,43.3380012512207,43.92399978637695,43.92399978637695,47813000
2019-08-15,44.172000885009766,44.3120002746582,42.310001373291016,43.12799835205078,43.12799835205078,40798000
2019-08-16,43.332000732421875,44.448001861572266,43.20399856567383,43.987998962402344,43.987998962402344,25492500
2019-08-19,44.84199905395508,45.566001892089844,44.34000015258789,45.36600112915039,45.36600112915039,26548000
2019-08-20,45.52399826049805,45.81800079345703,44.90800094604492,45.172000885009766,45.172000885009766,20626000
2019-08-21,44.402000427246094,44.64400100708008,43.52000045776367,44.16600036621094,44.16600036621094,38971500
2019-08-22,44.560001373291016,45.08000183105469,43.64400100708008,44.43000030517578,44.43000030517578,32795000
2019-08-23,43.99399948120117,44.23400115966797,42.20000076293945,42.279998779296875,42.279998779296875,42693000
2019-08-26,42.720001220703125,43.00400161743164,42.30799865722656,43.0,43.0,25259500
2019-08-27,43.14799880981445,43.7599983215332,42.40599822998047,42.816001892089844,42.816001892089844,27081000
2019-08-28,42.737998962402344,43.45000076293945,42.46200180053711,43.11800003051758,43.11800003051758,16127500
2019-08-29,43.79999923706055,44.68000030517578,43.599998474121094,44.34199905395508,44.34199905395508,25897500
2019-08-30,45.83000183105469,46.487998962402344,44.84199905395508,45.12200164794922,45.12200164794922,46603000
2019-09-03,44.816001892089844,45.790000915527344,44.63199996948242,45.00199890136719,45.00199890136719,26770500
2019-09-04,45.37799835205078,45.69200134277344,43.84199905395508,44.13600158691406,44.13600158691406,28805000
2019-09-05,44.5,45.959999084472656,44.16999816894531,45.91600036621094,45.91600036621094,36976500
2019-09-06,45.439998626708984,45.928001403808594,45.034000396728516,45.4900016784668,45.4900016784668,20947000
2019-09-09,46.0,46.75199890136719,45.84600067138672,46.358001708984375,46.358001708984375,24013500
2019-09-10,46.15999984741211,47.108001708984375,45.78799819946289,47.108001708984375,47.108001708984375,24418500
2019-09-11,47.47600173950195,49.63399887084961,47.20000076293945,49.41999816894531,49.41999816894531,50214000
2019-09-12,49.540000915527344,50.70000076293945,48.880001068115234,49.17399978637695,49.17399978637695,42906000
2019-09-13,49.391998291015625,49.689998626708984,48.9739990234375,49.040000915527344,49.040000915527344,26565500
2019-09-16,49.20000076293945,49.486000061035156,48.23400115966797,48.5620002746582,48.5620002746582,23640500
2019-09-17,48.49399948120117,49.119998931884766,48.07400131225586,48.95800018310547,48.95800018310547,19327000
2019-09-18,49.0,49.63399887084961,48.4739990234375,48.698001861572266,48.698001861572266,20851000
2019-09-19,49.20000076293945,49.5880012512207,48.96799850463867,49.31999969482422,49.31999969482422,23979000
2019-09-20,49.29800033569336,49.38999938964844,47.63199996948242,48.124000549316406,48.124000549316406,31765000
2019-09-23,48.0,49.0359992980957,47.84400177001953,48.24599838256836,48.24599838256836,21701000
2019-09-24,48.30400085449219,48.39799880981445,44.52199935913086,44.641998291015625,44.641998291015625,64457500
2019-09-25,44.9119987487793,45.79600143432617,43.672000885009766,45.7400016784668,45.7400016784668,47135500
2019-09-26,46.13199996948242,48.6619987487793,45.47999954223633,48.512001037597656,48.512001037597656,59422500
2019-09-27,48.439998626708984,49.742000579833984,47.74599838256836,48.42599868774414,48.42599868774414,55582000
2019-09-30,48.599998474121094,48.79600143432617,47.22200012207031,48.17399978637695,48.17399978637695,29399000
2019-10-01,48.29999923706055,49.189998626708984,47.82600021362305,48.9379997253418,48.9379997253418,30813000
2019-10-02,48.65800094604492,48.93000030517578,47.88600158691406,48.625999450683594,48.625999450683594,28157000
2019-10-03,46.37200164794922,46.895999908447266,44.85599899291992,46.60599899291992,46.60599899291992,75422500
2019-10-04,46.321998596191406,46.95600128173828,45.61399841308594,46.2859992980957,46.2859992980957,39975000
2019-10-07,45.959999084472656,47.71200180053711,45.709999084472656,47.54399871826172,47.54399871826172,40321000
2019-10-08,47.17399978637695,48.78799819946289,46.900001525878906,48.0099983215332,48.0099983215332,43391000
2019-10-09,48.263999938964844,49.459999084472656,48.130001068115234,48.90599822998047,48.90599822998047,34472000
2019-10-10,49.055999755859375,49.85599899291992,48.316001892089844,48.948001861572266,48.948001861572266,31416500
2019-10-11,49.43000030517578,50.215999603271484,49.36199951171875,49.577999114990234,49.577999114990234,42377000
2019-10-14,49.58000183105469,51.709999084472656,49.42599868774414,51.391998291015625,51.391998291015625,51025000
2019-10-15,51.540000915527344,52.0,50.82400131225586,51.577999114990234,51.577999114990234,32164000
2019-10-16,51.47800064086914,52.41999816894531,51.38399887084961,51.95000076293945,51.95000076293945,33420500
2019-10-17,52.5,52.95600128173828,52.034000396728516,52.39400100708008,52.39400100708008,23846500
2019-10-18,52.13999938964844,52.560001373291016,51.02000045776367,51.38999938964844,51.38999938964844,28749000
2019-10-21,51.66600036621094,51.900001525878906,50.0359992980957,50.70000076293945,50.70000076293945,25101500
2019-10-22,50.86399841308594,51.66600036621094,50.16999816894531,51.11600112915039,51.11600112915039,23004000
2019-10-23,50.900001525878906,51.22800064086914,50.27000045776367,50.93600082397461,50.93600082397461,26305500
2019-10-24,59.67399978637695,60.986000061035156,57.84000015258789,59.93600082397461,59.93600082397461,148604500
2019-10-25,59.54399871826172,66.0,59.22200012207031,65.6259994506836,65.6259994506836,150030500
2019-10-28,65.50800323486328,68.16799926757812,64.5199966430664,65.54199981689453,65.54199981689453,94351500
2019-10-29,63.99800109863281,64.86000061035156,62.95000076293945,63.24399948120117,63.24399948120117,63421500
2019-10-30,62.599998474121094,63.757999420166016,61.99399948120117,63.00199890136719,63.00199890136719,48209000
2019-10-31,62.619998931884766,63.79999923706055,62.599998474121094,62.98400115966797,62.98400115966797,25335000
2019-11-01,63.263999938964844,63.29600143432617,61.959999084472656,62.6619987487793,62.6619987487793,31919500
2019-11-04,62.959999084472656,64.38800048828125,61.85200119018555,63.49399948120117,63.49399948120117,43935000
2019-11-05,63.92399978637695,64.7020034790039,63.2239990234375,63.444000244140625,63.444000244140625,34717000
2019-11-06,63.599998474121094,65.34400177001953,62.900001525878906,65.31600189208984,65.31600189208984,39704500
2019-11-07,65.8280029296875,68.30000305175781,65.60399627685547,67.10800170898438,67.10800170898438,72336500
2019-11-08,66.9000015258789,67.49199676513672,66.5,67.4280014038086,67.4280014038086,30346000
2019-11-11,68.79000091552734,69.83799743652344,68.4000015258789,69.01799774169922,69.01799774169922,49933500
2019-11-12,69.37999725341797,70.0739974975586,68.80799865722656,69.98600006103516,69.98600006103516,36797000
2019-11-13,71.0,71.26599884033203,69.03600311279297,69.22200012207031,69.22200012207031,42100500
2019-11-14,69.22200012207031,70.76799774169922,68.58200073242188,69.87000274658203,69.87000274658203,32324500
2019-11-15,70.12799835205078,70.55999755859375,69.6719970703125,70.43399810791016,70.43399810791016,24045000
2019-11-18,70.58399963378906,70.62999725341797,69.22000122070312,69.99800109863281,69.99800109863281,22002000
2019-11-19,70.3499984741211,71.99800109863281,69.55999755859375,71.90399932861328,71.90399932861328,38624000
2019-11-20,72.0,72.23999786376953,69.91400146484375,70.44400024414062,70.44400024414062,33625500
2019-11-21,70.9020004272461,72.16799926757812,70.80000305175781,70.96600341796875,70.96600341796875,30550000
2019-11-22,68.03199768066406,68.19999694824219,66.0,66.60800170898438,66.60800170898438,84353000
2019-11-25,68.86399841308594,68.91400146484375,66.89199829101562,67.26799774169922,67.26799774169922,61697500
2019-11-26,67.05400085449219,67.0999984741211,65.41999816894531,65.78399658203125,65.78399658203125,39737000
2019-11-27,66.2239990234375,66.78600311279297,65.71399688720703,66.25800323486328,66.25800323486328,27778000
2019-11-29,66.22200012207031,66.25199890136719,65.5,65.98799896240234,65.98799896240234,12328000
2019-12-02,65.87999725341797,67.2760009765625,65.73799896240234,66.9739990234375,66.9739990234375,30372500
2019-12-03,66.52400207519531,67.58200073242188,66.43800354003906,67.23999786376953,67.23999786376953,32868500
2019-12-04,67.55000305175781,67.5719985961914,66.56999969482422,66.60600280761719,66.60600280761719,27665000
2019-12-05,66.56600189208984,66.88400268554688,65.44999694824219,66.0739974975586,66.0739974975586,18623000
2019-12-06,67.0,67.77200317382812,66.9540023803711,67.1780014038086,67.1780014038086,38062000
2019-12-09,67.31800079345703,68.88999938964844,67.01599884033203,67.90599822998047,67.90599822998047,45115500
2019-12-10,67.99199676513672,70.14600372314453,67.86199951171875,69.76799774169922,69.76799774169922,44141500
2019-12-11,70.3759994506836,71.43800354003906,70.21800231933594,70.54000091552734,70.54000091552734,34489000
2019-12-12,70.98400115966797,72.5479965209961,70.64600372314453,71.93599700927734,71.93599700927734,38819500
2019-12-13,72.20999908447266,73.04199981689453,70.9280014038086,71.6780014038086,71.6780014038086,32854500
2019-12-16,72.51000213623047,76.72200012207031,72.5,76.30000305175781,76.30000305175781,90871000
2019-12-17,75.7979965209961,77.0999984741211,75.18000030517578,75.7979965209961,75.7979965209961,42484000
2019-12-18,76.1259994506836,79.04399871826172,76.11599731445312,78.62999725341797,78.62999725341797,70605000
2019-12-19,79.46399688720703,81.37000274658203,79.30000305175781,80.80799865722656,80.80799865722656,90535500
2019-12-20,82.05799865722656,82.5999984741211,80.03800201416016,81.11799621582031,81.11799621582031,73763500
2019-12-23,82.35600280761719,84.4020004272461,82.0,83.84400177001953,83.84400177001953,66598000
2019-12-24,83.6719970703125,85.09400177001953,82.53800201416016,85.05000305175781,85.05000305175781,40273500
2019-12-26,85.58200073242188,86.69599914550781,85.2699966430664,86.18800354003906,86.18800354003906,53169500
2019-12-27,87.0,87.06199645996094,85.22200012207031,86.07599639892578,86.07599639892578,49728500
2019-12-30,85.75800323486328,85.80000305175781,81.85199737548828,82.94000244140625,82.94000244140625,62932000

9
main.py

@ -0,0 +1,9 @@
import pandas as pd
import yfinance as yf
from yahoofinancials import YahooFinancials
df = yf.download('SPY', start='1960-01-1', end='2021-4-1', progress=False)
print(df.head())
df.to_csv("./spy_data")

10
plot.py

@ -0,0 +1,10 @@
import pandas as pd
import yfinance as yf
from yahoofinancials import YahooFinancials
ticker = yf.Ticker('TSLA')
tsla_df = ticker.history(period="max")
tsla_df['Close'].plot(title="TSLA's stock price")

7095
spy_data

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save