Skip to content

Latest commit

ย 

History

History
146 lines (81 loc) ยท 3.52 KB

File metadata and controls

146 lines (81 loc) ยท 3.52 KB

Bitcoin Price Predictor ๐Ÿ”ฎ

A machine learning web application that predicts Bitcoin price movements using Wikipedia sentiment analysis and technical indicators.

Features

  • Real-time Bitcoin price predictions
  • Wikipedia edit sentiment analysis
  • Automated daily model updates
  • Web interface for easy access
  • Confidence scoring

How It Works

  1. Analyzes Wikipedia Bitcoin page edits for sentiment
  2. Processes Bitcoin price data and technical indicators
  3. Uses XGBoost machine learning model
  4. Predicts next-day price movement (UP/DOWN)

Local Development

1. Clone the repository

git clone https://github.com/AlhassenSabeeh/bitcoin_predictor.git cd bitcoin_predictor

2. Create and activate virtual environment

python -m venv myenv source myenv/bin/activate

3. Install requirements

pip install -r requirements.txt

4. Update data and run the application

python update_data.py

after run python update_date.py, the following shoud be apearded in the terminal

๐Ÿš€ BITCOIN PREDICTOR - DATA UPDATE TOOL

============================================================

๐Ÿ• Update started at: 2025-11-16 20:33:31

๐Ÿ” Checking system dependencies

โœ… Basic dependencies check passed

==================================================

๐Ÿ“Š WIKIPEDIA SENTIMENT DATA UPDATE

==================================================

No model was supplied, defaulted to distilbert/distilbert-base-uncased-finetuned-sst-2-english and revision 714eb0f

(https://huggingface.co/distilbert/distilbert-base-uncased-finetuned-sst-2-english).

Using a pipeline without specifying a model name and revision in production is not recommended.

Device set to use cpu

โœ… Sentiment analysis pipeline loaded successfully

๐Ÿš€ Starting Wikipedia sentiment analysis pipeline...

๐Ÿ“ฅ Fetching Wikipedia Bitcoin page edits...

โœ… Fetched 18069 Wikipedia revisions

๐Ÿง  Analyzing sentiment of Wikipedia edits...

๐Ÿ“Š Found 16738 valid sentiment scores out of 18069 revisions

โœ… Analyzed sentiment for 2799 days with 16738 valid scores

โœ… Sentiment analysis complete. File saved as 'wikipedia_edits.csv'

โœ… Wikipedia data update completed successfully

  • Data points: 5746
  • Date range: 2010-02-23 00:00:00 to 2025-11-16 00:00:00

==================================================

๐Ÿค– BITCOIN PREDICTION MODEL UPDATE

==================================================

๐Ÿš€ Starting Bitcoin prediction pipeline...

๐Ÿ“Š Loading Bitcoin price data from Yahoo Finance...

โœ… Loaded 4079 days of Bitcoin data (up to 2025-11-16 00:00:00)

๐Ÿ”„ Merging price data with Wikipedia sentiment...

โœ… Loaded sentiment data for 5746 days

โœ… Successfully merged price and sentiment data

โš™๏ธ Creating technical features...

โœ… Created 15 features across 4 time horizons

๐Ÿค– Training XGBoost model...

๐Ÿ“ˆ Training on 4079 samples with 15 features...

โœ… Model training complete and saved

๐ŸŽฏ Prediction: DOWN (Confidence: 61.15%)

โœ… Prediction pipeline complete!

โœ… Bitcoin model update completed successfully

  • Features used: 15
  • Training date: 2025-11-16T20:55:50.637579

========================================

๐Ÿ“‹ UPDATE SUMMARY

========================================

๐Ÿ• Started: 2025-11-16 20:33:31

๐Ÿ• Finished: 2025-11-16 20:55:50

โฑ๏ธ Duration: 1338.87 seconds

๐ŸŽฏ PREDICTION RESULTS:

Next day prediction: DOWN

Confidence: 61.15%

Current Price: $94,127.77

UP Probability: 38.849998474121094%

DOWN Probability: 61.150001525878906%

Model Training: 2025-11-16

โœ… Update process completed!