A Psychedelic Cosmic Fortune Teller of AI-Powered Crypto Analytics, Advanced Modeling & Forecasting
โจ Peer into the misty future of cryptocurrency prices with advanced machine learning, real-time data, and deep technical analysis. โจ
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.
- 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).
- 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.
- 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.
- 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.
- 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 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).
- ๐ 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.
This masterpiece of crypto-analytical software was conjured by Pelle Nyberg at Corax CoLAB.
Visionary Software Engineer & Crypto Analyst
Innovating the Digital Frontier
Empowering traders and developers with cutting-edge tools and futuristic insights.
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.
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.
- 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
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)
- ๐ 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.
git clone https://github.com/PelleNybe/CryptoPsFortuneTeller.git
cd CryptoPsFortuneTeller
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateFor 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 .envpip install -r requirements.txtVerify your environment and API connectivity:
python3 health_check.py
python3 -m pyteststreamlit run streamlit_app/cryptop_crypto_fortune_teller_main.pyThis 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.
We love contributions from the community! Whether it's fixing bugs, adding new features, or improving documentation, your help is welcome.
- Read our Contributing Guidelines to learn how to get started.
- Review our Code of Conduct to understand the standards for participating in our community.
- Check our Security Policy if you need to report a vulnerability privately.
If you like the project, please consider giving it a โญ Star, sharing it with your friends, or Forking it to make your own changes!



