Python Can';我无法从引用、历史、雅虎和ochl获取数据

Python Can';我无法从引用、历史、雅虎和ochl获取数据,python,matplotlib,finance,Python,Matplotlib,Finance,我想画一条股票的k线 import matplotlib.finance as mpf import matplotlib.pyplot as plt start_date = (2006, 10, 1) end_date = (2017, 10, 1) quotes = mpf.quotes_historical_yahoo_ochl('AAPL',start_date, end_date) fig, ax=plt.subplots(figsize=(8,5)) fig.subplots_

我想画一条股票的k线

import matplotlib.finance as mpf
import matplotlib.pyplot as plt

start_date = (2006, 10, 1)
end_date = (2017, 10, 1)

quotes = mpf.quotes_historical_yahoo_ochl('AAPL',start_date, end_date)
fig, ax=plt.subplots(figsize=(8,5))
fig.subplots_adjust(bottom=0.2)
mpf.candlestick_ochl(ax,quotes,width=0.6,colorup='r',colordown='g')
plt.grid(True)
ax.xaxis_date()
ax.autoscale_view()
plt.setp(plt.gca().get_xticklabels(),rotation=30)
plt.show()
它总是返回错误,如

TypeError: 'NoneType' object is not iterable
我试过打印报价。它将不返回任何值。

。您将无法再从中获取数据。因此,
quotes\u historical\u yahoo\u..
函数已经过时。您将无法再从中获取数据。因此,
quotes\u historical\u yahoo\u..
函数已经过时。