Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ranpy13/bitcoin-prediction
A basic Machine Learning model that predicts the price of Bitcoin.
https://github.com/ranpy13/bitcoin-prediction
Last synced: 6 days ago
JSON representation
A basic Machine Learning model that predicts the price of Bitcoin.
- Host: GitHub
- URL: https://github.com/ranpy13/bitcoin-prediction
- Owner: ranpy13
- License: cc0-1.0
- Created: 2024-04-09T19:33:06.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-30T16:50:52.000Z (7 months ago)
- Last Synced: 2024-04-30T18:00:08.494Z (7 months ago)
- Language: Python
- Size: 133 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bitcoin-prediction
A basic Machine Learning model that predicts the price of Bitcoin.
## About
This project focuses on the prediction of the prices of Bitcoin, the most in-demand crypto-currency of today’s world. We predict the prices accurately by gathering data available at [coinmarketcap](https://web-api.coinmarketcap.com/v1/cryptocurrency/ohlcv/historical?convert=USD&slug=bitcoin&time_end=1601510400&time_start=1367107200) while taking various hyper-parameters into consideration which have affected the bitcoin prices until now.## Paper presentation
The [paper](9.pdf) contains all details of algorithms used along with results, anaylisis and discussions om the topic.### Dataset
* [Dataset](https://web-api.coinmarketcap.com/v1/cryptocurrency/ohlcv/historical?convert=USD&slug=bitcoin&time_end=1601510400&time_start=1367107200) has been downloaded using coinmarketcap API.* Dataset after Preprocessing
![Dataset after preprocessing](imgs/df.png)
* Seasonal Decomposition of the Time-Series after order-1 differencing (to make it stationary)
![Seasonal Decomposition After Order-1 Differencing](imgs/seas-decomp.png)
* Correlation Plots
![Autocorrelation](imgs/corr.png)
* Best Results (GARCH + SARIMAX) (RMSE: 154.32)
![arima-garch-results](imgs/garch-sarimax.png)
### ML Models Used:
* Regression Models
* Linear Regression with various penalties
* Polynomial Regression
* Bayesian Regression
* ARIMA Models
* AR
* ARMA
* ARIMA
* SARIMAX
* SARIMAX + GARCH on the residuals of SARIMAX model
* VAR Model### Python Dependencies:
* pandas
* numpy
* requests
* matplotlib
* statsmodels
* pmdarima
* arch### Install Dependencies (requirements.txt)
1. pip install -r requirements.txtOR
1. ```pipenv install --ignore```
2. ```pipenv shell```
3. ```.\Scripts\activate```### How to Run
1. ```cd \```
2. ```python \.py```### File Descriptions:
* `auto-ARIMA.py`: Runs *automated gridsearch* from *pmdarima library*, to find the best model parameters.
* `base-ar.py`, `base-arma.py`, `base-arima.py`, `sarimax.py` use the above found best parameters to train the respective models as per their filenames.
* ```garch-sarimax.py``` runs *sarimax models* added with error of residuals from `SARIMAX` using `GARCH`.
* `elasticnet.py` runs *Linear Regression* with a combination of L1 and L2 penalty.
* `bayesian.py` runs *BayesianRidge regression* with optimal parameters.
* `polyreg.py` runs *Linear Regression* by adding polynomial features.
* `var.py` runs runs *VAR* model on the data.