{"id":17614063,"url":"https://github.com/dr413677671/quantflow-deep-learning-quant-framework","last_synced_at":"2026-04-17T01:31:56.808Z","repository":{"id":178537654,"uuid":"572036585","full_name":"dr413677671/Quantflow-deep-learning-quant-framework","owner":"dr413677671","description":"A Light-weight Deep-learning Quant Framework","archived":false,"fork":false,"pushed_at":"2022-11-29T12:29:48.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T00:13:43.474Z","etag":null,"topics":["deep-learning","keras","matplotlib","quantitative-finance","scikit-learn","seaborn","signal-analysis","signal-processing","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dr413677671.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":"2022-11-29T12:26:04.000Z","updated_at":"2022-12-02T17:11:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc7e3682-cd77-47b6-9d61-ee880073e834","html_url":"https://github.com/dr413677671/Quantflow-deep-learning-quant-framework","commit_stats":null,"previous_names":["dr413677671/quantflow-deep-learning-quant-framework"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dr413677671/Quantflow-deep-learning-quant-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr413677671%2FQuantflow-deep-learning-quant-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr413677671%2FQuantflow-deep-learning-quant-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr413677671%2FQuantflow-deep-learning-quant-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr413677671%2FQuantflow-deep-learning-quant-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dr413677671","download_url":"https://codeload.github.com/dr413677671/Quantflow-deep-learning-quant-framework/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr413677671%2FQuantflow-deep-learning-quant-framework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31911452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["deep-learning","keras","matplotlib","quantitative-finance","scikit-learn","seaborn","signal-analysis","signal-processing","tensorflow"],"created_at":"2024-10-22T18:24:06.360Z","updated_at":"2026-04-17T01:31:56.769Z","avatar_url":"https://github.com/dr413677671.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n\n\u003c/div\u003e\n\u003c!-- [![MIT License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url] --\u003e\n\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/dr413677671/Quantflow-deep-learning-quant-framework-deep-learning-quant-framework\"\u003e\n    \u003cimg src=\"docs/logo.png\" alt=\"Logo\" width=\"384\" height=\"216\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n  \u003ch3 align=\"center\"\u003eQuantflow Deep-learning Quant Framework\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    A Light-weight Deep-learning Quant Framework\n    \u003cbr /\u003e\n    \u003c!-- \u003ca href=\"https://github.com/dr413677671/Quantflow-deep-learning-quant-framework/README.md\"\u003e\u003cstrong\u003ePlay it »\u003c/strong\u003e\u003c/a\u003e --\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003c!-- \u003ca href=\"https://github.com/dr413677671/Quantflow-deep-learning-quant-framework/README.md\"\u003eExplore the docs\u003c/a\u003e\n    · --\u003e\n    \u003ca href=\"https://github.com/dr413677671/Quantflow-deep-learning-quant-framework/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/dr413677671/Quantflow-deep-learning-quant-framework/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003c!-- \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e --\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n        \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#Prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#Installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#Usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n\u003c!-- \u003cdiv align=center\u003e\n\u003cimg src='./assets/screenshot.JPG'\u003e\n\u003c/div\u003e --\u003e\n\n## About The Project\n\nHomemade light-weight quant framework. Support Sliding windows, hyper-parameter search, backtesting, Reversing Trade and etc. See [LSTM stock price prediction demo](https://github.com/dr413677671/LSTM-stock-price-prediction/) \n\n自制量化框架。支持滑窗, 超参数搜索, 反向对冲, 回测等。查看基于Quantflow-deep-learning-quant-framework的 [LSTM 股票预测 Demo](https://github.com/dr413677671/LSTM-stock-price-prediction/)。\n\n## Features:\n- [x] Model\n    - [x] LSTM\n    - [x] Seq2seq\n    - [x] Resnet50-1D\n- [x] Prediction\n    - [x] Signal Classification (Buy, Sell, Hold) 信号分类\n    - [x] Regression (avg price in next window) 回归\n- [x] Backtesting Metrics 回调指标\n    - [x] Sharpe 夏普\n    - [x] Maximum Drawdown 最大回撤\n    - [x] Alpha (regression/annualized) (回归法/年化)\n    - [x] Beta (regression/annualized) (回归法/年化)\n    - [x] Interval rate of return 平均区间收益率\n    - [x] Annualized rate of return (baseline/stretegy) 年化收益率 (基准/策略)\n    - [x] backtesting rate of return 策略回测收益率\n- [x] others\n    - [x] Reversing Trade Support 反向对冲回调策略\n    - [x] Sliding Window 滑窗生成器\n    - [x] focal_loss\n    - [x] class_weighed_sampling 分类权重采样 (抑制类别不均衡)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Built With\n\n\u003c!-- * [![Python][python-img]][python-url] --\u003e\n* [![Tensorflow][Tensorflow]][Tensorflow-url]\n* [![Keras][Keras]][Keras-url]\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\n### Prerequisites\n\n1) Clone repo.\n\n  ```sh\n  git clone https://github.com/dr413677671/Quantflow-deep-learning-quant-framework.git\n  ```\n\n1) Install dependencies.\n\n  ```sh\n  pip install \u003crepo-directory\u003e/requirements.txt\n  ```\n\n## Usage\n\n**See [LSTM stock price prediction demo](https://github.com/dr413677671/LSTM-stock-price-prediction/)**\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\n[\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg' alt='github' margin='10px' height='40'\u003e](https://github.com/https://github.com/dr413677671) \u0026nbsp;\u0026nbsp; [\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/youtube.svg' alt='YouTube' height='40'\u003e](https://www.youtube.com/channel/https://www.youtube.com/@randuan9718/videos) \u0026nbsp;\u0026nbsp; [\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/zhihu.svg' alt='zhihu' height='40'\u003e](https://www.zhihu.com/people/kumonoue)  \n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\nBased on these brilliant repos:\n* [Seq2seq](https://github.com/google/seq2seq)\n* [LSTM](https://www.tensorflow.org/api_docs/python/tf/keras/layers/LSTM)\n* Logo genetrared by [Stable-Diffusion](https://github.com/CompVis/stable-diffusion)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/dr413677671/Quantflow-deep-learning-quant-framework.svg?style=for-the-badge\n[contributors-url]: https://github.com/dr413677671/Quantflow-deep-learning-quant-framework/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/dr413677671/Quantflow-deep-learning-quant-framework.svg?style=for-the-badge\n[forks-url]: https://github.com/dr413677671/Quantflow-deep-learning-quant-framework/network/members\n[stars-shield]: https://img.shields.io/github/stars/dr413677671/Quantflow-deep-learning-quant-framework.svg?style=for-the-badge\n[stars-url]: https://github.com/dr413677671/Quantflow-deep-learning-quant-framework/stargazers\n[issues-shield]: https://img.shields.io/github/issues/dr413677671/Quantflow-deep-learning-quant-framework.svg?style=for-the-badge\n[issues-url]: https://github.com/dr413677671/Quantflow-deep-learning-quant-framework/issues\n\n[python-img]: https://img.shields.io/badge/Python-FFD43B?style=for-the-badge\u0026logo=python\u0026logoColor=blue\n[python-url]: https://www.python.org/\n[Tensorflow]: https://img.shields.io/badge/TensorFlow-FF6F00?style=for-the-badge\u0026logo=tensorflow\u0026logoColor=white\n[Tensorflow-url]: https://github.com/tensorflow/tensorflow\n[Keras]: https://img.shields.io/badge/Keras-FF0000?style=for-the-badge\u0026logo=keras\u0026logoColor=white\n[Keras-url]: https://github.com/keras-team/keras\n\n\n\u003c!-- [product-screenshot]: docs/screenshot.JPG --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdr413677671%2Fquantflow-deep-learning-quant-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdr413677671%2Fquantflow-deep-learning-quant-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdr413677671%2Fquantflow-deep-learning-quant-framework/lists"}