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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 11 |
short_description: Financial Data Simulation and Prediction Dashboard
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Market Data Simulation and Prediction Dashboard π
|
| 15 |
+
|
| 16 |
+
A powerful, interactive financial analysis tool that enables real-time comparison of multiple asset classes with advanced technical indicators and predictive analytics.
|
| 17 |
+
|
| 18 |
+
## π Features
|
| 19 |
+
|
| 20 |
+
- **Multi-Asset Analysis**
|
| 21 |
+
- Stocks & ETFs
|
| 22 |
+
- Cryptocurrencies
|
| 23 |
+
- Commodities & Futures
|
| 24 |
+
- Global Market Indices
|
| 25 |
+
- Regional Market ETFs
|
| 26 |
+
|
| 27 |
+
- **Technical Indicators**
|
| 28 |
+
- Bollinger Bands
|
| 29 |
+
- Simple Moving Average (SMA)
|
| 30 |
+
- Exponential Moving Average (EMA)
|
| 31 |
+
- Moving Average Convergence Divergence (MACD)
|
| 32 |
+
- Relative Strength Index (RSI)
|
| 33 |
+
- Volume Weighted Average Price (VWAP)
|
| 34 |
+
|
| 35 |
+
- **Predictive Analytics**
|
| 36 |
+
- Random Forest Price Prediction
|
| 37 |
+
- Exponential Smoothing Forecasting
|
| 38 |
+
- Monte Carlo Simulation
|
| 39 |
+
- Pattern Detection
|
| 40 |
+
- Breakout Prediction
|
| 41 |
+
- Value at Risk (VaR) Analysis
|
| 42 |
+
|
| 43 |
+
- **Interactive Visualization**
|
| 44 |
+
- Real-time data updates
|
| 45 |
+
- Customizable time periods
|
| 46 |
+
- Cross-asset comparison
|
| 47 |
+
- Dynamic zooming and panning
|
| 48 |
+
- Hover tooltips with precise values
|
| 49 |
+
|
| 50 |
+
## π οΈ Tech Stack
|
| 51 |
+
|
| 52 |
+
- **Frontend**
|
| 53 |
+
- Streamlit: Interactive web interface
|
| 54 |
+
- Plotly: Advanced financial charts
|
| 55 |
+
- Custom CSS: Enhanced UI/UX
|
| 56 |
+
|
| 57 |
+
- **Backend**
|
| 58 |
+
- Python 3.13
|
| 59 |
+
- yfinance: Real-time market data
|
| 60 |
+
- pandas: Data manipulation
|
| 61 |
+
- scikit-learn: Machine learning models
|
| 62 |
+
- statsmodels: Time series analysis
|
| 63 |
+
- ta: Technical analysis calculations
|
| 64 |
+
|
| 65 |
+
- **Configuration**
|
| 66 |
+
- YAML: Flexible asset group configuration
|
| 67 |
+
- Environment variables: Secure settings management
|
| 68 |
+
|
| 69 |
+
## π Libraries & Dependencies
|
| 70 |
+
|
| 71 |
+
```
|
| 72 |
+
streamlit>=1.24.0
|
| 73 |
+
pandas>=2.0.0
|
| 74 |
+
yfinance>=0.2.0
|
| 75 |
+
plotly>=5.0.0
|
| 76 |
+
ta>=0.11.0
|
| 77 |
+
pyyaml>=6.0.0
|
| 78 |
+
scikit-learn>=1.6.1
|
| 79 |
+
statsmodels>=0.14.4
|
| 80 |
+
scipy>=1.11.0
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
## ποΈ Architecture
|
| 84 |
+
|
| 85 |
+
- **Modular Design**
|
| 86 |
+
- Separate configuration files for markets and project settings
|
| 87 |
+
- Dedicated prediction models module
|
| 88 |
+
- Extensible asset group system
|
| 89 |
+
- Component-based visualization
|
| 90 |
+
|
| 91 |
+
- **Data Flow**
|
| 92 |
+
1. User selects assets and indicators
|
| 93 |
+
2. Real-time data fetching from Yahoo Finance
|
| 94 |
+
3. Technical analysis calculations
|
| 95 |
+
4. Dynamic chart generation
|
| 96 |
+
5. Interactive user feedback
|
| 97 |
+
|
| 98 |
+
## π‘ Skills Demonstrated
|
| 99 |
+
|
| 100 |
+
- **Technical**
|
| 101 |
+
- Financial data processing
|
| 102 |
+
- Machine learning implementation
|
| 103 |
+
- Real-time data visualization
|
| 104 |
+
- Technical analysis implementation
|
| 105 |
+
- Web application development
|
| 106 |
+
- Configuration management
|
| 107 |
+
|
| 108 |
+
- **Financial**
|
| 109 |
+
- Multi-asset analysis
|
| 110 |
+
- Technical indicator implementation
|
| 111 |
+
- Predictive modeling
|
| 112 |
+
- Risk assessment
|
| 113 |
+
- Market data interpretation
|
| 114 |
+
- Cross-market correlation analysis
|
| 115 |
+
|
| 116 |
+
- **Design**
|
| 117 |
+
- User interface design
|
| 118 |
+
- Data visualization
|
| 119 |
+
- User experience optimization
|
| 120 |
+
- Interactive dashboard creation
|
| 121 |
+
|
| 122 |
+
## π¦ Getting Started
|
| 123 |
+
|
| 124 |
+
1. Clone the repository
|
| 125 |
+
2. Install dependencies:
|
| 126 |
+
```bash
|
| 127 |
+
pip install -r requirements.txt
|
| 128 |
+
```
|
| 129 |
+
3. Run the application:
|
| 130 |
+
```bash
|
| 131 |
+
streamlit run main.py
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
## π Usage
|
| 135 |
+
|
| 136 |
+
1. Select asset groups from the sidebar
|
| 137 |
+
2. Choose specific tickers from each group
|
| 138 |
+
3. Add technical indicators as needed
|
| 139 |
+
4. Switch to Predictions & Risk tab for forecasting
|
| 140 |
+
5. Adjust prediction parameters and models
|
| 141 |
+
6. View raw data in the expandable section
|
| 142 |
+
|
| 143 |
+
## π Prediction Models
|
| 144 |
+
|
| 145 |
+
- **Random Forest**
|
| 146 |
+
- Machine learning model for price prediction
|
| 147 |
+
- Captures non-linear market patterns
|
| 148 |
+
- Provides feature importance analysis
|
| 149 |
+
|
| 150 |
+
- **Exponential Smoothing**
|
| 151 |
+
- Time series forecasting
|
| 152 |
+
- Handles trends and seasonality
|
| 153 |
+
- Adaptive to market changes
|
| 154 |
+
|
| 155 |
+
- **Monte Carlo Simulation**
|
| 156 |
+
- Simulates multiple price paths
|
| 157 |
+
- Calculates confidence intervals
|
| 158 |
+
- Helps assess potential outcomes
|
| 159 |
+
|
| 160 |
+
- **Pattern Detection**
|
| 161 |
+
- Identifies trend changes
|
| 162 |
+
- Spots support/resistance levels
|
| 163 |
+
- Predicts potential breakouts
|
| 164 |
+
|
| 165 |
+
- **Risk Metrics**
|
| 166 |
+
- Value at Risk (VaR) calculation
|
| 167 |
+
- Volatility analysis
|
| 168 |
+
- Trend strength indicators
|
| 169 |
+
|
| 170 |
+
## π― Future Enhancements
|
| 171 |
+
|
| 172 |
+
- Additional technical indicators
|
| 173 |
+
- Custom indicator parameters
|
| 174 |
+
- Data export functionality
|
| 175 |
+
- Automated analysis reports
|
| 176 |
+
- Portfolio tracking
|
| 177 |
+
- Alert system for price movements
|
| 178 |
+
|
| 179 |
+
## π License
|
| 180 |
+
|
| 181 |
+
MIT License - feel free to use and modify as needed.
|
| 182 |
+
|
| 183 |
+
## π₯ Contributing
|
| 184 |
+
|
| 185 |
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
| 186 |
+
|
| 187 |
+
|
| 188 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|