Tag Archives: Data reader

Fix now for Yahoo Finance with Python Historical Datareader

Fix now for Yahoo Finance with Python Historical Datareader

Note future changes as well

Visit https://github.com/ranaroussi/fix-yahoo-finance

Note requirements but run in your in console:

pip3 install pandas –upgrade

pip3 install numpy –upgrade

pip3 install requests –upgrade

pip3 install multitasking –upgrade

pip3 install fix_yahoo_finance –upgrade –no-cache-dir

Run the supplied example which appears to work ok:

python3

Python 3.6.1 (default, Apr 4 2017, 09:40:21)

[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin

Type “help”, “copyright”, “credits” or “license” for more information.

>>> import fix_yahoo_finance as yf

/usr/local/lib/python3.6/site-packages/fix_yahoo_finance/__init__.py:43: DeprecationWarning:

Auto-overriding of pandas_datareader’s get_data_yahoo() is deprecated and will be removed in future versions.

Use pdr_override() to explicitly override it.

DeprecationWarning)

>>> data = yf.download(“SPY”, start=”2017-01-01″, end=”2017-04-30″)

[*********************100%***********************] 1 of 1 downloaded>>>

>>> data

Open High Low Close Adj Close \

Date

2017-01-03 225.039993 225.830002 223.880005 225.240005 223.176010

2017-01-04 225.619995 226.750000 225.610001 226.580002 224.503738

2017-01-05 226.270004 226.580002 225.479996 226.399994 224.325378

2017-01-06 226.529999 227.750000 225.899994 227.210007 225.127960

2017-01-09 226.910004 227.070007 226.419998 226.460007 224.384842

2017-01-10 226.479996 227.449997 226.009995 226.460007 224.384842

2017-01-11 226.360001 227.100006 225.589996 227.100006 225.018967

2017-01-12 226.500000 226.750000 224.960007 226.529999 224.454193

2017-01-13 226.729996 227.399994 226.690002 227.050003 224.969421

2017-01-17 226.309998 226.779999 225.800003 226.250000 224.176743

2017-01-18 226.539993 226.800003 225.899994 226.750000 224.672165

2017-01-19 226.839996 227.000000 225.410004 225.910004 223.839874

2017-01-20 226.699997 227.309998 225.970001 226.740005 224.662262

2017-01-23 226.740005 226.809998 225.270004 226.149994 224.077667

2017-01-24 226.399994 228.080002 226.270004 227.600006 225.514389

2017-01-25 228.699997 229.570007 228.509995 229.570007 227.466339

2017-01-26 229.399994 229.710007 229.009995 229.330002 227.228531

2017-01-27 229.419998 229.589996 228.759995 228.970001 226.871826

2017-01-30 228.169998 228.199997 226.410004 227.550003 225.464844

2017-01-31 226.979996 227.600006 226.320007 227.529999 225.445023

2017-02-01 227.529999 228.589996 226.940002 227.619995 225.534195

2017-02-02 227.619995 228.100006 226.820007 227.770004 225.682831

2017-02-03 228.820007 229.550003 228.460007 229.339996 227.238434

2017-02-06 228.869995 229.330002 228.539993 228.929993 226.832184

2017-02-07 229.380005 229.660004 228.720001 228.940002 226.842117

2017-02-08 228.940002 229.389999 228.309998 229.240005 227.139359

2017-02-09 229.240005 230.949997 229.240005 230.600006 228.486893

2017-02-10 231.000000 231.770004 230.619995 231.509995 229.388550

2017-02-13 232.080002 233.070007 232.050003 232.770004 230.637009

2017-02-14 232.559998 233.710007 232.160004 233.699997 231.558472

… … … … … …

2017-03-17 237.750000 237.970001 237.029999 237.029999 235.879700

2017-03-20 237.029999 237.360001 236.320007 236.770004 235.620972

2017-03-21 237.470001 237.610001 233.580002 233.729996 232.595718

