<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Access historical data
Step1:  Including moving averages
Moving averages are calculated using pandas rolling.mean() and adds a column for each window size given in the list where each columns is prefixed 'ma' followed by window size.
Step2:  Busy chart, let's instead slice the pandas with the [from
<ASSISTANT_TASK:>
Python Code:
%matplotlib inline
%pylab inline --no-import-all
pylab.rcParams['figure.figsize'] = (18, 10)
from ntfdl import Dl
stl = Dl('STL', exchange='OSE', download=False)
history = stl.get_history()
history.tail()
fig, ax = plt.subplots()
ax.tick_params(labeltop=False, labelright=True)
history.close.plot()
plt.grid()
# Annotate last quote
xmin, xmax = ax.get_xlim()
plt.annotate(history.iloc[-1].close, xy=(1.005, history.iloc[-1].close), xytext=(0, 0), \
                 xycoords=('axes fraction', 'data'), textcoords='offset points', backgroundcolor='k', color='w')
Explanation: Access historical data
End of explanation
history_ma = stl.get_history(mas=[10,20,50,100,200])
history_ma.tail(5)
fig, ax = plt.subplots()
ax.tick_params(labeltop=False, labelright=True)
history_ma[['close','ma10','ma20','ma50','ma100','ma200']].plot(ax=ax)
plt.grid()
Explanation: Including moving averages
Moving averages are calculated using pandas rolling.mean() and adds a column for each window size given in the list where each columns is prefixed 'ma' followed by window size.
End of explanation
fig, ax = plt.subplots()
ax.tick_params(labeltop=False, labelright=True)
history_ma['2008-01-01':'2010-01-01'][['close','ma10','ma20','ma50','ma100','ma200']].plot(ax=ax)
plt.grid()
history.turnover.plot()
Explanation: Busy chart, let's instead slice the pandas with the [from:to] syntax looking at some days of horror between 2008 and 2009.
End of explanation
<END_TASK>