{"id":19531402,"url":"https://github.com/ranpy13/bitcoin-prediction","last_synced_at":"2025-04-18T14:58:45.045Z","repository":{"id":232461971,"uuid":"784404717","full_name":"ranpy13/bitcoin-prediction","owner":"ranpy13","description":"A basic Machine Learning model that predicts the price of Bitcoin.","archived":false,"fork":false,"pushed_at":"2024-04-30T16:50:52.000Z","size":136,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T06:22:37.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ranpy13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-09T19:33:06.000Z","updated_at":"2024-09-23T19:37:15.000Z","dependencies_parsed_at":"2024-04-30T17:54:56.601Z","dependency_job_id":"ec7026fc-5cc0-4806-a28c-d83544c2d59e","html_url":"https://github.com/ranpy13/bitcoin-prediction","commit_stats":null,"previous_names":["ranpy13/bitcoin-prediction"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranpy13%2Fbitcoin-prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranpy13%2Fbitcoin-prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranpy13%2Fbitcoin-prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranpy13%2Fbitcoin-prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranpy13","download_url":"https://codeload.github.com/ranpy13/bitcoin-prediction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249508722,"owners_count":21283456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T01:42:44.612Z","updated_at":"2025-04-18T14:58:45.022Z","avatar_url":"https://github.com/ranpy13.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitcoin-prediction\nA basic Machine Learning model that predicts the price of Bitcoin.\n\n\u003chr\u003e\n\n\n## About\nThis 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\u0026slug=bitcoin\u0026time_end=1601510400\u0026time_start=1367107200) while taking various hyper-parameters into consideration which have affected the bitcoin prices until now. \n\n## Paper presentation\nThe [paper](9.pdf) contains all details of algorithms used along with results, anaylisis and discussions om the topic.\n\n### Dataset\n* [Dataset](https://web-api.coinmarketcap.com/v1/cryptocurrency/ohlcv/historical?convert=USD\u0026slug=bitcoin\u0026time_end=1601510400\u0026time_start=1367107200) has been downloaded using coinmarketcap API.\n\n* Dataset after Preprocessing\n\n![Dataset after preprocessing](imgs/df.png)\n\n* Seasonal Decomposition of the Time-Series after order-1 differencing (to make it stationary)\n\n![Seasonal Decomposition After Order-1 Differencing](imgs/seas-decomp.png)\n\n* Correlation Plots \n\n![Autocorrelation](imgs/corr.png)\n\n* Best Results (GARCH + SARIMAX) (RMSE: 154.32)\n\n![arima-garch-results](imgs/garch-sarimax.png)\n\n\n\n### ML Models Used:\n* Regression Models\n  * Linear Regression with various penalties\n  * Polynomial Regression\n  * Bayesian Regression \n* ARIMA Models\n  * AR\n  * ARMA\n  * ARIMA\n  * SARIMAX\n* SARIMAX + GARCH on the residuals of SARIMAX model\n* VAR Model\n\n### Python Dependencies:\n* pandas\n* numpy\n* requests\n* matplotlib\n* statsmodels\n* pmdarima\n* arch\n\n### Install Dependencies (requirements.txt)\n1. pip install -r requirements.txt\n\nOR\n\n1. ```pipenv install --ignore```\n2. ```pipenv shell```\n3. ```.\\Scripts\\activate```\n\n### How to Run\n1. ```cd \\\u003cPROJECT ROOT DIRECTORY\\\u003e```\n2. ```python \\\u003cfilename\\\u003e.py```\n\n### File Descriptions:\n* `auto-ARIMA.py`: Runs *automated gridsearch* from *pmdarima library*, to find the best model parameters.\n* `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.\n* ```garch-sarimax.py``` runs *sarimax models* added with error of residuals from `SARIMAX` using `GARCH`.\n* `elasticnet.py` runs *Linear Regression* with a combination of L1 and L2 penalty.\n* `bayesian.py` runs *BayesianRidge regression* with optimal parameters.\n* `polyreg.py` runs *Linear Regression* by adding polynomial features.\n* `var.py` runs runs *VAR* model on the data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franpy13%2Fbitcoin-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franpy13%2Fbitcoin-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franpy13%2Fbitcoin-prediction/lists"}