Skip to content

buddhhu/streamlit-gold-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪙 Gold Price Analysis & Prediction

Gold Bars

📊 Overview

Gold Price Analysis & Prediction is a data-driven web application built with Streamlit that helps traders, investors, and data enthusiasts gain insights into historical gold price trends and forecast future prices. The app uses ARIMA (AutoRegressive Integrated Moving Average) time series modeling for predictions based on historical data.

✨ Features

  • 🔄 Live Data Scraping: Fetch the latest gold price data from Groww.in
  • 📉 Historical Trend Analysis: Visualize gold price trends over decades
  • 🔮 ARIMA-based Predictions: Forecast future gold prices with customizable parameters
  • 📈 Interactive Visualizations: Explore data through multiple interactive charts
  • 💰 Investment Calculator: Calculate potential ROI for gold investments
  • Flexible Time Windows: Analyze recent trends or full historical datasets

🚀 Getting Started

⚙️ Prerequisites

  • 🐍 Python 3.7+
  • 📦 pip

📥 Installation

  1. Clone this repository:

    git clone https://github.com/buddhhu/streamlit-gold-analyzer.git
    cd streamlit-gold-analyzer
  2. Install required packages:

    pip install -r requirements.txt

📚 Dependencies

This app requires the following Python packages:

  • streamlit
  • pandas
  • numpy
  • plotly
  • requests
  • beautifulsoup4
  • statsmodels

Use the requirements.txt for quick installation.

🖥️ Usage

  1. Run the Streamlit app:

    streamlit run app.py
  2. Open your browser and go to http://localhost:8501

  3. Use the sidebar to:

    • ⚡ Fetch latest gold price or load sample data
    • 🛠️ Configure ARIMA parameters
    • ⏳ Set prediction timeframe
    • 🔍 View and explore raw data
  4. Explore visualizations via tabs:

    • 📜 Full History & Predictions
    • 📊 Recent Trends
    • 📈 Statistics
  5. Use the 💸 ROI calculator to estimate returns on gold investments

📊 Data Sources

Data is scraped from:

Or, use built-in sample data for demo purposes.

🧮 Technical Details

⚙️ ARIMA Model

The app uses ARIMA for time series forecasting:

  • p: AR (AutoRegressive) — influence of past values
  • d: Differencing — ensures stationarity
  • q: MA (Moving Average) — influence of past errors

These can be tweaked via sidebar sliders.

📈 Visualizations

The app provides:

  • 📉 Historical prices + future predictions
  • 📊 Recent trends with forecast
  • 📆 Yearly % change
  • 💸 ROI estimation charts

🛠️ Customization

Easily modify the app by:

  • Changing ARIMA parameters
  • Updating prediction duration
  • Adjusting historical time window
  • Setting custom investment values

📄 License

Licensed under the MIT License — see the LICENSE for details.

👨‍💻 Author

Made with ❤️ by Amit Sharma

🙏 Acknowledgements

About

Streamlit app for visualizing and forecasting gold prices using ARIMA time series modeling.

Topics

Resources

License

Stars

Watchers

Forks

Languages