AlphaPulse is an advanced algorithmic trading system that combines multiple AI agents, sophisticated risk management, and portfolio optimization to make data-driven investment decisions in cryptocurrency markets.
- Multi-agent architecture combining technical, fundamental, sentiment, and value analysis
- Risk-first approach with multiple layers of risk controls
- Portfolio optimization using modern portfolio theory
- Extensible framework for adding new strategies and data sources
- Real-time monitoring and performance analytics
- Comprehensive alerting system with multiple notification channels
- Python 3.9+
- Docker and Docker Compose
- PostgreSQL with TimescaleDB (or use Docker setup)
- Redis (or use Docker setup)
-
Clone the repository:
git clone https://github.com/your-org/alpha-pulse.git cd alpha-pulse
-
Install dependencies:
pip install -r requirements.txt
-
Set up the database infrastructure:
./scripts/setup_database.sh
-
Initialize the database:
python src/scripts/init_db.py
-
Start the data pipeline:
python -m alpha_pulse.data_pipeline
-
Launch the trading engine:
python -m alpha_pulse.main
-
Monitor performance:
python -m alpha_pulse.monitoring
AlphaPulse uses a robust database infrastructure:
- PostgreSQL with TimescaleDB: For relational data and time-series metrics
- Redis: For caching and real-time messaging
AlphaPulse includes a comprehensive alerting system:
- Rule-Based Alerts: Define conditions that trigger alerts based on metric values
- Multiple Notification Channels: Send alerts via email, Slack, SMS, and web interfaces
- Alert History: Store and query alert history with filtering options
- Acknowledgment: Track which alerts have been acknowledged and by whom
The alerting system is configured via YAML:
alerting:
enabled: true
check_interval: 60 # seconds
# Configure notification channels
channels:
email:
enabled: true
smtp_server: "smtp.example.com"
# Additional email configuration...
slack:
enabled: true
webhook_url: "${AP_SLACK_WEBHOOK}"
# Additional Slack configuration...
sms:
enabled: true
account_sid: "${AP_TWILIO_SID}"
# Additional SMS configuration...
# Define alert rules
rules:
- rule_id: "sharpe_ratio_low"
name: "Low Sharpe Ratio"
metric_name: "sharpe_ratio"
condition: "< 0.5"
severity: "warning"
message_template: "Sharpe ratio is {value}, below threshold of 0.5"
channels: ["email", "slack", "web"]
To start the alerting system:
python -m alpha_pulse.monitoring.alerting
- Redis: For caching and real-time messaging
The database infrastructure can be set up using Docker Compose:
docker-compose -f docker-compose.db.yml up -d
This will start:
- PostgreSQL with TimescaleDB extension
- Redis
- PgAdmin (web interface for PostgreSQL)
The database schema includes:
- Users and authentication
- Portfolios and positions
- Trades and orders
- Time-series metrics
- Alerts and notifications
The database access layer provides:
- Connection management
- Repository pattern for data access
- ORM models
- Transaction support
Check out the examples directory for sample scripts:
examples/database/demo_database.py
: Demonstrates database operationsexamples/trading/demo_ai_hedge_fund.py
: Demonstrates the AI Hedge Fundexamples/monitoring/demo_monitoring.py
: Demonstrates the monitoring systemexamples/alerting/demo_alerting.py
: Demonstrates the alerting system
To run the database demo:
cd examples/database
./run_demo.sh
To run the alerting demo:
cd examples/alerting
./run_demo.sh
## Documentation
- [API Documentation](API_DOCUMENTATION.md)
- [System Architecture](SYSTEM_ARCHITECTURE.md)
- [Hedge Fund Requirements](HEDGE_FUND_REQUIREMENTS.md)
- [Deployment Guide](DEPLOYMENT.md)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.