This project focuses on predicting the closing prices of the BTC/USDT cryptocurrency pair using machine learning techniques. It involves data preprocessing, feature extraction, model training, and visualization of the results. Additionally, it includes pattern recognition in candlestick charts to provide more insightful predictions.
- Project Overview
- Data Description
- Exploratory Data Analysis (EDA)
- Model Training
- Prediction and Evaluation
- Visualization
- How to Run
- Dataset Links
- Contributors
- License
The goal of this project is to predict the next closing price of the BTC/USDT pair on Binance using historical minute-by-minute data. The project also identifies specific candlestick patterns like Hammer, Doji, and Engulfing patterns to generate buy/sell signals, making the prediction model more robust.
The project uses minute-level data from the Binance BTC/USDT trading pair. The datasets include the following features:
date: The timestamp of the data.open: Opening price of the minute.high: Highest price of the minute.low: Lowest price of the minute.close: Closing price of the minute.Volume BTC: Volume in BTC traded during the minute.Volume USDT: Volume in USDT traded during the minute.tradecount: Number of trades executed during the minute.
Before model training, an extensive EDA is conducted to understand the data better. Key steps include:
- Data Cleaning: Conversion of date strings to datetime objects and handling missing data.
- Statistical Summary: Summary statistics of the numerical columns.
- Visualization: Distribution plots of the closing prices, volumes, and a correlation heatmap of the key features.
The model used for price prediction is a Random Forest Regressor. The features include:
- OHLCV data:
open,high,low,close,Volume BTC,Volume USDT. - Candlestick patterns:
hammer,doji,shooting_star,bullish_engulfing,bearish_engulfing. - Trend indicator: A column indicating the trend of the market.
Cross-validation is performed with a parameter grid to fine-tune the model's performance.
After training the model, predictions are made on the test set. The model's performance is evaluated using metrics like Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and R-Squared (R2).
To provide more context to the predictions, the project includes visualizations of candlestick charts with annotated patterns and predictions:
- Candlestick Chart with Predicted Close Prices: Shows the actual and predicted close prices on the candlestick chart.
- Candlestick Chart with Pattern Annotations: Visualizes specific patterns like Hammer, Doji, etc., and their corresponding buy/sell signals.
- Clone the repository:
git clone https://github.com/your_username/crypto-price-prediction.git
- Install the required dependencies:
pip install -r requirements.txt
- Run the Jupyter notebook or Python script for EDA, model training, and evaluation.
The datasets used in this project can be downloaded from the following links:
- Love(https://github.com/lovek28)
- Aniket Gupta(https://github.com/aniketgupta97)
- Abhishek Trivedi(https://github.com/abhishek221188)
- Darshan Patel(https://github.com/drp7122000)




