Stock market dashboard (Streamlit)
Pick NSE stocks and dates to see price charts, moving averages, returns and a comparison table.
Beginnerโฑ 5โ8 hours๐ช 7 stepsPythonStreamlityfinancePlotly
What you'll learn
- โBuilding web apps with Streamlit
- โFinancial time series basics
- โCaching data
What you'll build
- โSelect tickers like RELIANCE.NS, TCS.NS
- โCandlestick chart with 20/50-day averages
- โDaily returns and volatility
- โCompare several stocks
Step-by-step guide
- 1
Install
pip install streamlit yfinance plotly; run with streamlit run app.py.
- 2
Inputs
st.sidebar.multiselect for tickers and st.date_input for the range.
- 3
Fetch and cache
yf.download(tickers, start, end) inside a function decorated with @st.cache_data(ttl=3600).
- 4
Candlestick
plotly.graph_objects.Candlestick plus lines for rolling(20).mean() and rolling(50).mean().
- 5
Returns
pct_change(); annualised volatility = std ร โ252; show with st.metric.
- 6
Compare
Normalise prices to 100 at the start date and plot all tickers together.
- 7
Deploy
Push to GitHub and deploy on Streamlit Community Cloud. Add a note that this is for learning, not investment advice.
๐ Make it stand out
- +Download data as CSV
- +Simple backtest of a moving-average strategy
- +News headlines per stock