| --- |
| title: UnifiedFinancialPlatform |
| emoji: π |
| colorFrom: blue |
| colorTo: green |
| sdk: docker |
| app_port: 7860 |
| pinned: false |
| license: apache-2.0 |
| short_description: Multi-asset analysis with OpenBB and AI insights |
| --- |
| |
| # Financial Analysis Platform |
|
|
| A comprehensive multi-asset financial analysis platform built with Streamlit, providing real-time data, technical indicators, and AI-powered insights. |
|
|
| ## Features |
|
|
| ### π Stock Analysis |
| - Real-time stock price data from OpenBB |
| - Technical indicators (SMA, EMA, RSI) |
| - Company profile and financial statements |
| - Revenue and net income trends |
| - TradingView chart integration |
| - Profitability metrics analysis |
|
|
| ### βΏ Cryptocurrency (Coming Soon) |
| - Real-time cryptocurrency prices |
| - Market cap and 24h volume |
| - Technical indicators for crypto assets |
| - TradingView crypto charts |
|
|
| ### π± Forex Trading (Coming Soon) |
| - Foreign exchange rate analysis |
| - Major, minor, and exotic pairs |
| - Pip calculator |
| - Economic calendar integration |
|
|
| ### π Market Screener (Coming Soon) |
| - Multi-criteria filtering |
| - Technical pattern recognition |
| - Sort by volume, price change, RSI |
| - Export results to CSV |
|
|
| ### π° News & AI Dashboard β
LIVE |
| - **23 Premium Sources** across 4 tiers for comprehensive coverage |
| - **Tier 1**: Bloomberg (Γ2), Reuters, FT, WSJ, The Economist, CNBC, MarketWatch (8 sources) |
| - **Tier 2**: BBC World, AFP, Al Jazeera, Politico, DW News (5 sources) |
| - **Tier 3**: Federal Reserve (2.0x), ECB (2.0x), Lagarde, BoE, IMF, World Bank, US Treasury (7 sources) |
| - **Tier 4**: Zero Hedge, First Squawk, Live Squawk (3 sources) |
| - **Low-latency monitoring** with 3-minute cache for trading decisions |
| - **Intelligent categorization**: Macro, Markets, Geopolitical |
| - **Professional sentiment analysis** (Positive/Negative/Neutral) |
| - **Weighted impact scoring**: Source credibility Γ engagement Γ recency |
| - **Breaking news detection** with instant alerts and priority display |
| - **Smart filtering** by category, sentiment, and impact level |
| - **Auto-refresh mode** for continuous monitoring during trading hours |
| - Powered by **Twikit** for real-time Twitter/X intelligence (free, no API costs) |
|
|
| ## Installation |
|
|
| 1. Clone the repository: |
| ```bash |
| git clone <repository-url> |
| cd FinancialPlatform |
| ``` |
|
|
| 2. Install dependencies: |
| ```bash |
| pip install -r requirements.txt |
| ``` |
|
|
| 3. Create a `.env` file based on `.env.example`: |
| ```bash |
| cp .env.example .env |
| ``` |
|
|
| 4. Configure your API keys and Twitter credentials in `.env`: |
| ``` |
| DEEPSEEK_API_KEY=your-key-here |
| NEWS_SERVICE_URL=http://localhost:5000 |
| ALPHA_VANTAGE_KEY=your-key-here |
| |
| # Twitter/X Credentials (required for real-time news monitoring) |
| TWITTER_USERNAME=your-twitter-username |
| TWITTER_EMAIL=your-email@example.com |
| TWITTER_PASSWORD=your-password |
| ``` |
|
|
| **Note**: Twitter credentials are required for real-time news monitoring. Without credentials, the system will use demo/mock data. |
|
|
| ## Usage |
|
|
| Run the application: |
| ```bash |
| streamlit run app/app.py |
| ``` |
|
|
| The application will open in your default web browser at `http://localhost:8501`. |
|
|
| ## Project Structure |
|
|
| ``` |
| FinancialPlatform/ |
| βββ app/ |
| β βββ app.py # Main landing page |
| β βββ pages/ |
| β β βββ 01_Stocks.py # Stock analysis page |
| β β βββ 02_Crypto.py # Cryptocurrency analysis |
| β β βββ 03_Forex.py # Forex analysis |
| β β βββ 04_Screener.py # Market screener |
| β β βββ 05_Dashboard.py # News & AI dashboard |
| β βββ components/ |
| β β βββ chart.py # Chart creation utilities |
| β β βββ data_sources.py # Data fetching functions |
| β β βββ ui.py # UI component functions |
| β β βββ styles.py # Dark theme CSS |
| β βββ utils/ |
| β βββ config.py # Configuration management |
| β βββ formatters.py # Data formatting utilities |
| βββ requirements.txt |
| βββ .env.example |
| βββ README.md |
| ``` |
|
|
| ## Technology Stack |
|
|
| - **Frontend**: Streamlit |
| - **Data Sources**: OpenBB SDK, yfinance |
| - **Charting**: Plotly, TradingView widgets |
| - **AI**: DeepSeek API (planned) |
| - **Styling**: Custom CSS with dark theme |
|
|
| ## Features in Development |
|
|
| - [ ] Cryptocurrency data integration (Binance API) |
| - [ ] Forex data integration (Alpha Vantage) |
| - [ ] Market screener with advanced filters |
| - [ ] News aggregation service |
| - [ ] AI-powered trading insights |
| - [ ] Sentiment analysis |
| - [ ] Additional technical indicators (MACD, Bollinger Bands, ATR) |
|
|
| ## Configuration |
|
|
| ### Environment Variables |
|
|
| - `DEEPSEEK_API_KEY`: API key for AI-powered insights |
| - `NEWS_SERVICE_URL`: URL for news aggregation service |
| - `ALPHA_VANTAGE_KEY`: API key for forex data (optional) |
|
|
| ### Cache Settings |
|
|
| Data caching is configured in `utils/config.py`: |
| - Price data: 1 hour TTL |
| - Fundamental data: 24 hours TTL |
| - News data: 15 minutes TTL |
|
|
| ## Deployment |
|
|
| ### HuggingFace Spaces |
|
|
| This application is optimized for deployment on HuggingFace Spaces: |
|
|
| 1. Create a new Space on HuggingFace |
| 2. Set the Space type to "Streamlit" |
| 3. Add your environment variables in the Space settings: |
| - `DEEPSEEK_API_KEY` |
| - `NEWS_SERVICE_URL` |
| - `ALPHA_VANTAGE_KEY` |
| 4. Push your code to the Space repository |
|
|
| ### Local Development |
|
|
| For local development with hot-reload: |
| ```bash |
| streamlit run app/app.py --server.runOnSave=true |
| ``` |
|
|
| ## Contributing |
|
|
| Contributions are welcome! Please feel free to submit a Pull Request. |
|
|
| ## License |
|
|
| Apache 2.0 License |
|
|
| ## Acknowledgments |
|
|
| - OpenBB for financial data API |
| - TradingView for chart widgets |
| - Streamlit for the amazing web framework |
|
|
|
|