๐ŸŽ™ Free live masterclass ยท Sun, 29 Nov, 7:00 pm IST ยท Java Full Stack roadmap Register free โ†’
Skills101

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. 1

    Install

    pip install streamlit yfinance plotly; run with streamlit run app.py.

  2. 2

    Inputs

    st.sidebar.multiselect for tickers and st.date_input for the range.

  3. 3

    Fetch and cache

    yf.download(tickers, start, end) inside a function decorated with @st.cache_data(ttl=3600).

  4. 4

    Candlestick

    plotly.graph_objects.Candlestick plus lines for rolling(20).mean() and rolling(50).mean().

  5. 5

    Returns

    pct_change(); annualised volatility = std ร— โˆš252; show with st.metric.

  6. 6

    Compare

    Normalise prices to 100 at the start date and plot all tickers together.

  7. 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