A comprehensive stock market analysis platform that combines data collection, sentiment analysis, technical indicators, quantitative modeling, and interactive visualizations for informed investment decisions.
- News Sentiment Dashboard: https://stock-analysis-theta-inky.vercel.app
Stock-Analysis/
โโโ src/ # Source code
โ โโโ data_collection/ # Data gathering modules
โ โ โโโ yahoo_finance_api.ipynb
โ โ โโโ stock_news_scraper.ipynb
โ โ โโโ market_news_scraper.ipynb
โ โ โโโ trending_news_scraper.ipynb
โ โ โโโ financial_data_scraper.ipynb
โ โ โโโ financial_statement_analyzer.ipynb
โ โ โโโ earnings_calendar_scraper.ipynb
โ โ โโโ event_calendar_scraper.ipynb
โ โ โโโ market_index_scraper.ipynb
โ โ โโโ stock_news_processor.ipynb
โ โ โโโ trending_news_processor.ipynb
โ โ โโโ data/ # Collected data
โ โ โโโ all_news/
โ โ โโโ earnings_calendar/
โ โ โโโ event_calendar/
โ โ โโโ financials/
โ โ โโโ financials_analysis/
โ โ โโโ stock_index/
โ โ โโโ info_from_yfinance/
โ โ โโโ stock_news/
โ โ โโโ trending_news/
โ โ
โ โโโ sentiment_analysis/ # AI-powered sentiment analysis
โ โ โโโ gemini_sentiment_analyzer.ipynb
โ โ โโโ deepseek_sentiment_analyzer.ipynb
โ โ โโโ mistral_sentiment_analyzer.ipynb
โ โ โโโ secret.env
โ โ โโโ output/ # Sentiment analysis results
โ โ โโโ deepseek/
โ โ โโโ gemini/
โ โ โโโ mistral/
โ โ
โ โโโ technical_analysis/ # Technical indicators and analysis
โ โ โโโ candlestick_chart_analyzer.ipynb
โ โ โโโ trading_dashboard.ipynb
โ โ โโโ statistical_hypothesis_testing.ipynb
โ โ โโโ indicators/ # Technical indicators
โ โ โโโ main.py # Main orchestrator
โ โ โโโ sma.ipynb
โ โ โโโ ema.ipynb
โ โ โโโ rsi.ipynb
โ โ โโโ macd.ipynb
โ โ โโโ bollinger_bands.ipynb
โ โ โโโ stochastic_oscillator.ipynb
โ โ โโโ momentum.ipynb
โ โ โโโ volume.ipynb
โ โ โโโ support_resistance.ipynb
โ โ โโโ ichimoku_cloud.ipynb
โ โ โโโ elliott_wave.ipynb
โ โ โโโ chart_patterns.ipynb
โ โ โโโ output/
โ โ
โ โโโ quantitative_analysis/ # ML models and statistical analysis
โ โ โโโ vix_set50.ipynb
โ โ โโโ basic/ # Basic quantitative models
โ โ โโโ basic_price_prediction.ipynb
โ โ โโโ k_means.ipynb
โ โ โโโ yuanta_ml1.ipynb
โ โ โโโ yuanta_ml2.ipynb
โ โ โโโ data/
โ โ
โ โโโ visualization/ # Visualization components
โ โ โโโ backend/ # FastAPI backend
โ โ โโโ src/ # Frontend assets
โ โ โโโ return_calculation/
โ โ โโโ dca.ipynb
โ โ โโโ dividend.ipynb
โ โ
โ โโโ utils/ # Utility functions
โ โโโ eda.ipynb
โ โโโ english_to_thai.ipynb
โ โโโ dca.ipynb
โ โโโ dividend.ipynb
โ
โโโ apps/ # Application deployments
โ โโโ streamlit_apps/ # Streamlit applications
โ โ โโโ stock_app.py
โ โ โโโ news_app.py
โ โ โโโ financial_app.py
โ โ
โ โโโ web_dashboard/ # Web dashboard
โ โโโ backend/ # FastAPI backend
โ โโโ src/ # Frontend assets
โ โโโ requirements.txt
โ
โโโ data/ # Data storage
โ โโโ raw/ # Raw collected data
โ โโโ processed/ # Processed data
โ โ โโโ StockNews.ipynb
โ โ โโโ TrendingNews.ipynb
โ โ โโโ Data/ # Processed data files
โ โโโ models/ # Trained models
โ
โโโ config/ # Configuration files
โ โโโ requirements.txt
โ
โโโ docs/ # Documentation
โโโ README.md
โโโ project_structure.md
- Multi-source data gathering from Yahoo Finance, news APIs, and financial websites
- Automated scraping of stock news, market news, and trending financial content
- Financial statement analysis with automated data extraction
- Earnings and event calendar tracking
- Real-time market data integration
- Multi-model AI analysis using Gemini, DeepSeek, and Mistral
- News sentiment scoring with importance weighting
- Automated sentiment classification (Positive/Negative/Neutral)
- Thai language support with translation capabilities
- Comprehensive indicator suite including RSI, MACD, Bollinger Bands, etc.
- Advanced pattern recognition for chart patterns and Elliott Waves
- Support and resistance level identification
- Volume analysis and momentum indicators
- Interactive dashboards for real-time analysis
- Machine learning models for price prediction
- Clustering analysis for market segmentation
- Volatility analysis using VIX and market indices
- Statistical hypothesis testing for trading strategies
- Streamlit web applications for interactive analysis
- Real-time data visualization with Plotly and Matplotlib
- Candlestick charts with technical indicators
- Sentiment dashboards with live updates
- Return calculation tools for investment analysis
- Streamlit Apps (
apps/streamlit_apps/): Interactive web applications - Web Dashboard (
apps/web_dashboard/): FastAPI backend with frontend
- Clone the repository:
git clone https://github.com/Takedaxz/Stock-Analysis.git
cd Stock-Analysis- Install dependencies:
pip install -r config/requirements.txt- Set up environment variables (for API keys):
cp src/sentiment_analysis/secret.env.template src/sentiment_analysis/secret.env
# Edit secret.env with your API keyscd apps/streamlit_apps
streamlit run stock_app.py
streamlit run news_app.py
streamlit run financial_app.pycd src/technical_analysis/indicators
python main.pycd src/sentiment_analysis
jupyter notebook gemini_sentiment_analyzer.ipynbThe project uses a comprehensive set of Python libraries including:
pandas,numpy,scipy,scikit-learnmatplotlib,plotly,seabornjupyter,jupyterlab
yfinance- Yahoo Finance APIta- Technical Analysis librarymplfinance- Financial plottingstreamlit- Web applications
openai,google-generativeai,mistralaitransformers,sentence-transformersnltk,pythainlp- Natural language processing
requests,aiohttp,seleniumbeautifulsoup4,newspaper3kcloudscraper,curl_cffi
tensorflow,torch,keraslightning,torchmetricswandb- Experiment tracking
- OpenAI API - For GPT-based sentiment analysis
- Google Gemini API - For Gemini sentiment analysis
- Mistral AI API - For Mistral sentiment analysis
Create a .env file or use the existing secret.env in the src/sentiment_analysis/ directory.
- Yahoo Finance API - Stock prices, financial data
- News APIs - Financial news and market updates
- Financial websites - Earnings, events, and market data
- Market indices - S&P 500, NASDAQ 100, SET50
- Data Collection โ Raw data stored in
data/raw/ - Processing โ Processed data in
data/processed/ - Analysis โ Results in respective module directories
- Visualization โ Interactive apps in
apps/
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions, please open an issue on GitHub or contact the maintainers.
Note: This project is for educational and research purposes. Always do your own research before making investment decisions.