Skip to content

BenjaminTia/UltronCryptoAIOracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Ultron Oracle

Cryptocurrency Price Predictor with Animated ASCII Ultron Head

A terminal-based Bitcoin price prediction tool featuring an animated ASCII Ultron head, real-time market data, technical indicators, and neural network-powered predictions.

Python License

✨ Features

  • 📊 Real-Time Market Data - Live Bitcoin prices from CoinGecko API
  • 🧠 Neural Network - Custom 3-layer neural network for price prediction
  • 📈 Technical Indicators - RSI, MACD, and Bollinger Bands
  • ⏱️ Multi-Timeframe Predictions - 1 hour, 24 hours, and 7 days forecasts
  • 👤 Animated ASCII Ultron - Iconic Ultron head with moving mouth animation
  • 🎨 Colorful Terminal UI - Beautiful ANSI-colored display
  • 🔊 Sound Effects - Generated audio feedback (optional)
  • 💾 Persistent Model - Saves and loads trained model weights

🖥️ Screen Layout

╔═══════════════════════════════════════════════════════════╗
║  U L T R O N   O R A C L E                                ║
╚═══════════════════════════════════════════════════════════╝

┌─────────────────────┬─────────────────────────────────────┐
│   [ULTRON HEAD]     │   PREDICTION TIMELINE               │
│   (animated mouth)  │   ▼ 1 Hour:  $65,800 (-3%)          │
│                     │   ▲ 24 Hours: $76,012 (+12%)        │
│   [SPEECH BUBBLE]   │   ▼ 7 Days:  $57,688 (-15%)         │
├─────────────────────┤                                     │
│   PRICE CHART       ├─────────────────────────────────────┤
│   $70,900 ─        │   INDICATORS                        │
│   $69,550 ─┤  ████  │   RSI: 84.6 (Overbought)            │
│   $68,200 ─┤██    ██│   MACD: 520                         │
│            └───────  │   BB: $65,711 - $68,166             │
├─────────────────────┤   Confidence: 63%                   │
│   TERMINAL          │                                     │
│   > 1h: $65,832     │                                     │
│   > 24h: $76,012    │                                     │
│   > Complete!       │                                     │
└─────────────────────┴─────────────────────────────────────┘

🚀 Quick Start

Prerequisites

  • Python 3.7 or higher
  • pip package manager

Installation

  1. Clone the repository

    git clone https://github.com/BenjaminTia/ultron_oracle.git
    cd ultron_oracle
  2. Install dependencies

    pip install -r requirements.txt
  3. Run the application

    python main.py

Controls

  • Ctrl+C - Exit the application

📦 Dependencies

Package Version Purpose
numpy >=1.24.0 Neural network computations
requests >=2.28.0 API data fetching
pygame >=2.5.0 Sound effects (optional)

🧠 Neural Network Architecture

Input Layer (8 features)
    ↓
Hidden Layer 1 (24 neurons, ReLU)
    ↓
Hidden Layer 2 (24 neurons, ReLU)
    ↓
Output Layer (3 predictions)

Input Features

  1. Price return (1-period)
  2. Normalized RSI
  3. Normalized MACD
  4. Bollinger Band position
  5. Momentum indicator
  6. Volatility measure
  7. Trend indicator
  8. Long-term return

Output Predictions

  1. 1-hour price target
  2. 24-hour price target
  3. 7-day price target

📊 Technical Indicators

Indicator Description Parameters
RSI Relative Strength Index 14-period
MACD Moving Average Convergence Divergence 12/26 EMA
Bollinger Bands Volatility bands 20-period, 2σ

🗂️ Project Structure

ultron_oracle/
├── main.py              # Main application
├── test.py              # Test suite
├── requirements.txt     # Python dependencies
├── README.md           # This file
└── data/
    ├── ultron_model.npz    # Trained model weights
    ├── price_history.json  # Historical price data
    ├── model.npz           # Backup model
    └── model_weights.npz   # Additional weights

⚙️ Configuration

Edit main.py to customize:

# Data storage
DATA_DIR = Path(__file__).parent / "data"
MODEL_FILE = DATA_DIR / "ultron_model.npz"
PRICE_FILE = DATA_DIR / "price_history.json"

# Neural Network parameters (in NeuralNetwork class)
inp=8   # Input features
hid=24  # Hidden neurons
out=3   # Output predictions

# Training parameters (in analyze function)
base_epochs = 200
max_epochs = 500
learning_rate = 0.008

🔊 Sound Effects

Sound effects are optional and require pygame. The app will run without them if pygame is unavailable.

Sounds include:

  • Startup sequence - Ascending tones on launch
  • Thinking sounds - Random tones during training
  • Completion chime - Success sequence when done

📝 Data Source

  • Primary: CoinGecko API (free, no API key required)
  • Fallback: Local historical data
  • Update frequency: Each session fetches fresh data

🛠️ Troubleshooting

Unicode Display Issues (Windows)

If you see garbled characters, run in a UTF-8 compatible terminal:

chcp 65001
python main.py

API Connection Failed

The app will automatically fall back to historical data if the API is unavailable.

Sound Not Working

Sound is optional. The app works without pygame installed.

📈 Performance Notes

  • First run: Downloads fresh data and trains model (~30 seconds)
  • Subsequent runs: Loads saved model (faster startup)
  • Model improves with each launch (more training epochs)

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Disclaimer

This is for educational and entertainment purposes only.

  • Not financial advice
  • Do not use for actual trading decisions
  • Cryptocurrency investments are risky
  • Past performance does not guarantee future results

🙏 Acknowledgments

  • CoinGecko for free crypto API
  • Ultron character inspiration (Marvel)
  • Terminal UI inspiration from classic ASCII art

📧 Contact

Have questions or suggestions? Open an issue on GitHub!


"I am Ultron. The market cannot hide from me." 🤖

About

A terminal-based Bitcoin price prediction tool featuring an animated ASCII Ultron head, real-time market data, technical indicators, and neural network-powered predictions.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages