end = datetime.datetime(2016, 10, 23)
df = web.DataReader('BAC', 'yahoo', start, end)
df['100MA'] = pd.rolling_mean(df['Adj Close'], 100, min_periods=1)
df['STD'] = pd.rolling_std(df['Close'], 25, min_periods=1)
print(df.tail())
f, axarr = plt.subplots(2, 1)
df[['Adj Close', '100MA']].plot(ax=axarr[0])
df['STD'].plot(ax=axarr[1])
plt.show()
Два подзаговора в Python (matplotlib)