Skip to content

Instantly share code, notes, and snippets.

@therealnaveenkamal
Last active April 28, 2021 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save therealnaveenkamal/4e6f5817a4731abedb1a5529d2645cfb to your computer and use it in GitHub Desktop.
Save therealnaveenkamal/4e6f5817a4731abedb1a5529d2645cfb to your computer and use it in GitHub Desktop.
This Code Snippet helps us to visualize the stock price over the given time period
import matplotlib.pyplot as plt
from pandas_datareader import data
df = data.DataReader("RELIANCE.NS",
data_source = "yahoo",
start = "2016-04-28",
end = "2021-03-28")
plt.style.use("fivethirtyeight")
plt.figure(figsize=(15,10))
plt.xlabel("Year")
plt.ylabel("Price in INR")
plt.title("Closing Price Plot")
plt.plot(df['Close'])
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment