- Input shape: (30, 5) - 30 days of historical data with 5 features
- Architecture:
- LSTM Layer 1: 50 units with dropout (0.2)
- LSTM Layer 2: 30 units with dropout (0.2)
- Dense output layer: 1 unit
- Optimization: Adam optimizer with MSE loss
- Moving Averages (20, 50, 200 days)
- RSI (14-period)
- MACD (12, 26, 9)
- Bollinger Bands (20, 2σ)
Features used:
- Price data (OHLCV)
- Technical indicators
- Price momentum
- Volatility metrics
- Volume analysis- Combines multiple indicators
- Weighted scoring system:
- MA crossovers
- RSI extremes
- MACD signals
- Volume confirmation
- Confidence calculation based on signal agreement
- Runs in a separate thread
- Continuously updates model weights
- Adapts to new market conditions
- Maintains a rolling window of recent data
-
Data Collection:
- Stores last 1000 price movements
- Features: price, indicators, volume
- Labels: actual price changes
-
Training Process:
- Batch size: 32 samples
- Updates every 5 minutes
- Uses most recent data points
- Applies gradient updates
-
Adaptation Mechanism:
- Adjusts to market volatility
- Updates signal thresholds
- Modifies confidence levels
- Fine-tunes prediction weights
- Strong buy signals require:
- RSI < 30 (oversold)
- Positive MACD crossover
- Price above key moving averages
- High volume confirmation
- Sell signals triggered by:
- RSI > 70 (overbought)
- MACD bearish crossover
- Break below support levels
- Divergence patterns
- Simulates trading strategy
- Calculates key metrics:
- Total return
- Win rate
- Maximum drawdown
- Risk-adjusted returns
- Monitors prediction accuracy
- Adjusts confidence levels
- Updates signal thresholds
- Maintains performance stats
-
Market Conditions
- Works best in trending markets
- May struggle in highly volatile periods
- Requires sufficient volume for accuracy
-
Technical Constraints
- API rate limits affect data freshness
- Processing delays in high-volume periods
- Memory constraints for historical data
-
Model Adaptation
- Takes time to adapt to new patterns
- May overfit to recent market conditions
- Requires regular performance monitoring
-
Planned Enhancements
- Advanced pattern recognition
- Multiple timeframe analysis
- Sentiment analysis integration
- Enhanced risk management
-
Optimization Opportunities
- Feature selection refinement
- Model architecture improvements
- Performance optimization
- Enhanced error handling