Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

296 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Crypto P's Crypto Fortune Teller Logo

๐Ÿ”ฎ Crypto P's Crypto Fortune Teller ๐Ÿ”ฎ

A Psychedelic Cosmic Fortune Teller of AI-Powered Crypto Analytics, Advanced Modeling & Forecasting


Python Version Streamlit App License: MIT Security: Checked CI PRs Welcome


Launch App



Crypto Animation

โœจ Peer into the misty future of cryptocurrency prices with advanced machine learning, real-time data, and deep technical analysis. โœจ


๐ŸŒŒ Discover the Future of Trading

Welcome to Crypto P's Crypto Fortune Teller, an interactive, stunningly designed Streamlit application that empowers you to peer into the misty future of cryptocurrency prices. By leveraging advanced machine learning models (Prophet, LSTM, ARIMA, Random Forest) and real-time data from CoinGecko, CCXT Exchanges, and Freqtrade, this tool provides price forecasts, deep technical analysis, strategy backtesting, and comprehensive market insights.


๐Ÿš€ Recent Enhancements


  • Robust API Session Management: Implemented a robust `requests.Session` with retry logic and exponential backoff for PyCoinGecko to handle rate limits and transient network errors (Technical Improvement).
  • Memory Optimization via Downcasting: Automatically downcasts historical dataframes (`float64` to `float32`) to reduce memory footprint, especially crucial for large batch historical data fetching (Technical Improvement).
  • Auto-ARIMA Model Selection: Integrated automated hyperparameter grid-search for the ARIMA model to dynamically select the optimal `(p, d, q)` order based on AIC score (Technical Improvement).
  • CCXT L2 Order Book Integration: Added L2 Order Book depth fetching capabilities to the `ExchangeManager` for real-time liquidity and bid-ask analysis (Technical Improvement).
  • Secure Credential Management (Session Vault): Utilized Streamlit's `st.cache_resource` and session UUIDs to securely store sensitive API credentials for CCXT Exchanges and Freqtrade bots (Technical Improvement).
  • Dynamic Scrolling Ticker Tape: Implemented a CSS-animated ticker tape displaying live top gainers and losers in the main UI (Visual Improvement).
  • Psychedelic Cosmic Theme Styling: Enforced a deep purple/black neon aesthetic with custom Google Fonts (`Rye`, `Cinzel`, `Quicksand`, `Orbitron`) and glassmorphism elements (Visual Improvement).
  • Enhanced Fear & Greed Gauge: Upgraded the Fear & Greed index display with an interactive Plotly Gauge chart (Visual Improvement).
  • Hierarchical Portfolio Allocation: Replaced the standard pie chart with a dynamic Plotly Sunburst chart for visualizing portfolio composition and PnL simultaneously (Visual Improvement).
  • Custom Trading Signal Badges: Designed styled HTML/CSS badges for "Buy/Sell/Hold" signals, dynamically colored based on model ensemble projections (Visual Improvement).

๐Ÿง  AI-Powered Forecasting


  • Prophet Model: Utilizes Facebook's Prophet model for accurate time-series forecasting, capturing seasonality and trends with confidence intervals.
  • LSTM Networks: Deploys Long Short-Term Memory (Recurrent Neural Network) models to detect complex patterns in price sequences.
  • Ensemble Projections: 30-day ensemble forecast to estimate the future value of specific assets in your portfolio.
  • Random Forest & ARIMA: Advanced statistical and ensemble methods for comprehensive price prediction.
  • Customizable Horizon: Forecast up to 365 days into the future (capped for performance).
  • Monte Carlo Simulations: Geometric Brownian Motion model for probabilistic price paths.
  • Hyperparameter Auto-Tuning: Automated grid-search CV for finding optimal Prophet parameters.

๐Ÿ“ˆ Advanced Technical Analysis


  • Interactive Candlestick Charts: Zoom, pan, and analyze price action across multiple timeframes.
  • Rich Indicator Suite: SMA Ribbon, Bollinger Bands, Ichimoku Cloud, Fibonacci Levels, Pivot Points.
  • Oscillators & Momentum: RSI, Stochastic Oscillator, MACD, CCI, ADX, VWAP, Parabolic SAR.
  • Sentiment: Real-time gauge of market sentiment via Fear & Greed Index.

