Last active
April 28, 2021 15:44
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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