A regression-based time-series project to predict Bitcoin short-term returns using historical market signals and engineered features.
The project focuses on time-series-safe validation, interpretable modeling, and realistic evaluation.
This project explores the question:
Can Bitcoinβs next-day movement be predicted using regression models and time-series features?
Instead of chasing unrealistic βperfect price predictionβ, the project emphasizes:
- Time-series safe validation (preventing data leakage)
- Feature engineering from market signals
- Model comparison with baselines
- Explainable modeling and interpretable results
The model predicts next-day log return.
log_return(t+1) = log( Price(t+1) / Price(t) )
- Bitcoin prices are non-stationary
- Returns provide more stable statistical properties
- Better suited for regression modeling
This project uses Bitcoin historical market data.
- Bitcoin price and trading volume
- Optional macro indicators such as:
- S&P 500 return
- VIX volatility index
- USD index (DXY)
- Interest rate indicators
Raw datasets are not included in this repository.
Results can be reproduced by downloading the same data sources and running the notebook.
Features are designed to capture momentum, trend, and volatility.
- Lagged log returns
- Moving averages (MA7, MA30)
- Rolling volatility (7-day and 30-day standard deviation)
- Momentum indicators
- Volume change rate
- Rolling volume Z-score
- S&P 500 return
- VIX change
- USD index movement
- Interest rate proxy
These signals help capture market dynamics influencing short-term Bitcoin movement.
The modeling pipeline follows a quantitative ML workflow:
Raw Data
β Feature Engineering
β Time-Series Train/Test Split
β Model Training
β Prediction
β Evaluation
Key steps include:
- log-return calculation
- rolling statistical features
- chronological data splitting
- regression model comparison
- performance evaluation
- Naive baseline (Tomorrow = Today)
- Linear Regression
- Ridge Regression
- Lasso Regression
These models evaluate:
- linear relationships
- regularization effects
- robustness against overfitting
Random train/test splits cause data leakage in time-series problems.
Therefore the project uses:
- chronological train/test split
- no future information in training data
Regression metrics:
- MAE (Mean Absolute Error)
- RMSE (Root Mean Squared Error)
- MAPE (optional)
Directional metric:
- Directional Accuracy (correct prediction of up/down movement)
(Replace this section with final results)
| Model | MAE | RMSE | Direction Accuracy |
|---|---|---|---|
| Naive Baseline | - | - | - |
| Linear Regression | - | - | - |
| Ridge Regression | - | - | - |
| Lasso Regression | - | - | - |
Key takeaway:
The objective is not perfect prediction but:
- outperforming naive baselines
- identifying useful predictive signals
- maintaining realistic evaluation
Example evaluation visualization:
Actual Return vs Predicted Return
This chart helps illustrate how closely the model captures short-term market movements.
You can generate prediction charts from the notebook and place them in:
reports/figures/
Then reference them in this README.
Linear and regularized regression models allow us to interpret the influence of features.
Important predictive signals may include:
- Lagged returns
- Rolling volatility
- Volume changes
- Market momentum indicators
These signals help explain what drives short-term Bitcoin movement.
pip install -r requirements.txt
jupyter notebook
Open:
notebook/Bitcoin Price Regression Analysis.ipynb
and execute all cells to reproduce the analysis.
Although simplified, similar techniques are used in:
- quantitative trading research
- crypto market analysis
- risk monitoring systems
- volatility forecasting
Even simple regression models can reveal meaningful predictive signals in financial time-series data.
Bitcoin markets are challenging due to:
- high volatility
- regime shifts
- macro shocks
- non-linear market behavior
Prediction accuracy may degrade over time.
This project is intended for learning and portfolio demonstration, not financial advice.
Bitcoin-Price-Regression-Analysis/
notebook/
Bitcoin Price Regression Analysis.ipynb
src/ (future modularization)
data.py
features.py
train.py
evaluate.py
reports/
figures/
requirements.txt
README.md
- Python
- Pandas
- NumPy
- Scikit-Learn
- Jupyter Notebook
This repository demonstrates skills in:
- time-series regression modeling
- financial feature engineering
- machine learning experimentation
- model evaluation
- interpretable modeling
- reproducible analytical workflows
Possible extensions include:
- walk-forward validation
- XGBoost / Gradient Boosting models
- LSTM deep learning models
- crypto-specific indicators
- trading strategy backtesting