๐Ÿค– Automated Trading & Exchanges


  • CCXT Integration: Direct connectivity to Bitget, Gate, Bybit, OKX, KuCoin, and Binance.
  • Freqtrade Bot Manager: Seamlessly monitor and control your Freqtrade bot instance via direct API calls.
  • Live Order Books & Volume: Real-time data from major centralized exchanges.

๐Ÿงช Strategy Backtesting


  • Simulation Engine: Test trading strategies against historical data (e.g., SMA Crossover, RSI Mean Reversion, Bollinger Squeeze, MACD Crossover).
  • Performance Metrics: View Total Return, Market Return, Alpha, Equity Curves, and Risk assessment.

๐Ÿ’ผ Portfolio & Market Tools


  • Portfolio Tracker: Monitor your holdings, track PnL, view allocation pie charts, and project future wealth.
  • Advanced Risk Metrics: Calculate Sharpe Ratio, Sortino Ratio, and Max Drawdown for your portfolio.
  • Market Heatmap: Visualize the top 50 coins by market cap using an interactive Treemap.
  • Smart Calculators: DCA, ROI, "Moon Math", Risk/Reward planning, and Black-Scholes Options Pricing.
  • Order Book Depth: Fetch real-time L2 order books via CCXT and visualize bid-ask imbalances.
  • Social Intel: Developer activity (GitHub) and community sentiment (Reddit/Twitter).

๐Ÿ’Ž Alpha Insights: Institutional-Grade Intelligence


  • ๐Ÿ‹ On-Chain Whale Tracker & Anomaly Detection: Detect anomalous volume spikes indicative of institutional or whale accumulation/distribution.
  • ๐ŸŒพ DeFi Yield Farming Scanner: Real-time APY and TVL from major DeFi protocols to identify the most lucrative yield opportunities (Powered by DefiLlama).
  • ๐Ÿ“ฐ AI Sentiment & News NLP Analysis: Aggregates recent crypto news and performs Natural Language Processing (NLP) sentiment analysis to gauge market mood.
  • ๐Ÿ’ฑ Advanced Arbitrage Matrix & Liquidity Heatmap: Visualizes cross-exchange spread matrices to highlight high-frequency trading arbitrage opportunities across 7+ top-tier exchanges.
  • ๐Ÿ“‰ Tokenomics & Unlocks Dashboard: Tracks circulating supply, max supply constraints, and emission metrics to predict supply-side pressure.


๐Ÿ“ธ A Glimpse into the Magic

Dashboard View Technical Analysis
Machine Learning Models Portfolio Management


๐Ÿ‘จโ€๐Ÿ’ป Meet the Mastermind

This masterpiece of crypto-analytical software was conjured by Pelle Nyberg at Corax CoLAB.

Pelle Nyberg

Pelle Nyberg

Visionary Software Engineer & Crypto Analyst

GitHub LinkedIn Portfolio Crypto P App



Corax CoLAB

Innovating the Digital Frontier

Corax CoLAB



Empowering traders and developers with cutting-edge tools and futuristic insights.


๐ŸŽจ A Psychedelic Cosmic Fortune Teller Theme

The UI enforces a 'Psychedelic Cosmic Fortune Teller' theme, utilizing dark-themed neon accents, deep purple/black radial gradients, and custom Google Fonts (Rye, Cinzel, Quicksand, Orbitron). Itโ€™s an immersive, trippy, yet highly professional analytics experience that transports you to another dimension while keeping you grounded in solid data.


๐Ÿ›ก๏ธ Enterprise-Grade Security & Architecture

We take security seriously. This application includes:

  • ๐Ÿ”’ XSS & SSRF Protection: Automated AST-based XSS scanners and strict URL validators.
  • ๐Ÿ—„๏ธ Session Vault: Secure server-side caching of sensitive credentials (Exchange/Freqtrade keys).
  • โšก Tiered Bucket Caching: Optimized API calls via Streamlit @st.cache_data.
  • ๐Ÿงช Rigorous Test Suite: Over a dozen test files covering backtesting, ML models, ensemble logic, API endpoints, and security configurations.

๐Ÿ› ๏ธ Tech Stack & Dependencies


Streamlit Python Pandas Numpy Plotly TensorFlow Scikit-Learn
  • Frontend & Framework: Streamlit
  • Data & Math: Pandas, NumPy (>=1.25.0,<2.0.0)
  • Visualization: Plotly
  • Machine Learning: Facebook Prophet, TensorFlow/Keras (LSTM), Scikit-Learn, Statsmodels
  • Crypto & APIs: PyCoinGecko, CCXT (Exchanges), Requests

