{"id":20033648,"url":"https://github.com/simon2k/stock-price-prediction-evaluation","last_synced_at":"2026-04-07T20:31:28.236Z","repository":{"id":40979301,"uuid":"207173281","full_name":"simon2k/stock-price-prediction-evaluation","owner":"simon2k","description":"This project is indented to present a small evaluation of different types of regression models for predicting stock prices for AAPL.","archived":false,"fork":false,"pushed_at":"2023-07-06T21:27:12.000Z","size":1358,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T05:43:55.618Z","etag":null,"topics":["evaluation","machine-learning","numpy","pandas","predicting-stock-prices","scikit-learn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simon2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-09-08T21:03:43.000Z","updated_at":"2019-09-21T16:35:48.000Z","dependencies_parsed_at":"2025-03-02T05:43:52.019Z","dependency_job_id":"7d2b0693-2285-474c-8eb3-a10dfbf38957","html_url":"https://github.com/simon2k/stock-price-prediction-evaluation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simon2k/stock-price-prediction-evaluation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon2k%2Fstock-price-prediction-evaluation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon2k%2Fstock-price-prediction-evaluation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon2k%2Fstock-price-prediction-evaluation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon2k%2Fstock-price-prediction-evaluation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon2k","download_url":"https://codeload.github.com/simon2k/stock-price-prediction-evaluation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon2k%2Fstock-price-prediction-evaluation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31528272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["evaluation","machine-learning","numpy","pandas","predicting-stock-prices","scikit-learn"],"created_at":"2024-11-13T09:47:01.647Z","updated_at":"2026-04-07T20:31:28.193Z","avatar_url":"https://github.com/simon2k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stock Price Prediction Evaluation\n\nThis project is indented to present a small evaluation of different types of regression models for predicting stock prices for [AAPL](https://finance.yahoo.com/quote/AAPL/history?p=AAPL).\n\n## Setup\n\nSteps:\n\n- Download the repository\n- Install packages: `pip install -r requirements.txt`\n- Run: `python comparison.py`\n\n## Evaluation\n\n### Comparison\n\n#### Models sorted by confidence\n\n| Method | Confidence | Mean Absolute Error | Mean Squared Error | Root Mean Squared Error |\n| :---: | ---: | ---: | ---: | ---: |\n| Orthogonal Matching Pursuit | 99.9644% | 12.944 | 251.349 | 3.598 |\n| Orthogonal Matching Pursuit CV | 99.9644% | 12.944 | 251.362 | 3.598 |\n| Linear | 99.9641% | 12.898 | 249.516 | 3.591 |\n| Bayesian Ridge | 99.9641% | 12.898 | 249.513 | 3.591 |\n| Ridge CV | 99.9641% | 12.897 | 249.494 | 3.591 |\n| Ridge | 99.9641% | 12.892 | 249.295 | 3.591 |\n| Elastic Net CV | 99.9639% | 12.876 | 248.647 | 3.588 |\n| Lasso | 99.9634% | 13.116 | 259.209 | 3.622 |\n| KNN | 99.7029% | 13.293 | 254.76 | 3.646 |\n| Elastic Net | 99.4877% | 12.879 | 218.512 | 3.589 |\n| Kernel Ridge | 71.8265% | 40.886 | 1778.924 | 6.394 |\n\n#### Models sorted by RMSE\n\n| Method | Confidence | Mean Absolute Error | Mean Squared Error | Root Mean Squared Error |\n| :---: | ---: | ---: | ---: | ---: |\n| Elastic Net CV | 99.9639% | 12.876 | 248.647 | 3.588268 |\n| Elastic Net | 99.4877% | 12.879 | 218.512 | 3.588714 |\n| Ridge | 99.9641% | 12.892 | 249.295 | 3.590572 |\n| Ridge CV | 99.9641% | 12.897 | 249.494 | 3.591279 |\n| Bayesian Ridge | 99.9641% | 12.898 | 249.513 | 3.591345 |\n| Linear | 99.9641% | 12.898 | 249.516 | 3.591357 |\n| Orthogonal Matching Pursuit CV | 99.9644% | 12.944 | 251.362 | 3.597757 |\n| Orthogonal Matching Pursuit | 99.9644% | 12.944 | 251.349 | 3.597776 |\n| Lasso | 99.9634% | 13.116 | 259.209 | 3.621619 |\n| KNN | 99.7029% | 13.293 | 254.76 | 3.646022 |\n| Kernel Ridge | 71.8265% | 40.886 | 1778.924 | 6.394188 |\n\n#### Moving Average for Adj Close\n\n![moving-average-for-adj-close](./assets/moving-avergage-for-adj-close.png)\n\nIn the next paragraphs you can find predictions using selected methods.\n\nSettings:\n- Alpha: 0.1\n- Number of iterations: 1000\n- Alphas search: 0.0001, 0.0001, 0.001, 0.1\n- Number of neighbors: 2\n\n![](./assets/Bayesian%20Ridge.jpg)\n\n![](./assets/Elastic%20Net.jpg)\n\n![](./assets/Elastic%20Net%20CV.jpg)\n\n![](./assets/Kernel%20Ridge.jpg)\n\n![](./assets/KNN.jpg)\n\n![](./assets/Lasso.jpg)\n\n![](./assets/Linear.jpg)\n\n![](./assets/Orthogonal%20Matching%20Pursuit.jpg)\n\n![](./assets/Orthogonal%20Matching%20Pursuit%20CV.jpg)\n\n![](./assets/Ridge.jpg)\n\n![](./assets/Ridge%20CV.jpg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon2k%2Fstock-price-prediction-evaluation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon2k%2Fstock-price-prediction-evaluation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon2k%2Fstock-price-prediction-evaluation/lists"}