A sophisticated system for monitoring and mirroring publicly disclosed insider trades using ReACT methodology and intelligent agents.
- Real-Time Data Ingestion: Fetch insider trading data from multiple sources (Finnhub, Tradefeeds)
- Intelligent Analysis: Filter and identify significant trades using configurable criteria
- Automated Trading: Execute trades with comprehensive risk management
- Performance Monitoring: Real-time metrics and alerting via Prometheus/Grafana
- Detailed Reporting: Generate HTML and CSV reports with trade analytics
- CLI Interface: Command-line tools for all system operations
- Docker Support: Containerized deployment with monitoring stack
The system uses a multi-agent architecture with ReACT (Reasoning and Acting) methodology:
- Data Agent: Fetches and validates insider trading data
- Analysis Agent: Identifies significant trades worth mirroring
- Trading Agent: Executes trades with risk management
- Reporting Agent: Generates performance reports and analytics
- Python 3.9+
- Docker and Docker Compose (for containerized deployment)
- API keys for data sources (Finnhub, Tradefeeds)
- Redis (for caching)
- Prometheus/Grafana (for monitoring)
-
Clone the repository:
git clone https://github.com/yourusername/insider-mirror.git cd insider-mirror -
Create and activate virtual environment:
python -m venv venv source venv/bin/activate # Linux/Mac # or .\venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt pip install -r requirements-dev.txt # for development -
Set up environment variables:
cp env.sample .env # Edit .env with your configuration -
Install pre-commit hooks:
make dev-setup
-
Build and start services:
docker-compose up -d
-
Monitor logs:
docker-compose logs -f
-
Fetch insider trading data:
insider-mirror data fetch --limit 100
-
Analyze trades:
insider-mirror analyze trades --min-value 100000
-
Execute trades:
insider-mirror trade execute --mode paper
-
Generate reports:
insider-mirror report generate --format html
-
Run the complete system:
insider-mirror run --interval 3600
# Run tests
make test
# Run tests with coverage
make coverage
# Format code
make format
# Run linting
make lint
# Build documentation
make docsEdit src/insider_mirror/config/agents.yaml to configure agent behavior:
- Role definitions
- LLM models
- Validation rules
- Progress tracking
Edit src/insider_mirror/config/tasks.yaml to configure tasks:
- Data validation rules
- Analysis filters
- Trading parameters
- Report settings
Edit src/insider_mirror/config/analysis.yaml to configure:
- Performance metrics
- Risk thresholds
- Optimization rules
- Reporting formats
Access metrics and dashboards:
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000
- Alertmanager: http://localhost:9093
Configure alerts in alertmanager.yml:
- Slack notifications
- Email alerts
- Custom alert rules
# Run all tests
pytest
# Run specific test file
pytest tests/test_data_agent.py
# Run with coverage
pytest --cov=insider_mirror
# Run performance tests
pytest -m "slow"- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
- All API keys should be stored in environment variables
- Use paper trading mode for testing
- Monitor system logs for suspicious activity
- Regular security audits recommended
MIT License - see LICENSE file for details
This system is for educational purposes only. Always consult with legal and compliance experts before deploying any trading system. Trading based on insider information that is not publicly disclosed is illegal in most jurisdictions.
For issues and feature requests, please use the GitHub issue tracker.
- Your Name (@yourusername)
- LangGraph and LangChain for agent orchestration
- Finnhub and Tradefeeds for market data
- OpenRouter for LLM capabilities