{"id":26451051,"url":"https://github.com/devmaan707/stock.ai","last_synced_at":"2026-05-11T16:36:44.925Z","repository":{"id":282542443,"uuid":"948837448","full_name":"DevMaan707/stock.ai","owner":"DevMaan707","description":"Stock.ai is a comprehensive platform for predicting stock market movements using machine learning models, real-time data analysis, and sentiment analysis of financial news. The system continuously learns from its predictions to improve accuracy over time.","archived":false,"fork":false,"pushed_at":"2025-03-15T09:28:23.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T10:26:27.273Z","etag":null,"topics":["python","stock-market","stock-price-prediction","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevMaan707.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-15T04:16:01.000Z","updated_at":"2025-03-15T09:28:27.000Z","dependencies_parsed_at":"2025-03-15T10:36:47.626Z","dependency_job_id":null,"html_url":"https://github.com/DevMaan707/stock.ai","commit_stats":null,"previous_names":["devmaan707/stock.ai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaan707%2Fstock.ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaan707%2Fstock.ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaan707%2Fstock.ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevMaan707%2Fstock.ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevMaan707","download_url":"https://codeload.github.com/DevMaan707/stock.ai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244259971,"owners_count":20424649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","stock-market","stock-price-prediction","tensorflow"],"created_at":"2025-03-18T16:31:26.680Z","updated_at":"2026-05-11T16:36:44.878Z","avatar_url":"https://github.com/DevMaan707.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stock.ai - Advanced Stock Market Prediction System\n\n![Stock.ai Logo](https://img.shields.io/badge/Stock.ai-1.0.0-blue)\n![Python](https://img.shields.io/badge/Python-3.8%2B-brightgreen)\n![TensorFlow](https://img.shields.io/badge/TensorFlow-2.8%2B-orange)\n![License](https://img.shields.io/badge/License-MIT-green)\n\nStock.ai is a comprehensive platform for predicting stock market movements using machine learning models, real-time data analysis, and sentiment analysis of financial news. The system continuously learns from its predictions to improve accuracy over time.\n\n## Features\n\n- **Real-time Stock Data Analysis**: Fetch and process stock data from Yahoo Finance\n- **Advanced ML Predictions**: LSTM neural networks for time series forecasting\n- **Technical Indicators**: RSI, MACD, Bollinger Bands, and more\n- **Sentiment Analysis**: Analyze financial news for market sentiment\n- **Recommendation Engine**: Generate actionable buy/sell recommendations\n- **Performance Tracking**: Track and validate prediction accuracy\n- **Continuous Learning**: Models that improve with each prediction\n\n## System Architecture\n\n```\n├── core/               # Core system components\n│   ├── data_manager.py      # Fetches and manages stock data\n│   ├── database.py          # Handles data storage and retrieval\n│   ├── feature_engineer.py  # Creates features for ML models\n│   ├── model_manager.py     # Manages ML model lifecycle\n│   ├── recommendation_system.py  # Generates actionable recommendations\n│   └── stock_prediction_system.py  # Main system orchestration\n├── models/             # ML model definitions\n├── services/           # External service integrations\n│   ├── news_service.py      # Fetches financial news\n│   ├── sentiment_service.py # Analyzes news sentiment\n│   └── llm_service.py       # Large language model integration\n├── ui/                 # User interface components\n└── utils/              # Utility functions and helpers\n```\n\n## How It Works\n\n### Workflow\n\n1. **Data Collection**:\n   - Stock price data is fetched from Yahoo Finance\n   - Financial news is gathered from News API\n   - Data is processed and stored in the local database\n\n2. **Feature Engineering**:\n   - Technical indicators are calculated (RSI, MACD, etc.)\n   - News sentiment is analyzed and integrated with price data\n   - Features are normalized for model input\n\n3. **Prediction Generation**:\n   - LSTM models process feature data to predict future prices\n   - Confidence scores are calculated for each prediction\n   - Buy/sell/hold recommendations are determined\n\n4. **Result Validation**:\n   - Previous predictions are compared with actual outcomes\n   - Model performance metrics are updated\n   - Rewards/penalties are assigned to improve future predictions\n\n5. **Continuous Learning**:\n   - Models are retrained periodically (default: every 6 hours)\n   - New market data and prediction results enhance model accuracy\n   - System performance improves over time\n\n## Installation\n\n### Prerequisites\n\n- Python 3.8 or higher\n- pip package manager\n- TA-Lib installed on your system (for technical indicators)\n\n### Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/stock.ai.git\n   cd stock.ai\n   ```\n\n2. Run the setup script:\n   ```bash\n   bash scripts/setup.sh\n   ```\n   \n   This will:\n   - Create a virtual environment\n   - Install required packages\n   - Set up the database and directories\n\n3. Configure your `.env` file:\n   ```\n   NEWS_API_KEY=your_news_api_key\n   LLM_ENDPOINT=http://localhost:8080/generate\n   DATABASE_PATH=data/stock_predictor.db\n   MODEL_PATH=models/\n   LOG_PATH=logs/\n   ```\n\n## Usage\n\n### Basic Run\n\nTo start the system with default settings:\n\n```bash\nbash scripts/run.sh\n```\n\nOr run directly with Python:\n\n```bash\npython src/main.py --symbols AAPL GOOGL MSFT AMZN --interval 60\n```\n\n### Command Line Arguments\n\n- `--symbols`: List of stock symbols to monitor (default: AAPL GOOGL MSFT AMZN)\n- `--interval`: Prediction interval in minutes (default: 60)\n\n### Changing Run Frequency\n\nTo adjust how often the system makes predictions:\n\n```bash\npython src/main.py --symbols AAPL GOOGL MSFT --interval 30\n```\n\nThis will run prediction cycles every 30 minutes instead of the default 60.\n\n### Training Schedule\n\nBy default, models are retrained every 6 hours. To change this, modify the `run` method in `src/core/stock_prediction_system.py`:\n\n```python\nif datetime.now().hour % 12 == 0:  # Change from 6 to 12 for 12-hour retraining\n    await self.train_models()\n```\n\n## Monitoring\n\n- Predictions and system status are displayed in the console\n- Detailed logs are saved to `logs/stock_predictor.log`\n- Database stores all predictions and performance metrics\n\n## Data Storage\n\n- **Raw Data**: Stored in `data/raw/`\n- **Processed Data**: Stored in `data/processed/`\n- **Database**: SQLite database at `data/stock_predictor.db`\n- **Models**: Saved to `models/` directory\n\n## Advanced Configuration\n\nEdit `src/utils/config.py` to change system-wide settings:\n\n- `LOOKBACK_DAYS`: Days of historical data to use (default: 500)\n- `TRAINING_EPOCHS`: Number of epochs for model training (default: 10)\n- `BATCH_SIZE`: Batch size for training (default: 32)\n- `TECHNICAL_INDICATORS`: List of technical indicators to use\n\n## Extending the System\n\n### Adding New Stock Symbols\n\nSimply add them to the command line arguments:\n\n```bash\npython src/main.py --symbols AAPL GOOGL MSFT AMZN TSLA NFLX\n```\n\n### Adding Custom Technical Indicators\n\n1. Extend the `add_technical_indicators` method in `src/core/feature_engineer.py`\n2. Update the `feature_list` in the `FeatureEngineer` class\n3. Retrain models to incorporate the new features\n\n### Customizing Recommendation Logic\n\nModify the `analyze_stock` method in `src/core/recommendation_system.py` to adjust how recommendations are generated.\n\n## Troubleshooting\n\n- **Missing Data**: Ensure your internet connection is stable for API access\n- **Model Training Errors**: Check if you have enough historical data for selected symbols\n- **TA-Lib Errors**: Verify TA-Lib is properly installed on your system\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- Yahoo Finance for stock data\n- NewsAPI for financial news\n- TensorFlow and Keras for machine learning capabilities\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmaan707%2Fstock.ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevmaan707%2Fstock.ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmaan707%2Fstock.ai/lists"}