BILLIONS is an advanced machine learning platform for stock market prediction and outlier detection. It uses LSTM neural networks, technical analysis, and statistical methods to identify trading opportunities across multiple timeframes.
NO. BILLIONS is an educational and research tool. It is NOT financial advice. Always:
- Do your own research
- Consult licensed financial advisors
- Never invest more than you can afford to lose
- Understand that past performance doesn't guarantee future results
Yes! BILLIONS is open-source under the MIT License. However, you'll need free API keys from:
- Alpha Vantage (free tier available)
- Yahoo Finance (no key needed)
- FRED (optional, free tier available)
BILLIONS works with any stock available on:
- NASDAQ
- NYSE
- Other major exchanges supported by Yahoo Finance
Python 3.8+, using libraries like:
- PyTorch (LSTM models)
- Dash/Plotly (dashboard)
- Pandas/NumPy (data processing)
- SQLAlchemy (database)
- Scikit-learn (machine learning utilities)
- LSTM (Long Short-Term Memory): Primary prediction model
- Random Forest: Feature importance and ensemble predictions
- Statistical Methods: Z-score analysis for outlier detection
Accuracy varies by:
- Stock volatility
- Market conditions
- Prediction horizon
- Data quality
Typical accuracy: 65-85% for directional predictions. Always check the confidence score!
- Default: 30 days ahead
- Supports: 1-day, 7-day, and 30-day forecasts
- Customizable in the code
- First run: 30-60 seconds (data fetching + model loading)
- Subsequent runs: 10-20 seconds (cached data)
- Training new model: 5-15 minutes
Minimum:
- Python 3.8+
- 4GB RAM
- 1GB free disk space
- Internet connection
Recommended:
- Python 3.10+
- 8GB RAM
- 5GB free disk space
- NVIDIA GPU (optional, for faster training)
No, but it helps!
- CPU: Works fine, slightly slower training
- GPU: Faster training (10x speedup with CUDA)
The system automatically detects and uses available hardware.
Alpha Vantage (Required):
- Visit https://www.alphavantage.co/support/#api-key
- Fill out the free API key request form
- Receive key instantly via email
- Add to
.envfile
FRED (Optional):
- Visit https://fred.stlouisfed.org/
- Create free account
- Request API key in account settings
- Add to
.envfile
Try these steps:
-
Update pip:
python -m pip install --upgrade pip
-
Install dependencies one by one:
pip install pandas numpy scikit-learn pip install torch pip install dash plotly dash-bootstrap-components
-
Check Python version:
python --version # Should be 3.8+ -
Use virtual environment:
python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # Linux/Mac
- Launch dashboard:
python funda/SPS.py - Open browser: http://127.0.0.1:8050/
- Enter ticker symbol (e.g., TSLA)
- Click "🚀 Run Prediction"
- Wait 10-30 seconds
- Analyze results!
The confidence score (0-100%) indicates:
- 80-100%: High confidence - strong signal
- 60-79%: Medium confidence - moderate signal
- Below 60%: Low confidence - weak signal
It's calculated from:
- Model prediction variance
- Historical accuracy
- Feature quality
- Market volatility
An outlier is a stock that shows statistically unusual performance compared to peers:
- High Z-score: Performance significantly above average
- Volume anomalies: Unusual trading activity
- Momentum: Strong price movement
Outliers may indicate:
- Emerging trends
- Institutional interest
- Market inefficiencies
- Potential opportunities (or risks!)
| Strategy | Best For | Timeframe | Risk Level |
|---|---|---|---|
| Scalp | Day trading | Minutes to hours | High |
| Swing | Short-term trades | Days to weeks | Medium |
| Long-term | Position trading | Weeks to months | Lower |
- Daily traders: Refresh every morning
- Swing traders: 2-3 times per week
- Long-term: Once a week
- Automatic: Enable background refresh in settings
- Check
.envfile exists in project root - Verify format:
ALPHA_VANTAGE_API_KEY=your_key_here - No quotes around the key
- No spaces before/after the
= - Restart the application
Possible causes:
- Ticker symbol is incorrect
- Stock is delisted or suspended
- API rate limit reached (wait 1 minute)
- Stock has insufficient history
- Network connectivity issues
-
Check if another app is using port 8050:
# Windows netstat -ano | findstr :8050 # Linux/Mac lsof -i :8050
-
Change port in
SPS.py:app.run_server(debug=True, port=8051) # Use different port
-
Clear browser cache
-
Try a different browser
Remember:
- Market prediction is inherently uncertain
- Check confidence score
- Consider market conditions
- Verify data quality
- This is not financial advice!
Improve accuracy by:
- Training model on more data
- Using ensemble predictions
- Combining with technical analysis
- Adjusting strategy parameters
- Close all running instances of BILLIONS
- Check for zombie processes:
# Windows tasklist | findstr python # Linux/Mac ps aux | grep python
- Delete database lock file (if safe):
rm billions.db-journal
-
Use GPU (if available):
- Install CUDA-enabled PyTorch
- Training speedup: 10-20x
-
Increase cache duration:
- Edit cache settings in code
- Trade-off: Speed vs. freshness
-
Reduce prediction horizon:
- Change from 30 days to 7 days
- Faster computation
-
Limit technical indicators:
- Comment out unused indicators
- Reduce feature engineering time
Not recommended due to:
- API rate limits
- Database lock conflicts
- Memory usage
Best practice: Queue predictions sequentially
- Installation: ~500MB (dependencies)
- Cache: ~100MB (grows over time)
- Database: ~10-50MB (grows with use)
- Models: ~10MB
- Total: 1-2GB recommended
Yes! Edit funda/enhanced_features.py:
def compute_custom_indicator(df):
"""Your custom indicator"""
df['Custom'] = df['Close'].rolling(20).mean()
return dfYes! Edit funda/train_lstm_model.py:
hidden_layer_size = 150 # Default: 100
num_layers = 3 # Default: 2
dropout = 0.3 # Default: 0.2Partial support:
- Works with crypto tickers on Yahoo Finance (BTC-USD, ETH-USD)
- Dedicated crypto strategy in development
- Some indicators may not apply to 24/7 markets
See CONTRIBUTING.md for detailed guidelines:
- Report bugs
- Suggest features
- Submit pull requests
- Improve documentation
- Share your strategies!
- Check if it's already reported in Issues
- Create new issue with:
- Clear description
- Steps to reproduce
- Expected vs. actual behavior
- System information
- Error messages
Absolutely! Edit funda/outlier_engine.py:
STRATEGIES["custom"] = ("period", "window", days, lookback, min_cap)MIT License - you can:
- Use commercially
- Modify
- Distribute
- Use privately
Must:
- Include license and copyright notice
- Provide source code attribution
Yes, but:
- Comply with financial regulations in your jurisdiction
- Understand this is NOT regulated financial advice
- Seek legal counsel if needed
- Use at your own risk
Legally complex:
- May require financial licenses
- Subject to securities regulations
- Consult legal/financial professionals
- We assume no liability
- Documentation: Start with README.md
- Quick Start: See QUICKSTART.md
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Join us on:
- GitHub Discussions (primary)
- Twitter: @BillionsML (coming soon)
- Discord: (coming soon)
Contact us via:
- Email: your.email@example.com
- GitHub: Open an issue
- LinkedIn: (your profile)
Planned features:
- Real-time WebSocket data feeds
- Cryptocurrency dedicated module
- Mobile app
- Advanced backtesting framework
- Portfolio optimization
- Sentiment analysis integration
- Options pricing models
- Multi-asset correlation
See CHANGELOG.md for details.
Still have questions? Open an issue on GitHub! 💬