Skip to content

gomesdevs/B3Forecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ˆ B3Forecast

AI-Powered Brazilian Stock Market Prediction Platform

Leverage Deep Learning to forecast B3 stock movements with unprecedented accuracy

Python TensorFlow Streamlit License

๐Ÿš€ Live Demo โ€ข ๐Ÿ“Š Features โ€ข โšก Quick Start โ€ข ๐Ÿ—๏ธ Architecture


๐ŸŽฏ Overview

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.

๐Ÿ”ฅ Why B3Forecast?

  • ๐ŸŽฏ 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

โœจ Features

๐Ÿค– Advanced ML Capabilities

  • 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

๐Ÿ“Š Interactive Analytics

  • Dynamic Visualizations with Plotly integration
  • Historical Performance tracking and analysis
  • Price Variation calculations and trend indicators
  • Multi-timeframe analysis support

๐Ÿข Enterprise Features

  • Scalable Architecture built with modern Python stack
  • API Integration with EODHD financial data provider
  • Caching Layer for optimized performance
  • Error Handling and data validation

๐Ÿ—๏ธ Architecture

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]
Loading

๐Ÿ”ง Technology Stack

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

โšก Quick Start

๐Ÿ”ง Prerequisites

  • Python 3.8+ installed
  • Git for repository cloning
  • Internet connection for data fetching

๐Ÿš€ Installation

# 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

๐ŸŽฎ Usage

  1. Select Stock: Choose from popular B3 stocks (PETR4, VALE3, etc.)
  2. Set Date Range: Configure historical data period (up to 2 years)
  3. Generate Prediction: Click "Prever" to train model and forecast
  4. Analyze Results: View interactive charts and prediction metrics

๐Ÿ“Š Model Performance

๐ŸŽฏ Accuracy 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

๐Ÿ“ˆ Supported Assets

  • PETR4 - Petrobras
  • VALE3 - Vale
  • ITUB4 - Itaรบ Unibanco
  • BBDC4 - Bradesco
  • ABEV3 - Ambev

๐Ÿค Business Applications

๐Ÿฆ Financial Institutions

  • Risk management and portfolio optimization
  • Algorithmic trading strategy development
  • Client advisory services enhancement

๐Ÿ’ผ Investment Firms

  • Quantitative analysis automation
  • Performance benchmarking
  • Market sentiment analysis

๐Ÿ“Š Fintech Startups

  • Product feature integration
  • Market research acceleration
  • Competitive intelligence

๐Ÿ”ฎ Roadmap

  • 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

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™‹โ€โ™‚๏ธ Support


Made with โค๏ธ for the Brazilian Financial Market

โญ Star this repository if you find it useful!

About

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.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages