This project aims to analyze and forecast the future prices of 10 different cryptocurrencies by utilizing historical financial data collected from the Binance API. A web-based interface is developed using Python and Flask to visualize and interact with the predictions.
-
Data Collection
Historical price data for 10 cryptocurrencies were pulled directly from the Binance API and saved as.csvfiles. -
Data Preprocessing
- Handled missing values carefully to ensure data quality
- Calculated and integrated various technical analysis indicators
- Scaled data using
StandardScaler - Prepared time-series input windows for the LSTM model (window size: 21 days)
- Configured forecasting horizon to predict prices 7 days ahead
-
Data Analysis
- Explored price trends, volatility, and correlations
- Visualized data patterns to support model selection
-
Price Forecasting
Applied three regression-based machine learning models to predict future prices:- Linear Regression
- XGBoost Regressor
- LSTM (Long Short-Term Memory) deep learning model
Models were evaluated with metrics including MAE (Mean Absolute Error), RMSE (Root Mean Square Error), and R² Score. The LSTM model showed strong performance in capturing temporal patterns in cryptocurrency prices.
Each dataset contains 6 main features:
| Feature | Description |
|---|---|
| Date | Timestamp of the price record |
| Open | Opening price at the start of period |
| High | Highest price during the period |
| Low | Lowest price during the period |
| Close | Closing price at the end of period |
| Volume | Trading volume in that period |
Datasets are stored in .csv format and enriched with technical indicators during preprocessing.
ADA-USD.csv(Cardano)BNB-USD.csv(Binance Coin)BTC-USD.csv(Bitcoin)DOGE-USD.csv(Dogecoin)DOT-USD.csv(Polkadot)ETH-USD.csv(Ethereum)LINK-USD.csv(Chainlink)LTC-USD.csv(Litecoin)XMR-USD.csv(Monero)SOL-USD.csv(Solana)
A user-friendly web interface is developed with Flask, providing:
- Interactive visualization of actual vs. predicted cryptocurrency prices
- Upload and selection of cryptocurrency datasets
- Easy navigation to explore different cryptocurrencies
The main web page (index.html) is located in the templates/ folder.
| Model | Purpose |
|---|---|
| Linear Regression | Baseline regression model |
| XGBoost Regressor | Handles non-linear relationships |
| LSTM Neural Network | Captures time-series dependencies and trends |
The LSTM model uses a window size of 21 days (LSTM_WINDOW = 21) to look back on historical data and predicts prices 7 days into the future (FUTURE_STEPS = 7).
- Python
- Flask (Web framework)
- Binance API (Data collection)
- Pandas, NumPy (Data manipulation)
- Matplotlib, Seaborn (Visualization)
- Scikit-learn, XGBoost (Machine learning)
- TensorFlow/Keras (Deep learning with LSTM)
- Burak SAYAR – GitHub Profile
- Mert BUYUKNISAN – GitHub Profile
- Rahime GEDİK – GitHub Profile
- Zeynep COL – GitHub Profile
