AI-Powered Brazilian Stock Market Prediction Platform
Leverage Deep Learning to forecast B3 stock movements with unprecedented accuracy
๐ Live Demo โข ๐ Features โข โก Quick Start โข ๐๏ธ Architecture
B3Forecast revolutionizes Brazilian stock market analysis by combining cutting-edge LSTM neural networks with real-time market data to deliver precise 5-day stock price predictions. Built for financial institutions, investment firms, and quantitative analysts who demand reliable, data-driven insights.
- ๐ฏ Precision: LSTM deep learning models trained on 2+ years of historical data
- โก Speed: Real-time predictions in under 30 seconds
- ๐ Coverage: Major B3 stocks (PETR4, VALE3, ITUB4, BBDC4, ABEV3)
- ๐ฑ Accessibility: Web-based dashboard accessible anywhere
- ๐ง Enterprise-Ready: Modular architecture for easy integration
- LSTM Neural Networks with 50-unit layers and dropout regularization
- Sequence Learning using 60-day historical patterns
- Real-time Predictions for next 5 trading days
- Automated Feature Engineering with MinMax scaling
- Dynamic Visualizations with Plotly integration
- Historical Performance tracking and analysis
- Price Variation calculations and trend indicators
- Multi-timeframe analysis support
- Scalable Architecture built with modern Python stack
- API Integration with EODHD financial data provider
- Caching Layer for optimized performance
- Error Handling and data validation
graph TB
A[Data Collection Layer] --> B[Preprocessing Engine]
B --> C[LSTM Model]
C --> D[Prediction Engine]
D --> E[Visualization Layer]
E --> F[Streamlit Dashboard]
A --> G[EODHD API]
B --> H[MinMax Scaler]
C --> I[TensorFlow/Keras]
E --> J[Plotly Charts]
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Streamlit 1.39.0 | Interactive web dashboard |
| ML Framework | TensorFlow 2.17.0 | LSTM model implementation |
| Data Processing | Pandas, NumPy | Data manipulation and analysis |
| Visualization | Plotly 5.24.1 | Interactive financial charts |
| Data Source | EODHD API | Real-time market data |
| ML Pipeline | Scikit-learn | Data preprocessing and scaling |
- Python 3.8+ installed
- Git for repository cloning
- Internet connection for data fetching
# Clone the repository
git clone https://github.com/gomesdevs/b3forecast.git
cd b3forecast
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Launch the application
streamlit run app.py- Select Stock: Choose from popular B3 stocks (PETR4, VALE3, etc.)
- Set Date Range: Configure historical data period (up to 2 years)
- Generate Prediction: Click "Prever" to train model and forecast
- Analyze Results: View interactive charts and prediction metrics
- Training Efficiency: 5 epochs for optimal speed/accuracy balance
- Sequence Length: 60-day patterns for robust predictions
- Architecture: 2-layer LSTM with dropout regularization
- Prediction Horizon: 5-day forward-looking forecasts
- PETR4 - Petrobras
- VALE3 - Vale
- ITUB4 - Itaรบ Unibanco
- BBDC4 - Bradesco
- ABEV3 - Ambev
- Risk management and portfolio optimization
- Algorithmic trading strategy development
- Client advisory services enhancement
- Quantitative analysis automation
- Performance benchmarking
- Market sentiment analysis
- Product feature integration
- Market research acceleration
- Competitive intelligence
- Multi-asset Portfolio prediction capabilities
- Technical Indicators integration (RSI, MACD, Bollinger Bands)
- REST API for programmatic access
- Real-time Alerts system
- Advanced Models (Transformer, GRU architectures)
- Backtesting Framework for strategy validation
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ฌ Issues: GitHub Issues
Made with โค๏ธ for the Brazilian Financial Market
โญ Star this repository if you find it useful!