๐Ÿ“‚ Project Structure Snapshot


CryptoPsFortuneTeller/
โ”œโ”€โ”€ streamlit_app/
โ”‚   โ”œโ”€โ”€ assets/
โ”‚   โ”‚   โ”œโ”€โ”€ logo.png               # App logo
โ”‚   โ”‚   โ””โ”€โ”€ crypto.gif             # Animation
โ”‚   โ”œโ”€โ”€ modules/
โ”‚   โ”‚   โ”œโ”€โ”€ cryptop_crypto_fortune_teller_helper.py  # Indicators, Data fetching
โ”‚   โ”‚   โ”œโ”€โ”€ cryptop_crypto_fortune_teller_models.py  # Prophet, LSTM, ARIMA, RF
โ”‚   โ”‚   โ”œโ”€โ”€ cryptop_crypto_fortune_teller_styles.py  # Psychedelic CSS Theme
โ”‚   โ”‚   โ”œโ”€โ”€ exchange_manager.py                      # CCXT Connectivity
โ”‚   โ”‚   โ””โ”€โ”€ freqtrade_manager.py                     # Freqtrade API control
โ”‚   โ””โ”€โ”€ cryptop_crypto_fortune_teller_main.py      # Entry point
โ”œโ”€โ”€ benchmarks/                    # Performance benchmarking (LSTM, Prophet, Caching)
โ”œโ”€โ”€ tests/                         # Extensive Pytest & Unittest suite
โ”œโ”€โ”€ health_check.py                # Environment & API validation
โ””โ”€โ”€ requirements.txt               # Pinned dependencies (e.g. numpy<2.0.0)

๐Ÿ’Ž Alpha Insights: Institutional-Grade Intelligence


  • ๐Ÿ‹ On-Chain Whale Tracker & Anomaly Detection: Detect anomalous volume spikes indicative of institutional or whale accumulation/distribution.
  • ๐ŸŒพ DeFi Yield Farming Scanner: Real-time APY and TVL from major DeFi protocols to identify the most lucrative yield opportunities (Powered by DefiLlama).
  • ๐Ÿ“ฐ AI Sentiment & News NLP Analysis: Aggregates recent crypto news and performs Natural Language Processing (NLP) sentiment analysis to gauge market mood.
  • ๐Ÿ’ฑ Advanced Arbitrage Matrix & Liquidity Heatmap: Visualizes cross-exchange spread matrices to highlight high-frequency trading arbitrage opportunities across 7+ top-tier exchanges.
  • ๐Ÿ“‰ Tokenomics & Unlocks Dashboard: Tracks circulating supply, max supply constraints, and emission metrics to predict supply-side pressure.


โš™๏ธ Installation & Local Development

1. Clone & Setup

git clone https://github.com/PelleNybe/CryptoPsFortuneTeller.git
cd CryptoPsFortuneTeller
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Environment Variables

For local development, copy the .env.example file to .env and configure your API keys (optional, as the UI currently prompts for credentials).

cp .env.example .env

2. Install Dependencies

pip install -r requirements.txt

3. Run Health Check & Tests

Verify your environment and API connectivity:

python3 health_check.py
python3 -m pytest

4. Launch the Fortune Teller

streamlit run streamlit_app/cryptop_crypto_fortune_teller_main.py

โš ๏ธ Disclaimer

This application is for educational and entertainment purposes only.

The price forecasts, backtests, and technical analysis provided by this tool are based on historical data and machine learning algorithms, which cannot predict the future with certainty. Cryptocurrency markets are highly volatile. This is not financial advice. Always conduct your own research and never invest more than you can afford to lose.


๐Ÿค Community & Contributing

We love contributions from the community! Whether it's fixing bugs, adding new features, or improving documentation, your help is welcome.

If you like the project, please consider giving it a โญ Star, sharing it with your friends, or Forking it to make your own changes!


Built with โค๏ธ by Pelle Nyberg & Corax CoLAB

ยฉ 2024 Corax CoLAB. All rights reserved.

About

๐Ÿ”ฎ Crypto P's Crypto Fortune Teller โ€“ A psychedelic cosmic circus of AI-powered analytics by Corax CoLAB. Predict the future with Prophet, LSTM, and ARIMA models. Features real-time CCXT exchange integration, Freqtrade bot control, strategy backtesting, and a stunning neon-dark Streamlit UI.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages