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.
- 🔄 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
- 🐍 Python 3.7+
- 📦 pip
-
Clone this repository:
git clone https://github.com/buddhhu/streamlit-gold-analyzer.git cd streamlit-gold-analyzer
-
Install required packages:
pip install -r requirements.txt
This app requires the following Python packages:
streamlit
pandas
numpy
plotly
requests
beautifulsoup4
statsmodels
Use the requirements.txt
for quick installation.
-
Run the Streamlit app:
streamlit run app.py
-
Open your browser and go to
http://localhost:8501
-
Use the sidebar to:
- ⚡ Fetch latest gold price or load sample data
- 🛠️ Configure ARIMA parameters
- ⏳ Set prediction timeframe
- 🔍 View and explore raw data
-
Explore visualizations via tabs:
- 📜 Full History & Predictions
- 📊 Recent Trends
- 📈 Statistics
-
Use the 💸 ROI calculator to estimate returns on gold investments
Data is scraped from:
Or, use built-in sample data for demo purposes.
The app uses ARIMA for time series forecasting:
p
: AR (AutoRegressive) — influence of past valuesd
: Differencing — ensures stationarityq
: MA (Moving Average) — influence of past errors
These can be tweaked via sidebar sliders.
The app provides:
- 📉 Historical prices + future predictions
- 📊 Recent trends with forecast
- 📆 Yearly % change
- 💸 ROI estimation charts
Easily modify the app by:
- Changing ARIMA parameters
- Updating prediction duration
- Adjusting historical time window
- Setting custom investment values
Licensed under the MIT License — see the LICENSE for details.
Made with ❤️ by Amit Sharma
- 📊 Data Source: Groww.in
- 🧰 Built using: Streamlit
- 📈 Forecasting: statsmodels
- 🎨 Visuals: Plotly