Billy10111/financial-research-tool
Financial Research Tool Demo ๐
A comprehensive financial research tool for individual investors to analyze stocks, track portfolios, and make informed investment decisions.
๐ฏ Features
- ๐ Stock Analysis Dashboard: Detailed analysis with technical indicators, charts, and performance metrics
- ๐ Market Overview: At-a-glance view of market indices, top gainers/losers, and sector performance
- ๐ฅ Data Export: Export historical data and fundamentals to CSV for external analysis
- ๐ผ Portfolio Tracking: Track your investments and monitor performance (coming soon)
- โ ๏ธ Watchlists: Create and manage custom stock watchlists (coming soon)
๐ Quick Start
Prerequisites
- Python 3.9 or higher
- pip (Python package installer)
- Internet connection for fetching market data
Installation
- Clone or download the repository
- Install dependencies
pip install -r requirements.txt- Run the setup script
python scripts/setup_env.pyThis will:
- Initialize the SQLite database
- Create necessary directories
- Download required NLTK data
- Optionally fetch initial market data
- Launch the application
streamlit run main.py- Open your browser to the URL displayed (typically
http://localhost:8501)
๐ Project Structure
Financial research tool/
โโโ main.py # Main Streamlit application entry point
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โ
โโโ app/ # Streamlit pages
โ โโโ dashboard.py # Stock analysis dashboard
โ โโโ market_overview.py # Market overview page
โ โโโ data_export.py # Data export functionality
โ
โโโ config/ # Configuration files
โ โโโ settings.py # Application settings
โ โโโ watchlists.py # Default watchlists
โ
โโโ src/ # Core source code
โ โโโ api/ # API integration
โ โ โโโ data_fetcher.py
โ โโโ processing/ # Data processing
โ โ โโโ data_cleaner.py
โ โ โโโ feature_engineer.py
โ โโโ analysis/ # Analysis modules
โ โ โโโ historical_analysis.py
โ โ โโโ portfolio_tracker.py
โ โ โโโ sentiment_analyzer.py
โ โโโ components/ # UI components
โ โ โโโ chart_generator.py
โ โ โโโ table_display.py
โ โโโ utils/ # Utilities
โ โโโ database.py
โ
โโโ scripts/ # Helper scripts
โ โโโ setup_env.py # Environment setup
โ โโโ update_data.py # Data update script
โ
โโโ data/ # Data storage
โโโ raw/ # Raw API data
โโโ processed/ # Processed data
โโโ exports/ # Exported CSV files๐ Usage Guide
Market Overview
- View major market indices (S&P 500, Dow Jones, NASDAQ)
- See top gainers and losers
- Analyze sector performance
- Check overall market sentiment
Stock Dashboard
- Enter a stock symbol (e.g., AAPL, MSFT, GOOGL)
- Select time period for analysis
- Click "Analyze" to load data
- View:
- Current price and key statistics
- Interactive price charts (candlestick or line)
- Technical indicators (Moving Averages, RSI, MACD)
- Performance metrics (returns, volatility, Sharpe ratio)
- Company information
Data Export
- Choose export type:
- Historical Prices
- Company Fundamentals
- Multiple Stocks Comparison
- Configure parameters (ticker, time period, etc.)
- Click "Generate CSV"
- Preview the data
- Click "Download CSV" to save
๐ง Configuration
API Keys
For advanced features (news data), you can set API keys:
- Create a
.envfile in the project root - Add:
NEWS_API_KEY=your_key_here
Default Settings
Edit config/settings.py to customize:
- Default stocks and indices
- Chart colors and themes
- Cache settings
- Update frequency
๐ Technical Indicators
The tool provides various technical indicators:
- Moving Averages (20, 50, 200-day)
- RSI (Relative Strength Index)
- MACD (Moving Average Convergence Divergence)
- Bollinger Bands
- Volatility (Daily and Annualized)
๐ Updating Data
To fetch the latest market data:
python scripts/update_data.pyThis script can be scheduled to run periodically (e.g., hourly) using cron (Linux/Mac) or Task Scheduler (Windows).
๐ Data Sources
- Stock Data: Yahoo Finance (via yfinance library)
- Market Indices: Yahoo Finance
- Company Fundamentals: Yahoo Finance
โ ๏ธ Limitations
- Data is delayed (not real-time)
- Free API rate limits apply
- Local deployment only (single user)
- Demo version with basic features
๐ ๏ธ Troubleshooting
Issue: Module not found error
Solution: Ensure all dependencies are installed:
pip install -r requirements.txtIssue: No data returned for ticker
Solution:
- Check the ticker symbol is correct
- Verify internet connection
- Try a different ticker
- Check if market is open
Issue: Charts not displaying
Solution:
- Clear browser cache
- Refresh the page
- Check console for errors
๐ฎ Future Enhancements
- [ ] Real-time data integration
- [ ] Advanced portfolio analytics
- [ ] Alert notifications
- [ ] Custom watchlists with persistence
- [ ] Social sentiment analysis
- [ ] Comparison tools
- [ ] Mobile-responsive design
- [ ] Cloud deployment
๐ License
This is a demo project for personal use.
๐ค Contributing
This is a personal demo project, but suggestions are welcome!
๐ง Contact
For questions or issues, please refer to the project documentation.
Disclaimer: This tool is for educational and research purposes only. It does not provide investment advice. Always do your own research and consult with financial professionals before making investment decisions.
