A comprehensive AI-powered financial analysis platform that provides professional-grade stock market insights, predictions, and educational content for investors, traders, and learners.
- Features
- Demo
- Installation
- Usage
- Technical Architecture
- AI Models
- Supported Markets
- Screenshots
- API Documentation
- Contributing
- License
- Support
- Disclaimer
- Global company search across multiple exchanges
- Intelligent symbol recognition and matching
- Support for US, Indian, UK, Canadian, and Australian markets
- Auto-detection of exchange suffixes
- 50+ Technical Indicators: RSI, MACD, Bollinger Bands, Stochastic, Williams %R, ATR, CCI, MFI
- Interactive Charts: Candlestick charts with multiple timeframes
- Support & Resistance: Dynamic level calculation and visualization
- Fibonacci Retracement: Automatic level plotting
- Volume Analysis: Volume-based indicators and patterns
- Multiple ML Models: Random Forest, Gradient Boosting, SVR, LSTM Neural Networks
- Ensemble Predictions: Combined model forecasts for higher accuracy
- Next-Day Price Forecasting: Real-time prediction with confidence intervals
- GPU Acceleration: CUDA support for faster model training
- Multi-Factor Analysis: Combines multiple indicators for signal generation
- Signal Strength: Strong Buy/Buy/Hold/Sell/Strong Sell recommendations
- Signal Reasoning: Detailed explanations for each recommendation
- Historical Signal Performance: Track signal accuracy over time
- Volatility Metrics: Standard deviation, historical volatility
- Risk-Adjusted Returns: Sharpe ratio, Sortino ratio, Calmar ratio
- Value at Risk (VaR): 95% and 99% confidence intervals
- Maximum Drawdown: Worst-case scenario analysis
- Beta Calculation: Market correlation analysis
- Valuation Ratios: P/E, P/B, PEG, Price/Sales, EV/EBITDA
- Financial Health: ROE, ROA, Debt/Equity, Current Ratio, Quick Ratio
- Company Information: Detailed business profiles and financial data
- Market Classification: Market cap categorization and analysis
- Built-in Help System: Comprehensive explanations for all features
- Investment Learning Center: Educational content for beginners
- Interactive Tutorials: Step-by-step guidance
- Best Practices: Risk management and investment strategies
- CSV Downloads: Historical data and technical indicators
- Custom Reports: Formatted analysis reports
- API Integration: Easy data access for further analysis
Live demo available at: [Your Demo URL]
- Python 3.8 or higher
- 4GB+ RAM (8GB+ recommended for LSTM training)
- GPU (optional, for faster model training)
- Clone the repository
git clone https://github.com/anil002/share-market-analysis-dashboard.git
cd share-market-analysis-dashboard- Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Run the application
streamlit run app1.py- Open in browser
http://localhost:8501
# Build the image
docker build -t stock-dashboard .
# Run the container
docker run -p 8501:8501 stock-dashboardstreamlit>=1.28.0
yfinance>=0.2.0
pandas>=1.5.0
numpy>=1.24.0
matplotlib>=3.6.0
seaborn>=0.12.0
scikit-learn>=1.3.0
torch>=2.1.0
plotly>=5.15.0
ta>=0.10.0
scipy>=1.10.0
requests>=2.31.0
psutil>=5.9.0# For GPU acceleration
torch[cuda]>=2.1.0
# For enhanced visualizations
kaleido>=0.2.1-
Search for a stock
- Enter company name (e.g., "Apple", "Microsoft")
- Or use stock symbol (e.g., "AAPL", "MSFT")
- For Indian stocks: "RELIANCE.NS", "TCS.BO"
-
Configure analysis
- Select time period (1mo to 5y)
- Choose analysis type (Complete/Technical/Fundamental)
- Enable advanced features (Fibonacci, S&R levels)
-
Review results
- Key metrics and current price
- AI predictions with confidence levels
- Technical analysis charts
- Trading signals and recommendations
from app1 import ComprehensiveShareMarketPredictor
predictor = ComprehensiveShareMarketPredictor()
data, symbol, error = predictor.fetch_realtime_data("AAPL", "1y")
df_indicators = predictor.train_advanced_models(data)
prediction = predictor.predict_with_ensemble(data)risk_metrics = predictor.advanced_risk_analysis(data)
print(f"Volatility: {risk_metrics['volatility']:.2%}")
print(f"Sharpe Ratio: {risk_metrics['sharpe_ratio']:.2f}")signals_df = predictor.calculate_comprehensive_signals(data)
latest_signal = signals_df.iloc[-1]
print(f"Signal: {latest_signal['Signal']}")โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Streamlit UI โ โ Data Pipeline โ โ ML Engine โ
โโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโค
โ โข Interactive โ โ โข Yahoo Finance โ โ โข Random Forest โ
โ Charts โ โโ โ API โ โโ โ โข Gradient Boostโ
โ โข Real-time โ โ โข Data Cleaning โ โ โข LSTM Networks โ
โ Updates โ โ โข Feature Eng. โ โ โข Ensemble โ
โ โข Export Tools โ โ โข Indicators โ โ โข GPU Support โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
- Data Ingestion: Yahoo Finance API โ Raw OHLCV data
- Feature Engineering: Technical indicators calculation
- Model Training: Multiple ML models with cross-validation
- Prediction: Ensemble methods for robust forecasting
- Visualization: Interactive Plotly charts and metrics
- Export: CSV downloads and formatted reports
- Purpose: Robust baseline predictions
- Features: 18 technical indicators
- Strengths: Handles non-linear relationships, feature importance
- Purpose: Sequential error correction
- Features: Advanced ensemble technique
- Strengths: High accuracy, overfitting resistance
- Purpose: Time series pattern recognition
- Architecture: 3-layer LSTM with dropout
- Strengths: Long-term dependency modeling
- Purpose: Non-linear pattern detection
- Kernel: RBF (Radial Basis Function)
- Strengths: High-dimensional data handling
- MSE (Mean Squared Error): Prediction accuracy
- MAE (Mean Absolute Error): Average prediction error
- Rยฒ Score: Variance explanation percentage
- RMSE: Root mean squared error in price units
| Market | Exchange | Suffix | Examples |
|---|---|---|---|
| ๐บ๐ธ United States | NASDAQ/NYSE | None | AAPL, MSFT, GOOGL |
| ๐ฎ๐ณ India | NSE | .NS | RELIANCE.NS, TCS.NS |
| ๐ฎ๐ณ India | BSE | .BO | RELIANCE.BO, TCS.BO |
| ๐ฌ๐ง United Kingdom | LSE | .L | BP.L, VOD.L |
| ๐จ๐ฆ Canada | TSX | .TO | SHOP.TO, RY.TO |
| ๐ฆ๐บ Australia | ASX | .AX | CBA.AX, BHP.AX |
Main class for stock analysis and prediction.
class ComprehensiveShareMarketPredictor:
def __init__(self):
"""Initialize the predictor with default settings."""
def fetch_realtime_data(self, symbol: str, period: str) -> Tuple[pd.DataFrame, str, str]:
"""Fetch real-time stock data."""
def train_advanced_models(self, data: pd.DataFrame) -> pd.DataFrame:
"""Train multiple ML models on stock data."""
def predict_with_ensemble(self, data: pd.DataFrame, models: List[str] = None) -> float:
"""Generate ensemble predictions."""
def advanced_risk_analysis(self, data: pd.DataFrame) -> Dict[str, float]:
"""Perform comprehensive risk analysis."""data, symbol, error = predictor.fetch_realtime_data("AAPL", "1y")df_indicators = predictor.calculate_advanced_technical_indicators(data)prediction = predictor.predict_with_ensemble(data, ['random_forest', 'gradient_boosting'])signals = predictor.calculate_comprehensive_signals(data)We welcome contributions! Please see our Contributing Guidelines.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make changes and add tests
- Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow PEP 8 guidelines
- Use type hints where possible
- Add docstrings for all functions
- Include unit tests for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ง Email: singhanil854@gmail.com
- ๐ป GitHub Issues: Create an Issue
- ๐ฑ Discussions: GitHub Discussions
Q: Is this suitable for beginners? A: Yes! The dashboard includes comprehensive educational content and help sections for learning investment concepts.
Q: Can I use this for live trading? A: This tool is for analysis and education only. Always consult financial advisors for investment decisions.
Q: Does it work with cryptocurrency? A: Currently focused on traditional stocks. Crypto support may be added in future versions.
Q: How accurate are the predictions? A: Model accuracy varies by market conditions. Always combine predictions with fundamental analysis.
Anil Kumar Singh
- ๐ง Email: singhanil854@gmail.com
- ๐ป GitHub: @anil002
- ๐ผ LinkedIn: Connect with me
IMPORTANT LEGAL NOTICE
This application is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or trading signals.
- Not Financial Advice: All analysis and predictions are for educational purposes
- Market Risks: Stock markets are inherently risky and unpredictable
- No Guarantees: Past performance does not guarantee future results
- Professional Consultation: Always consult qualified financial advisors
- Personal Responsibility: Users are responsible for their own investment decisions
- Data Accuracy: While we strive for accuracy, data may contain errors
- Third-party Data: We rely on external data sources beyond our control
The developers and contributors of this project shall not be liable for any financial losses, damages, or consequences arising from the use of this application.
Built with โค๏ธ for the investment community
โญ Star this repo โข ๐ Report Bug โข ๐ก Request Feature