Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
etotientz authored Jun 20, 2016
1 parent d62823e commit b544e02
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions stock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pandas as pd
'''import quandl
a=quandl.get("NSE/RELIANCE", start_date="2016-06-12")
print a.head()
a['%_CHANGE']=(a['Close']-a['Open']) % a['Open']
#a=a[['%_CHANGE']]
print a '''
import datetime
import pandas.io.data as web
import matplotlib.pyplot as plt
from matplotlib import style
style.use('fivethirtyeight')

start=datetime.datetime(2012,1,1)
end=datetime.datetime(2015,1,1)
df =web.DataReader("XOM","yahoo",start,end)
print df.head()
df['Low'].plot()
plt.legend()
plt.show()

0 comments on commit b544e02

Please sign in to comment.