MarketWatch is a real-time financial analysis dashboard built with Python. It empowers users to track stock market trends, cryptocurrency performance, and historical data through an interactive and responsive user interface.
- Real-Time Data Engine: Fetches live market data (Stocks, Crypto, Indices) using the
yfinanceAPI. - Interactive Charts:
- Line Charts: Visualize closing price trends over custom timeframes.
- Bar Charts: Analyze trading volume volatility.
- Smart Metrics: Instant dashboard summary showing Current Price, Daily Delta (Change), Volume, and 52-Week Highs.
- Data Integrity: Auto-handling of Multi-Index data frames to ensure stability.
- Raw Data Explorer: Expandable tabular view for deep-dive analysis of daily records.
| Component | Technology | Description |
|---|---|---|
| Core Logic | Python | The backbone of the application. |
| UI Framework | Streamlit | Rapid frontend development for data apps. |
| Data Source | yfinance | Yahoo Finance API wrapper for market data. |
| Data Processing | Pandas | Data manipulation and time-series analysis. |
MarketWatch/
│
├── app.py # The main entry point of the application
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .gitignore # Files to exclude from Git (e.g., venv/)
Follow these instructions to set up the project locally.
- Python 3.8 or higher installed.
- Git installed.
- Clone the Repository
git clone (https://github.com/Dharm3112/MarketWatch.git)
cd MarketWatch
- Create a Virtual Environment (Recommended)
-
Windows:
python -m venv venv venv\Scripts\activate
-
macOS/Linux:
python3 -m venv venv source venv/bin/activate
- Install Dependencies
pip install -r requirements.txt
streamlit run app.py
The application will launch automatically in your default web browser at http://localhost:8501.
Issue: ModuleNotFoundError**
- Fix: Ensure your virtual environment is activated and you ran
pip install -r requirements.txt.
Issue: KeyError: 'Close' or Empty Charts
- Fix: This often happens if the
yfinancelibrary is outdated. Run:
pip install --upgrade yfinance
Issue: Network Errors
- Fix: Some corporate or school networks block Yahoo Finance. Try switching to a different network or mobile hotspot.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open-source and available under the MIT License.
MarketWatch • Created by Dharm Patel