CryptoPredictor is a machine learning-powered app designed to forecast cryptocurrency prices. Built with Python and Streamlit, it utilises historical data to predict trends for popular cryptocurrencies, empowering users with data-driven insights.
CryptoPredictor is built with the following core frameworks and tools:
Streamlit - To create an intuitive web interface.
Yahoo Finance API (YFinance) - To fetch up-to-date cryptocurrency data.
CoinGecko API - To dynamically fetch the top 2,500 cryptocurrencies by market capitalisation from a pool of 17,061 available tokens, ensuring access to real-time data for popular selections. For an updated list of the 2,500 tickers based on market capitalisation, users can run the Jupyter Notebook available at: CoinGeckoToCsv.ipynb.
LSTM (Long Short-Term Memory) - A neural network model optimised for time-series predictions.
Plotly - To generate dynamic and interactive financial charts.
Pandas - To manipulate and process cryptocurrency datasets.
๐งโ๐ป How It Works
The user selects a cryptocurrency (e.g., BTC, ETH).
Historical price data is retrieved using the Yahoo Finance API.
The LSTM model is trained on the past 60 days of historical data.
Predictions are generated for the next 1โ90 days.
Results are displayed with interactive charts and tables.
โจ Key Features
Real-time cryptocurrency data - Access accurate and up-to-date information.
Interactive charts - View historical trends and future predictions visually.
Custom prediction ranges - Forecast prices for 1 to 90 days.
Downloadable CSV - Save prediction results for further analysis.
User-friendly interface - Accessible for novice and experienced users alike.
Hint: Replace user with josericodata in the URL above. I am deliberately asking you to pause here so you can support my work. If you appreciate it, please consider giving the repository a star or forking it. Your support means a lotโthank you! ๐
Navigate to the repository directory:
cd CryptoPredictor
Create a virtual environment:
python3 -m venv venvCrypto
Activate the virtual environment:
source venvCrypto/bin/activate
Install requirements:
pip install -r requirements.txt
Navigate to the app directory:
cd streamlit_app
Run the app:
streamlit run 00_๐_Info.py
The app will be live at http://localhost:8501
๐ฌ Demo
Crypto Predictor Page:
โถ๏ธ Watch the YouTube Tutorial
Click the image above or here to watch the video on YouTube.
๐ฎ Future Enhancements
Planned improvements and new features include:
Integration of advanced ML models (e.g., Prophet) for better prediction accuracy.
Support for additional cryptocurrencies to expand coverage.
Volatility analysis to measure price swings and potential risks.
User accounts and history tracking for tailored predictions and personalised experiences.
๐ง Environment Setup
The CryptoPredictor app is built and tested using the following software environment:
Operating System: Ubuntu 22.04.5 LTS (Jammy)
Python Version: Python 3.10.12
Ensure your environment matches or exceeds these versions for optimal performance.
๐ Important Notes
CoinGecko API Error 429: If too many requests are made to the URL, the API may block further requests. Please restart or close the app, and try again after a minute or two. The data should then be available.
Using the Crypto Predictor:
Select a cryptocurrency from the dropdown menu.
Choose the desired prediction range using the slider.
Adjust the Epochs slider to set the number of training iterations. Note: Higher epochs result in longer training times but can improve model accuracy.
Click the Run Prediction button to generate results.
๐ค Open Pull Requests
If you find any bug, feel free to contact me by opening a pull request on GitHub or via email at maninastre@gmail.com.
โ ๏ธ Disclaimer
This app is designed to demonstrate my skills in data modeling and analytics, showcasing how data-driven insights can assist in building my portfolio as a data analyst. It is not intended to provide financial advice or investment guidance. The predictions are for illustrative purposes only and should not be relied upon for making financial decisions.