Authors: Esteban Nabonne & Hadrien Dejonghe
Course: Big Data Analytics - ESIEE 2025
An end-to-end PySpark pipeline to predict Bitcoin price movements using market data and blockchain activity proxies.
This project includes a One-Shot Runner for full reproducibility.
-
Install Dependencies:
pip install pyspark pandas yfinance pyarrow pyyaml
-
Fetch Data: Downloads market data and generates the blockchain proxy dataset.
python3 fetch_data.py
-
Run Pipeline: Executes Ingestion, ETL, Training, and Evaluation.
./run_local.sh
- Path:
data/prices/btc_1h_data_2018_to_2025.csv - Description: 1-minute OHLCV candles aggregated to 1-hour.
- Source: Kaggle / Public Crypto Datasets.
- Path:
data/blockchain/btc_blockchain_hourly_shifted.parquet - Method: Generated via
fetch_data.pyusing Yahoo Finance API. - Rationale: Proxies on-chain activity using Trading Volume to bypass the need for a 500GB Full Node synchronization.
- Archive:
data/btc_blocks_pruned_1GiB.tar.gz(Not included in Git due to size). - Live Folder:
data/blocks/blocks/ - Parser:
src/decode_blocks.pyis provided to demonstrate capability to parse raw.datBitcoin Core files. - Usage: Run
python3 decode_blocks.py --input-dir data/blocks/blocks --output data/blockchain/debug.parquetto verify.
- Metrics:
output/metrics.csvcontains the final Accuracy and AUC scores. - Logs:
output/logs/(if enabled) or Console Output. - Spark Evidence: See
evidence/folder for:spark_dag.png: The SQL execution plan graph.spark_jobs.png: Timeline of Spark stages.explain_plan.txt: Textual representation of the physical plan (explain("formatted")).
- Code: MIT License.
- Data (Yahoo Finance): Used via
yfinancelibrary for educational purposes. - Data (Bitcoin Core): Raw block format follows the Bitcoin Protocol specification (MIT).
- Spark: Apache License 2.0.