18
18
from pandas_datareader .oecd import OECDReader
19
19
from pandas_datareader .quandl import QuandlReader
20
20
from pandas_datareader .yahoo .actions import (YahooActionReader , YahooDivReader )
21
+ from pandas_datareader .yahoo .components import _get_data as \
22
+ get_components_yahoo
21
23
from pandas_datareader .yahoo .daily import YahooDailyReader
22
24
from pandas_datareader .yahoo .options import Options as YahooOptions
23
25
from pandas_datareader .yahoo .quotes import YahooQuotesReader
24
26
27
+ __all__ = ['get_components_yahoo' , 'get_data_enigma' , 'get_data_famafrench' ,
28
+ 'get_data_fred' , 'get_data_google' , 'get_data_moex' ,
29
+ 'get_data_quandl' , 'get_data_yahoo' , 'get_data_yahoo_actions' ,
30
+ 'get_nasdaq_symbols' , 'get_quote_google' , 'get_quote_yahoo' ]
31
+
25
32
26
33
def get_data_fred (* args , ** kwargs ):
27
34
return FredReader (* args , ** kwargs ).read ()
@@ -67,8 +74,10 @@ def DataReader(name, data_source=None, start=None, end=None,
67
74
retry_count = 3 , pause = 0.001 , session = None , access_key = None ):
68
75
"""
69
76
Imports data from a number of online sources.
77
+
70
78
Currently supports Yahoo! Finance, Google Finance, St. Louis FED (FRED),
71
79
Kenneth French's data library, and the SEC's EDGAR Index.
80
+
72
81
Parameters
73
82
----------
74
83
name : str or list of strs
@@ -88,22 +97,29 @@ def DataReader(name, data_source=None, start=None, end=None,
88
97
single value given for symbol, represents the pause between retries.
89
98
session : Session, default None
90
99
requests.sessions.Session instance to be used
100
+
91
101
Examples
92
102
----------
103
+
93
104
# Data from Yahoo! Finance
94
105
gs = DataReader("GS", "yahoo")
106
+
95
107
# Corporate Actions (Dividend and Split Data)
96
108
# with ex-dates from Yahoo! Finance
97
109
gs = DataReader("GS", "yahoo-actions")
110
+
98
111
# Data from Google Finance
99
112
aapl = DataReader("AAPL", "google")
113
+
100
114
# Data from FRED
101
115
vix = DataReader("VIXCLS", "fred")
116
+
102
117
# Data from Fama/French
103
118
ff = DataReader("F-F_Research_Data_Factors", "famafrench")
104
119
ff = DataReader("F-F_Research_Data_Factors_weekly", "famafrench")
105
120
ff = DataReader("6_Portfolios_2x3", "famafrench")
106
121
ff = DataReader("F-F_ST_Reversal_Factor", "famafrench")
122
+
107
123
# Data from EDGAR index
108
124
ed = DataReader("full", "edgar-index")
109
125
ed2 = DataReader("daily", "edgar-index")
0 commit comments