{"id":16293683,"url":"https://github.com/kkoooqq/ml-stock-prediction-models","last_synced_at":"2025-08-18T18:05:09.159Z","repository":{"id":104102277,"uuid":"415425176","full_name":"kkoooqq/ML-stock-prediction-models","owner":"kkoooqq","description":"使用机器学习进行股票预测并指导短线(预测未来3日股价)交易。","archived":false,"fork":false,"pushed_at":"2021-10-09T22:19:31.000Z","size":601,"stargazers_count":76,"open_issues_count":0,"forks_count":22,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T10:21:36.488Z","etag":null,"topics":["lightgbm","machine-learning","stock-prediction","stock-price-prediction"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kkoooqq.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":"2021-10-09T21:25:51.000Z","updated_at":"2025-02-06T06:11:58.000Z","dependencies_parsed_at":"2023-07-01T21:17:48.832Z","dependency_job_id":null,"html_url":"https://github.com/kkoooqq/ML-stock-prediction-models","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kkoooqq/ML-stock-prediction-models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkoooqq%2FML-stock-prediction-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkoooqq%2FML-stock-prediction-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkoooqq%2FML-stock-prediction-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkoooqq%2FML-stock-prediction-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkoooqq","download_url":"https://codeload.github.com/kkoooqq/ML-stock-prediction-models/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkoooqq%2FML-stock-prediction-models/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271035378,"owners_count":24688396,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["lightgbm","machine-learning","stock-prediction","stock-price-prediction"],"created_at":"2024-10-10T20:12:03.750Z","updated_at":"2025-08-18T18:05:09.086Z","avatar_url":"https://github.com/kkoooqq.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ML-stock-prediction-models\n\n使用机器学习进行股票预测并指导短线交易，此处使用分类算法。\n* 准备纯量价数据，不考虑基本面信息\n* 特征工程，自己构建量价关系特征，结合资金流量，并使用talib一些K线形态做特征\n* 数据处理（中位数去极值，行业中性化，标准化）\n* 数据源准备，回看15日数据/预测未来3日涨跌幅进行分类(\u003e5%, 0~5%, -5%~0, \u003c-5%，分四类)，标记标签\n* 将数据拆分为70%训练集，30%验证集\n* 移除相关性大的特征![移除特征](https://user-images.githubusercontent.com/43202488/136674627-d8976909-f0ed-4cde-be52-8550aac5d941.png)\n* 进行重要特征选择![重要特征选择](https://user-images.githubusercontent.com/43202488/136674673-51b2f4d2-6e9a-48bc-904f-f2d883f1051c.png)\n![cumulativeFeatureImportance](https://user-images.githubusercontent.com/43202488/136674677-e1506539-b7b0-45ab-81db-a5de67f7f7f4.png)\n* 显著特征比例选择![显著特征比例](https://user-images.githubusercontent.com/43202488/136674699-4f2bbf43-66c2-4686-bdea-fbf5961da8a5.png)\n* 构建LGB模型\n* 贝叶斯优化\n* 根据最优参数训练模型\n* 验证集预测结果\n* 使用模型进行选股\n* 对选股结果进行指标评估![指标评估](https://user-images.githubusercontent.com/43202488/136674773-51fa352c-c7c6-4891-847d-968628187897.png)\n* 最终投资组合分析![最终投资组合分析](https://user-images.githubusercontent.com/43202488/136674929-28ccdb60-acc9-4522-bd08-a568f1f35fe3.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkoooqq%2Fml-stock-prediction-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkkoooqq%2Fml-stock-prediction-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkoooqq%2Fml-stock-prediction-models/lists"}