In [29]:
import pandas as pd
from datetime import datetime
from pandas.io.data import DataReader
import matplotlib.pyplot as plt
In [35]:
spx = DataReader("^GSPC", "yahoo", datetime(2000,1,1))
sso = DataReader("SSO", "yahoo", datetime(2000,1,1))
znga = DataReader("ZNGA", "yahoo", datetime(2013,1,1))
gluu = DataReader("GLUU", "yahoo", datetime(2013,1,1))
znga.head()
Out[35]:
In [31]:
spx = spx.reindex(sso.index)
both = pd.DataFrame(data = {'spx': spx['Adj Close'], 'sso': sso['Adj Close']})
both.head()
Out[31]:
In [32]:
both.plot()
Out[32]:
In [33]:
plt.show()
In [28]:
In [28]:
In [ ]: