Spaces:
Sleeping
Sleeping
File size: 585 Bytes
d09cb6c 47d147b d09cb6c 47d147b e7ce3ee |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import streamlit as st
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#!pip install yfinance
import yfinance as yf
yf.pdr_override()
from pandas_datareader import data as pdr
start = '2005-01-01'
end = '2022-12-31'
st.title("Stock Market Trend Predictor")
user_input = st.text_input("Enter the stock ticker", "TATAPOWER.NS")
df = pdr.get_data_yahoo(user_input, start, end)
st.subheader("Data from year 2005 to 2022:")
st.write(df.describe())
st.subheader("Closing Price VS Time Chart:")
fig = plt.figure(figsize=(12,6))
plt.plot(df.Close)
st.pyplot(fig) |