Skip to content

lancejepsen/ML_Crypto_Price_Predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💜 ML Crypto Analyzer

⚡ Hybrid AI Crypto Forecasting Engine (LSTM + RandomForest)

Author: Lance Jepsen
License: GPL-3.0
Status: Actively Maintained
Tech Stack: Python · Streamlit · TensorFlow · Scikit-Learn · Plotly · CoinGecko API



🌌 Overview

The ML Crypto Analyzer is an ML-driven crypto forecasting dashboard.
It combines modern machine learning models with real-time market data to produce a visually stunning, multi-panel trading interface.

This project implements:

  • 🔮 Hybrid forecasting using RandomForestRegressor + an LSTM volatility model
  • 📈 Chart overlays with AI confidence cones
  • 🔍 RSI & MACD indicators
  • 🤖 AI-generated BUY / SELL / HOLD signals
  • ML training spinner for user transparency
  • 🎨 Custom cyberpunk visual theme
  • 🪙 Top 30 cryptocurrencies (non-stablecoins)

If you want a GitHub project that showcases machine learning, data visualization, real-time APIs, and UI design, this is the perfect portfolio-ready app.


🚀 Features

🟣 Machine Learning

  • Hybrid ML engine:
    • RandomForestRegressor predicts OHLC next-step prices
    • LSTM predicts volatility & drives confidence cone width
  • Forecast horizon: 5–50 minutes
  • Timestamp normalization for reliable model training
  • Automatic RF-only fallback when LSTM data is insufficient

🟣 Charting System

  • Multi-panel layout:
    • Panel 1 — Price chart + forecast candles + confidence cones
    • Panel 2 — RSI (fully isolated)
    • Panel 3 — MACD (fully isolated)
  • Neon color palette
  • Auto-expands for long forecasts

🟣 Technical Indicators

  • RSI (with boundary protection)
  • MACD Line
  • Signal Line
  • Histogram

🟣 AI Buy/Sell Signal

A custom AI scoring engine that evaluates:

  • RSI
  • MACD crossovers
  • Histogram momentum
  • Short-term trend direction

Outputs:

  • 🟢 BUY
  • 🔴 SELL
  • 🟡 HOLD

🟣 API Integration

  • Real-time price data via CoinGecko API
  • Top 30 cryptocurrencies by market cap (excluding stablecoins)

🟣 User UX

  • ML loading spinner
  • Responsive layout
  • Error handling
  • Streamlit caching for performance

🪙 Supported Cryptocurrency List

(No stablecoins, no duplicates, ML-compatible)

bitcoin ethereum binancecoin solana ripple dogecoin cardano tron avalanche-2 shiba-inu polkadot chainlink polygon internet-computer litecoin uniswap near aptos stellar injective-protocol arbitrum hedera-hashgraph cosmos vechain maker the-graph quant-network kaspa optimism mantle

🏗 Architecture

                       ┌───────────────────────────────┐
                       │        CoinGecko API          │
                       └──────────────┬────────────────┘
                                      │
                         Fetch OHLC / Market Data
                                      │
                ┌─────────────────────▼─────────────────────┐
                │             Streamlit App                 │
                │   (UI, controls, tables, multi-panel)     │
                └───────────────┬───────────────────────────┘
                                │
    ┌───────────────────────────┼────────────────────────────┐
    │                           │                            │
    ▼                           ▼                            ▼

Price & Forecast Panel RSI Panel MACD Panel
Plotly Candlesticks + ML (Indicator only) (Indicator only)


AI Buy/Sell Signal Engine


Hybrid ML Forecast Engine
(RandomForestRegressor + LSTM)

🔧 Installation

To install the required dependencies, run the following command in your terminal:

  pip install -r requirements.txt

This will install the necessary packages for the project, including Streamlit, Plotly, Scikit-learn, TensorFlow, and pandas.

▶️ Running the App

To run the application, execute the following command in your terminal:

  streamlit run main.py

Then open:

👉 http://localhost:8501

This will launch the Streamlit app, allowing you to interact with the cryptocurrency forecasting dashboard.

📷 Screenshots

Dashboard

Dashboard

Dashboard

🔍 AI Forecasting Engine Details

🔮 RandomForestRegressor

Used for next-step OHLC prediction.

🔮 LSTM Volatility Predictor

Uses rolling volatility windows to produce smooth cone widths.

🔮 Hybrid Method

RF predicts direction + price LSTM predicts volatility → width of confidence cone

🔁 Fallback Mode

If insufficient data:

LSTM disabled

RandomForest-only forecast

RSI & MACD still displayed

🧪 Requirements

Python 3.10+

TensorFlow 2.11–2.15

Streamlit 1.25+

64-bit OS recommended

Internet connection (CoinGecko API)

🛡 License (GPL-3.0)

This project is licensed under the GNU General Public License v3.0.

You may:

✔ Use ✔ Modify ✔ Share ✔ Redistribute

…but all derivative works must also be:

GPL-3.0 licensed

Properly attributed to Lance Jepsen

Include clear descriptions of changes

Full license: https://www.gnu.org/licenses/gpl-3.0.en.html

💜 Thank you for exploring the ML Crypto Analyzer.

Data. Machine Learning. Real-Time Crypto.

```

✍️ Author

Lance Jepsen
Machine Learning · Automation · Data Engineering Enthusiast & creator of the ML Crypto Analyzer

About

Machine Learning powered crypto forecasting dashboard using LSTM + RandomForest, and real-time market data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages