AI Crypto Trader
An experimental cryptocurrency trading system that combines AI-powered analysis with real-time market data and social sentiment monitoring. Features multiple microservices including market monitoring, social sentiment analysis, AI-driven trading signals, and automated trade execution. Built for fun.
Install / Use
npx skills add zd87pl/ai-crypto-traderInstalls into whichever agent you are using.
README
AI Crypto Trader
⚠️ Important Disclaimer
This project is an experimental cryptocurrency trading system designed for educational and research purposes only.
PLEASE NOTE:
- This is NOT financial advice
- This is NOT investment advice
- The trading signals and analyses generated are NOT recommendations to buy, sell, or trade any assets
- The system's AI-generated insights should NOT be considered as professional trading guidance
- Past performance does not guarantee future results
- Cryptocurrency trading involves substantial risk of loss
- You should never invest money you cannot afford to lose
By using this system, you acknowledge that you are doing so at your own risk and that the creators and contributors of this project cannot be held responsible for any financial losses incurred.
This project serves as a technical demonstration of integrating AI with cryptocurrency markets and should be treated as an educational resource for understanding automated trading systems.
Dashboard
The project includes a modern, interactive dashboard that provides real-time insights into your trading system:

Dashboard Features
General Features
- Mobile Responsive Design: Optimized for all devices from smartphones to desktop monitors
- Interactive Navigation: Quick access to trading, portfolio, AI models, and risk sections
- Real-time Updates: All data refreshes automatically at configurable intervals
Trading Analytics
- Real-time Price Charts: Interactive candlestick charts with technical indicators (RSI, MACD, Bollinger Bands)
- Trading Signals: View recent trading signals with confidence levels and reasoning
- Trade History: Monitor executed trades and performance
- Social Sentiment Analysis: Track social media sentiment, volume, engagement, and contributors
- News Feed: Latest crypto news affecting your trading pairs
Portfolio Management
- Portfolio Overview: Track total value, daily change, and asset allocation
- Performance Metrics: Visual representation of portfolio growth over time
- Asset Allocation: Monitor distribution of investments across different cryptocurrencies
AI Model Insights
- Model Performance: Track accuracy, profit factor, and trade counts over time
- Version Comparison: Compare metrics across different AI model versions
- Feature Importance: Visualize which features have the most influence on trading decisions
- Explainable AI: Detailed breakdowns of how the AI reaches trading decisions
Risk Management
- Portfolio Risk Metrics: Monitor VaR (Value at Risk) and maximum drawdown
- Correlation Analysis: Visualize asset correlations with interactive heatmaps
- Position Sizing: Risk-optimized position sizing with volatility and correlation adjustments
- Adaptive Stop-Loss: Visualize how stop-losses adapt to changing market volatility
Accessing the Dashboard
When running the system with Docker Compose, the dashboard is available at:
http://localhost:8050
For local setup, start the dashboard separately with:
python dashboard.py
System Components
1. Market Monitor Service
- Monitors real-time market data from Binance
- Calculates technical indicators and price changes across multiple timeframes (1m, 3m, 5m, 15m)
- Publishes market updates to Redis
- Logs to:
logs/market_monitor.log
2. Social Monitor Service
- Fetches social metrics and news from LunarCrush API
- Tracks social sentiment, engagement, and volume
- Monitors news impact and social trends
- Caches data to respect API rate limits
- Logs to:
logs/social_monitor.log
3. AI Analyzer Service
- Processes market updates using OpenAI GPT-4
- Incorporates social sentiment and news analysis
- Generates context-aware trading signals
- Publishes trading signals to Redis
- Logs to:
logs/ai_analyzer.log
4. Trade Executor Service
- Executes trades based on AI analysis signals
- Manages positions and risk
- Updates portfolio holdings
- Logs to:
logs/trade_executor.log
5. Strategy Evolution Service
- Self-improves trading strategies based on performance data
- Uses AI to generate and refine trading approaches
- Integrates social sentiment data into strategy optimization
- Applies genetic algorithms and GPT-based optimization
- Maintains a history of strategy performance
- Logs to:
logs/strategy_evolution.log
6. Market Regime Service
- Detects market regimes (bull, bear, ranging, volatile)
- Adapts trading strategies to current market conditions
- Tracks strategy performance across different regimes
- Logs to:
logs/market_regime.log
7. Strategy Selection Service
- Automatically selects optimal trading strategies
- Considers multiple factors: market regime, historical performance, risk profile, social sentiment
- Implements time-based adjustments for different market hours
- Uses advanced scoring algorithms with configurable weights
- Adapts to changing market conditions in real-time
- Makes data-driven strategy switching decisions
- Logs to:
logs/strategy_selection.log
8. Social Strategy Integrator
- Analyzes correlation between social sentiment and price movements
- Identifies lead/lag relationships in social metrics
- Generates specialized strategies based on social patterns
- Optimizes trading parameters based on social sentiment
- Creates social-specific strategy variants (trend-following, contrarian, etc.)
- Provides social impact scores for strategy selection
- Logs to:
logs/social_strategy.log
9. Backtesting Framework
- Fetches and manages historical market and social data
- Simulates trading strategy performance on historical data
- Integrates with the AI trading logic for realistic backtests
- Generates performance analytics and visualizations
- Detailed documentation in
backtesting/README.md
10. Model Registry Service
- Tracks AI model versions and performance metrics
- Provides version control for trading models
- Maintains a registry of all model versions
- Enables model comparison and selection
- Logs to:
logs/model_registry.log
11. AI Explainability Service
- Enhances trading decisions with detailed explanations
- Visualizes factor weights influencing decisions
- Provides technical and social factors analysis
- Explains the reasoning behind each trade
- Logs to:
logs/ai_explainability.log
12. Feature Importance Analyzer
- Analyzes the importance of different features in machine learning models
- Uses permutation importance and RandomForest feature analysis
- Identifies which indicators have the most influence on trading decisions
- Categorizes features by group (price action, momentum, volatility, trend, volume, social)
- Generates visualizations and comprehensive reports
- Creates optimized models by pruning low-importance features
- Publishes results to other services via Redis
- Provides real-time feature importance tracking in the dashboard
- Helps focus data collection on high-value indicators
- Logs to:
logs/feature_importance.log
13. Market Regime Detection Service
- Identifies current market conditions using machine learning and rule-based systems
- Classifies markets into four regimes: bull, bear, ranging, and volatile
- Uses multiple detection methods: KMeans, Gaussian Mixture Models, Hidden Markov Models
- Provides regime probabilities and confidence scores
- Adapts trading strategies to current market conditions
- Analyzes historical performance of strategies in different regimes
- Generates market regime visualizations
- Monitors regime changes and triggers strategy switching
- Supports dynamic machine learning model retraining
- Logs to:
logs/market_regime.log
14. Portfolio Risk Management Service
- Implements portfolio-wide risk management
- Calculates Value at Risk (VaR) across the entire portfolio
- Provides adaptive stop-losses based on market volatility
- Optimizes position sizing for better risk-adjusted returns
- Monitors asset correlations for improved diversification
- Logs to:
logs/portfolio_risk.log
14. Social Risk Adjuster Service
- Dynamically adjusts risk parameters based on social sentiment
- Modifies position sizes, stop-losses, and take-profit levels
- Applies time decay to social sentiment influence
- Adjusts correlation thresholds based on social metrics
- Detects volatility patterns in social engagement
- Applies different adjustment strategies for bullish/bearish sentiment
- Includes data quality assessment for reliable adjustments
- Logs to:
logs/social_risk_adjuster.log
15. Monte Carlo Simulation Service
- Generates thousands of price path simulations for future risk projection
- Implements multiple simulation methods (geometric Brownian motion, historical)
- Calculates Value at Risk (VaR) and Conditional VaR metrics
- Scenarios analysis for different market conditions (bull, bear, volatile, etc.)
- Creates probability distributions for future price movements
- Analyzes maximum drawdown scenarios
- Generates visual representations of price path simulations
- Produces comprehensive risk reports for the entire portfolio
- Logs to:
logs/monte_carlo.log
16. Neural Network Price Prediction Service
- Implements deep learning models for cryptocurrency price prediction
- Supports multiple neural network architectures (LSTM, GRU, Bidirectional LSTM, CNN-LSTM, Attention)
- Enables ensemble models combining multiple architectures for improved predictions
- Generates predictions for multiple timeframes (1h, 4h, 24h)
- Provides prediction confidence scores and directional indicators
- Features automatic training and model tuning capabilities
- Creates visualizations for both predictions and training performance
- Supports real-time model evaluation and adaptation
- Integrates with trading strategies for signal optimization
- Logs to:
logs/neural_network.log
Environment Setu
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
python-debugpy
385.5kDebug Python with pdb, breakpoint(), post-mortem inspection, and debugpy remote attach.
skill-creator
385.5kCreate, edit, audit, tidy, validate, or restructure AgentSkills and SKILL.md files.
prose
385.5kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
