Skip to content

tanvirhasan2019/crypto-price-prediction

Repository files navigation

BTC Price Prediction using LSTM

This project predicts future Bitcoin (BTC) prices using a Long Short-Term Memory (LSTM) neural network. The model is trained on historical BTC price data fetched from the CoinGecko API. It can predict BTC prices for the next 10 days (hourly predictions).

Project Overview

  • Fetch BTC Data: Historical BTC prices are fetched from the CoinGecko API.
  • Preprocess Data: The data is normalized and split into training and testing sets.
  • Build and Train Model: An LSTM model is trained on the preprocessed data.
  • Predict Future Prices: The model predicts future BTC prices for the next 10 days.
  • Visualization: The historical, validation, and predicted future prices are plotted for visualization.

Requirements

  • Python 3.6+
  • TensorFlow 2.x
  • Pandas
  • NumPy
  • scikit-learn
  • Matplotlib
  • Requests

Installation

  1. Clone this repository:
    git clone https://github.com/tanvirhasan2019/crypto-price-prediction.git
    cd btc-price-prediction
    
  2. Install the required packages:
    pip install -r requirements.txt
    
    

Usage

  1. Run the Script:
    python btc_price_prediction.py
    
  2. View the Output: The script will fetch the latest BTC data, train the LSTM model, and display the historical and predicted prices in a plot.

Example Output

Here's an example of the prediction output generated by the model: Example Output

Project structure

├── crypto_price_prediction.py  # Main script for training and predicting BTC prices
├── crypto_price_prediction.ipynb  # Main script for training and predicting BTC prices
├── README.md                # Project documentation
├── requirements.txt         # List of required Python packages
└── sample_output.png        # Example output image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published