A sophisticated financial analysis and trading platform leveraging multiple AI agents for market analysis, trading strategies, and risk management, integrated with DTMAC (Distributed Targeted Multi Agent Communication) for seamless multi-agent collaboration.
- Multi-Agent System: AI agents performing distinct roles like stock analysis, strategy development, and risk management.
- DTMAC Integration: Advanced coordination system that enhances agent interaction and collaboration.
- Real-time Data Processing: Live stock data fetching and analysis with immediate feedback.
- Technical Analysis: Incorporation of advanced technical indicators and market analysis techniques.
- Risk Management: Advanced strategies to assess, minimize, and manage market risk.
- Trading Strategies: Development of AI-powered algorithms for trading decision-making.
- Data Archiving: Comprehensive storage and management of historical data and analysis.
- WebSocket Support: Real-time updates, trading signals, and alerts.
- AI Chatbot: FinBot β A Groq-powered chatbot that provides real-time market insights and answers.
- Backend: Python, Flask
- Data Processing: Pandas, NumPy
- Real-time Communication: Flask-SocketIO
- Data Storage: Local file system with structured archiving
- AI/ML: Custom AI agents for market analysis and decision-making
- Coordination System: DTMAC (Dynamic Task Management and Coordination)
- Python 3.8+
- pip (Python package manager)
- Git
- Clone the repository:
git clone https://github.com/0xfarben/FinForesight.git
cd FinForesight- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r setup.txt- Set up environment variables [.env file (in root) can also be used]:
export SESSION_SECRET="your-secret-key" # On Windows: set SESSION_SECRET=your-secret-key
export ALPHA_VANTAGE_API_KEY="your-api-key" # On Windows: set ALPHA_VANTAGE_API_KEY=your-api-keyβββ agents/ # AI agent implementations
| βββ base_agent.py
β βββ dtmac.py # DTMAC coordination system
| βββ orchestrator.py
β βββ data_analyst_agent.py
β βββ trade_strategy_agent.py
β βββ trade_advisor_agent.py
β βββ risk_advisor_agent.py
βββ services/ # Core services
β βββ historic_data.py # Historical data management
β βββ stock_data.py # Stock data fetching and processing
β βββ stock_overview.py # Stock overview and analysis
β βββ technical_indicator.py # Technical analysis indicators
β βββ ratios.py # Financial ratios calculations
β βββ financial_statement.py # Financial statement analysis
β βββ economics.py # Economic indicators and analysis
β βββ news_sentiment.py # News sentiment analysis
β βββ earning_call_transcript.py # Earnings call analysis
βββ templates/ # HTML templates
βββ static/ # Static assets
βββ data_archive/ # Historical data storage
βββ strategies_archive/ # Trading strategies storage
βββ predictions_archive/ # Market predictions storage
βββ risk_archive/ # Risk analysis storage
βββ app.py # Main application file
βββ setup.txt # Python dependencies
- Start the application:
python app.py-
Access the web interface at
http://localhost:5000 -
Key endpoints:
/: Main dashboard/analyze: Stock analysis interface/api/top_stocks: Top performing stocks API
- Performs comprehensive stock data analysis
- Generates market insights
- Processes historical data
- Develops trading strategies
- Analyzes market patterns
- Generates trading signals
- Provides trading recommendations
- Evaluates trading opportunities
- Suggests entry/exit points
- Assesses market risks
- Provides risk management strategies
- Monitors portfolio risk levels
The DTMAC system is a coordination framework that helps manage and synchronize tasks between multiple AI agents, enabling them to communicate and collaborate seamlessly. DTMAC enhances the platform by ensuring that each agent can work independently while contributing to a unified strategy.
- Task Assignment: Automatically assigns tasks to agents based on real-time analysis and needs.
- Data Sharing: Facilitates data exchange between agents for more informed decision-making.
- Collaboration: Ensures smooth collaboration between agents with minimal conflicts.
The platform maintains several archive directories:
data_archive/: Historical stock datastrategies_archive/: Trading strategiespredictions_archive/: Market predictionsrisk_archive/: Risk analysis reports
- Session-based authentication
- Environment variable configuration
- Secure data handling practices
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue in the repository or contact the development team.