2017-03-22 233.770004 234.610001 233.050003 234.279999 233.143051

2017-03-23 234.279999 235.339996 233.600006 234.029999 232.894257

2017-03-24 234.380005 235.039993 232.960007 233.860001 232.725082

2017-03-27 231.929993 233.919998 231.610001 233.619995 232.486252

2017-03-28 233.270004 235.809998 233.139999 235.320007 234.178009

2017-03-29 234.990005 235.809998 234.729996 235.539993 234.396927

2017-03-30 235.470001 236.520004 235.270004 236.289993 235.143295

2017-03-31 235.899994 236.509995 235.679993 235.740005 234.595978

2017-04-03 235.800003 236.029999 233.910004 235.330002 234.187958

2017-04-04 235.000000 235.580002 234.559998 235.479996 234.337219

2017-04-05 236.259995 237.389999 234.539993 234.779999 233.640625

2017-04-06 234.940002 236.039993 234.429993 235.440002 234.297424

2017-04-07 235.149994 236.000000 234.639999 235.199997 234.058578

2017-04-10 235.360001 236.259995 234.729996 235.339996 234.197906

2017-04-11 234.899994 235.179993 233.339996 235.059998 233.919266

2017-04-12 234.740005 234.960007 233.770004 234.029999 232.894257

2017-04-13 233.639999 234.490005 232.509995 232.509995 231.381638

2017-04-17 233.110001 234.570007 232.880005 234.570007 233.431656

2017-04-18 233.720001 234.490005 233.080002 233.869995 232.735031

2017-04-19 234.520004 234.949997 233.179993 233.440002 232.307129

2017-04-20 234.149994 235.850006 233.779999 235.339996 234.197906

2017-04-21 235.250000 235.309998 234.130005 234.589996 233.451538

2017-04-24 237.179993 237.410004 234.559998 237.169998 236.019028

2017-04-25 237.910004 238.949997 237.809998 238.550003 237.392334

2017-04-26 238.509995 239.529999 238.350006 238.399994 237.243057

2017-04-27 238.770004 238.949997 237.979996 238.600006 237.442093

2017-04-28 238.899994 238.929993 237.929993 238.080002 236.924606

Volume

Date

2017-01-03 91366500

2017-01-04 78744400

2017-01-05 78379000

2017-01-06 71559900

2017-01-09 46939700

2017-01-10 63771900

2017-01-11 74650000

2017-01-12 72113200

2017-01-13 62717900

2017-01-17 61240800

2017-01-18 54793300

2017-01-19 66608800

2017-01-20 129168600

2017-01-23 75061600

2017-01-24 95555300

2017-01-25 84437700

2017-01-26 59970700

2017-01-27 59711100

2017-01-30 79737300

2017-01-31 75880800

2017-02-01 79117700

2017-02-02 69657600

2017-02-03 80563200

2017-02-06 57790100

2017-02-07 57931200

2017-02-08 51566200

2017-02-09 65955200

2017-02-10 66015900

2017-02-13 55182100

2017-02-14 71109000

… …

2017-03-17 89002100

2017-03-20 52537000

2017-03-21 131809300

2017-03-22 97569200

2017-03-23 100410300

2017-03-24 112504900

2017-03-27 87454500

2017-03-28 93483900

2017-03-29 61950400

2017-03-30 56737900

2017-03-31 73733100

2017-04-03 85546500

2017-04-04 56466200

2017-04-05 108800600

2017-04-06 69135800

2017-04-07 74412300

2017-04-10 67615300

2017-04-11 88045300

2017-04-12 81864400

2017-04-13 92880400

2017-04-17 68405400

2017-04-18 83225800

2017-04-19 68699900

2017-04-20 92572200

2017-04-21 110389800

2017-04-24 119209900

2017-04-25 76698300

2017-04-26 84702500

2017-04-27 57410300

2017-04-28 63532800

[81 rows x 6 columns]

>>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!