[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-tatsath--fin-ml":3,"tool-tatsath--fin-ml":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":80,"owner_twitter":80,"owner_website":80,"owner_url":81,"languages":82,"stars":91,"forks":92,"last_commit_at":93,"license":80,"difficulty_score":23,"env_os":94,"env_gpu":95,"env_ram":96,"env_deps":97,"category_tags":111,"github_topics":112,"view_count":10,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":118,"updated_at":119,"faqs":120,"releases":126},244,"tatsath\u002Ffin-ml","fin-ml","This github repository of \"Machine Learning and Data Science Blueprints for Finance\". Please star.","fin-ml 是一个面向金融领域的机器学习与数据科学开源项目，提供了丰富的 Jupyter Notebook 案例教程。这些notebooks 源自 O'Reilly 出版的《Machine Learning and Data Science Blueprints for Finance》一书，涵盖了金融数据分析、量化投资、风险管理等多个实际应用场景。\n\n对于想要将机器学习应用于金融领域的学习者和从业者来说，fin-ml 解决了入门门槛高、缺乏实战案例的问题。项目提供了可直接运行的代码示例，用户既可以在本地通过 Anaconda 环境运行，也可以直接在 Binder 或 Google Colab 等在线平台上浏览和执行，无需复杂的环境配置。\n\n这个项目特别适合金融分析师、量化研究员、数据科学爱好者以及相关专业的学生。无论你是想学习 Python 数据分析，还是希望将机器学习技术应用到股票预测、资产组合优化、信用风险评估等具体场景，都能从中获得实用的参考。\n\n技术层面，fin-ml 的亮点在于提供了完整的端到端案例流程，从数据获取、特征工程、模型构建到结果分析均有详细代码展示，并且兼容主","fin-ml 是一个面向金融领域的机器学习与数据科学开源项目，提供了丰富的 Jupyter Notebook 案例教程。这些notebooks 源自 O'Reilly 出版的《Machine Learning and Data Science Blueprints for Finance》一书，涵盖了金融数据分析、量化投资、风险管理等多个实际应用场景。\n\n对于想要将机器学习应用于金融领域的学习者和从业者来说，fin-ml 解决了入门门槛高、缺乏实战案例的问题。项目提供了可直接运行的代码示例，用户既可以在本地通过 Anaconda 环境运行，也可以直接在 Binder 或 Google Colab 等在线平台上浏览和执行，无需复杂的环境配置。\n\n这个项目特别适合金融分析师、量化研究员、数据科学爱好者以及相关专业的学生。无论你是想学习 Python 数据分析，还是希望将机器学习技术应用到股票预测、资产组合优化、信用风险评估等具体场景，都能从中获得实用的参考。\n\n技术层面，fin-ml 的亮点在于提供了完整的端到端案例流程，从数据获取、特征工程、模型构建到结果分析均有详细代码展示，并且兼容主流的机器学习框架。","\n# Machine Learning and Data Science Blueprints for Finance - Jupyter Notebooks\n\nThis github repository contains the code to the case studies in the O'Reilly book *Machine Learning and Data\nScience Blueprints for Finance*\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftatsath_fin-ml_readme_939ad947a04f.jpg\" title=\"book\" width=\"150\" \u002F>\n\nSimply open the [Jupyter](http:\u002F\u002Fjupyter.org\u002F) notebooks you are interested in by cloning this repository and running Jupyter locally. This option lets you play around with the code. In this case, follow the installation instructions below.\n\n\n### Want to play with these notebooks online without having to install anything?\nUse any of the following services.\n\n**WARNING**: Please be aware that these services provide temporary environmets: anything you do will be deleted after a while, so make sure you download any data you care about.\n\n* **Recommended**: Open it in [Binder](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Ftatsath\u002Ffin-ml\u002Fmaster):\n\u003Ca href=\"https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Ftatsath\u002Ffin-ml\u002Fmaster\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftatsath_fin-ml_readme_596af5d6338e.png\" width=\"90\" \u002F>\u003C\u002Fa>\n\n  * _Note_: Binder is a hosting service and the directories of the book will open exactly like they open on your local machine with no installation required. The connection between different files within the folder will work seamlessly. Most of the time, Binder starts up quickly and works great, but when the github repository of this book is updated, Binder creates a new environment from scratch, and this can take quite some time. Also, some of the case study, specially that require more cache data might be slow.\n  \n* Open this repository in [Colaboratory](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster):\n\u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftatsath_fin-ml_readme_53bfc49bf4db.png\" width=\"90\" \u002F>\u003C\u002Fa>\n\n  * _Note_: Google colab supports GPU and can be quite fast. However, the linkages to data file located in the folders of the git directory may not work. Upload the data files seperately while running the jupyter notebooks on google colab. For loading the data files on google colab, you can replace the local directory path with the github path. For example, for the data of case study 1 of chapter 7 _dataset = read_csv('Dow_adjcloses.csv')_ in the code can be replace with _dataset = read_csv('https:\u002F\u002Fraw.githubusercontent.com\u002Ftatsath\u002Ffin-ml\u002Fmaster\u002FChapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy1%20-%20Portfolio%20Management%20-%20Eigen%20Portfolio\u002FDow_adjcloses.csv')_ for it to work on google colab.  \n\n### Just want to quickly look at some notebooks, without executing any code?\n\nBrowse this repository using [jupyter.org's notebook viewer](https:\u002F\u002Fnbviewer.jupyter.org\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster\u002Findex.ipynb):\n\u003Ca href=\"https:\u002F\u002Fnbviewer.jupyter.org\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster\u002Findex.ipynb\">\u003Cimg src=\"https:\u002F\u002Fjupyter.org\u002Fassets\u002Fnav_logo.svg\" width=\"150\" \u002F>\u003C\u002Fa>\n\n### Want to install this project on your own machine?\n\nStart by installing [Anaconda](https:\u002F\u002Fwww.anaconda.com\u002Fdistribution\u002F) (or [Miniconda](https:\u002F\u002Fdocs.conda.io\u002Fen\u002Flatest\u002Fminiconda.html)), [git](https:\u002F\u002Fgit-scm.com\u002Fdownloads), and if you have a TensorFlow-compatible GPU, install the [GPU driver](https:\u002F\u002Fwww.nvidia.com\u002FDownload\u002Findex.aspx).\n\nNext, clone this project by opening a terminal and typing the following commands (do not type the first `$` signs on each line, they just indicate that these are terminal commands):\n\n\n\n    $ cd $HOME  # or any other development directory you prefer\n    $ git clone https:\u002F\u002Fgithub.com\u002Ftatsath\u002Ffin-ml.git\n    $ cd fin-ml\n\nIf you do not want to install git, you can instead download [master.zip](https:\u002F\u002Fgithub.com\u002Ftatsath\u002Ffin-ml\u002Farchive\u002Fmaster.zip), unzip it, rename the resulting directory to `fin-ml` and move it to your development directory. \n\nIf you are familiar with Python and you know how to install Python libraries, go ahead and install the libraries listed in `requirements.txt` and jump to the [Starting Jupyter](#starting-jupyter) section. If you need detailed instructions, please read on. We would encourage you to stick to the version of the packages in the 'requirement.txt' file.\n\n## Python & Required Libraries\nOf course, you obviously need Python. Python 3 is already preinstalled on many systems nowadays. You can check which version you have by typing the following command (you may need to replace `python3` with `python`):\n\n    $ python3 --version  # for Python 3\n\nAny Python 3 version should be fine, preferably 3.5 or above. If you don't have Python 3, we recommend installing it. To do so, you have several options: on Windows or MacOSX, you can just download it from [python.org](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F). On MacOSX, you can alternatively use [MacPorts](https:\u002F\u002Fwww.macports.org\u002F) or [Homebrew](https:\u002F\u002Fbrew.sh\u002F). If you are using Python 3.6 on MacOSX, you need to run the following command to install the `certifi` package of certificates because Python 3.6 on MacOSX has no certificates to validate SSL connections (see this [StackOverflow question](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F27835619\u002Furllib-and-ssl-certificate-verify-failed-error)):\n\n    $ \u002FApplications\u002FPython\\ 3.6\u002FInstall\\ Certificates.command\n\nOn Linux, unless you know what you are doing, you should use your system's packaging system. For example, on Debian or Ubuntu, type:\n\n    $ sudo apt-get update\n    $ sudo apt-get install python3 python3-pip\n\n## Installing Anaconda\n\nAfter installing Python, we recommend installing [Anaconda](https:\u002F\u002Fdocs.anaconda.com\u002Fanaconda\u002Finstall\u002F). This is a package that includes both Python and many scientific libraries. You should prefer the Python 3 version.\n\n\n## Using pip\n\nInstalling Anaconda, should install most of the commonly used libraries in the case studies. Given that there might be changes to the Anaconda package and some libraries might be out of date, it is a good idea to learn how to install packages in python using pip. \n\n### Installing pip\n\nThese are the commands you need to type in a terminal if you want to use pip to install. Note: in all the following commands, if you chose to use Python 2 rather than Python 3, you must replace `pip3` with `pip`, and `python3` with `python`.\n\nFirst you need to make sure you have the latest version of pip installed. If you are on the latest version of Python, pip should already be installed. You can check using the following command.\n\n    $ pip -V\n\nIf you do not have pip install, you can run the following command on Linux\n\n    $ sudo apt-get install python3-pip\n\nOr download [get-pip.py](https:\u002F\u002Fbootstrap.pypa.io\u002Fget-pip.py) and install it on Windows using\n\n    $ python3 get-pip.py\n\nIf you have `pip` already installed, it might be a good idea to upgrade it.\n\n    $ python3 -m pip install --user --upgrade pip\n\nThe `--user` option will install the latest version of pip only for the current user. If you prefer to install it system wide (i.e. for all users), you must have administrator rights (e.g. use `sudo python3` instead of `python3` on Linux), and you should remove the `--user` option. The same is true of the command below that uses the `--user` option.\n\n### Creating an environment (optional)\n\nNext, you can optionally create an isolated environment. This is recommended as it makes it possible to have a different environment for each project (e.g. one for this project), with potentially very different libraries, and different versions:\n\n    $ python3 -m pip install --user --upgrade virtualenv\n    $ python3 -m virtualenv -p `which python3` env\n\nThis creates a new directory called `env` in the current directory, containing an isolated Python environment based on Python 3. If you installed multiple versions of Python 3 on your system, you can replace `` `which python3` `` with the path to the Python executable you prefer to use.\n\nNow you must activate this environment. You will need to run this command every time you want to use this environment.\n\n    $ source .\u002Fenv\u002Fbin\u002Factivate\n\nOn Windows, the command is slightly different:\n\n    $ .\\env\\Scripts\\activate\n\n### Installing Python packages\n\nNext, use pip to install the required python packages. If you are not using virtualenv, you should add the `--user` option (alternatively you could install the libraries system-wide, but this will probably require administrator rights, e.g. using `sudo pip3` instead of `pip3` on Linux).\n\nThe following command is used to install python package with a particular version.\n\n    $ pip3 install \u003CPACKAGE>==\u003CVERSION>\n\nIf you want to try to install a list of packages from a file. You can use the following command.\n\n    $ python3 -m pip install --upgrade -r requirements.txt\n\nGreat! You're all set, you just need to start Jupyter now.\n\n## Installing Package models\n\nFor the chapter on Natural Language Processing. We will be using the `spaCy` python package. Installing `spaCy` does not install the language models used. In order to do that, we need to open up python and install it ourselves using the following commands.\n\n    $ python -m spacy download en_core_web_lg\n\n\n## Starting Jupyter\nOkay! You can now start Jupyter, simply type:\n\n    $ jupyter notebook\n\nThis should open up your browser, and you should see Jupyter's tree view, with the contents of the current directory. If your browser does not open automatically, visit [127.0.0.1:8888](http:\u002F\u002F127.0.0.1:8888\u002Ftree). Click on `index.ipynb` to get started!\n\n\n## Installing Libraries in Jupyter using pip\n\nIf you install a library and are not able to import it on the jupyter notebook. You might be installing them on the system python environment. We can use Jupyter notebooks to install packages using the ! symbol at the start. THe following libraries are the ones that are required outside the latest Anaconda package as of now.\n\n    $ !pip install spacy\n    $ !pip install pandas-datareader\n    $ !pip install keras\n    $ !pip install dash\n    $ !pip install dash\n    $ !pip install dash_daq\n    $ !pip install quandl\n    $ !pip install cvxopt\n\n## Want to look at the individual case studies or jupyter notebooks?\n\n### Notebooks by Application in Finance \n\n#### 1. Trading Strategies and Algorithmic Trading\n   [Bitcoin Trading Strategy using classification](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy3%20-%20Bitcoin%20Trading%20Strategy\u002FBitcoinTradingStrategy.ipynb)\u003Cbr\u002F>[Bitcoin Trading - Enhancing Speed and Accuracy using dimensionality reduction ](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy3%20-Bitcoin%20Trading%20-%20Enhancing%20Speed%20and%20accuracy\u002FBitcoinTradingEnhancingSpeedAccuracy.ipynb)\u003Cbr\u002F>[Clustering for Pairs Trading Strategy](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study1%20-%20Clustering%20for%20Pairs%20Trading\u002FClusteringForPairsTrading.ipynb)\u003Cbr\u002F>[Reinforcement Learning based Trading Strategy](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%201%20-%20Reinforcement%20Learning%20based%20Trading%20Strategy\u002FReinforcementLearningBasedTradingStrategy.ipynb)\u003Cbr\u002F>[NLP and Sentiments Analysis based Trading Strategy](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%201%20-%20NLP%20and%20Sentiments%20Analysis%20based%20Trading%20Strategy\u002FNLPandSentimentAnalysisBasedTradingStrategy.ipynb)\n\n#### 2. Portfolio Management and robo-advisors\n   [Investor Risk Tolerance and Robo-advisors - using supervised regression](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%203%20-%20Investor%20Risk%20Tolerance%20and%20Robo-advisors\u002FInvestorRiskToleranceAndRoboAdvisor.ipynb)\u003Cbr\u002F>[Robo-Advisor Dashboard-powdered by ML](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%203%20-%20Investor%20Risk%20Tolerance%20and%20Robo-advisors\u002FSample-Robo%20Advisor.ipynb)\u003Cbr\u002F>[Portfolio Management - Eigen Portfolio - using dimensionality reduction](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy1%20-%20Portfolio%20Management%20-%20Eigen%20Portfolio\u002FPortfolioManagementEigen%20Portfolio.ipynb)\u003Cbr\u002F>[Portfolio Management - Clustering Investors](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study2%20-%20Portfolio%20Management%20-%20%20Clustering%20Investors\u002FPortfolioManagementClusteringInvestors.ipynb)\u003Cbr\u002F>[Hierarchial Risk Parity - using clustering](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study3%20-%20Hierarchial%20Risk%20Parity\u002FHierarchicalRiskParity.ipynb)\u003Cbr\u002F>[Portfolio Allocation - using reinforcement learning](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%203%20-%20Portfolio%20Allocation\u002FPortfolioAllocation.ipynb)\n    \n #### 3. Derivatives Pricing and Hedging\n   [Derivative Pricing - using supervised regression](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%202%20-%20Derivatives%20Pricing\u002FDerivativesPricing.ipynb)\u003Cbr\u002F>[Derivatives Hedging - using reinforcement learning](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%202%20-%20Derivatives%20Hedging\u002FDerivativesHedging.ipynb)\n \n #### 4. Asset Price Prediction\n   [Stock Price Prediction - using regression and time series](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%201%20-%20Stock%20Price%20Prediction\u002FStockPricePrediction.ipynb)\u003Cbr\u002F>[Yield Curve Prediction - using regression and time series](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%204%20-%20Yield%20Curve%20Prediction\u002F%20YieldCurvePrediction.ipynb)\u003Cbr\u002F>[Yield Curve Construction and Interest Rate Modeling - using dimensionality reduction](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy2%20-%20Yield%20Curve%20Construction%20and%20Interest%20Rate%20Modeling\u002FYieldCurveConstruction.ipynb)\n    \n #### 5. Fraud Detection\n   [Fraud Detection - using classification](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy1%20-%20Fraud%20Detection\u002FFraudDetection.ipynb)\n   \n#### 6. Loan Default probability prediction\n   [Loan Default Probability - using classification](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy2%20-%20Loan%20Default%20Probability\u002FLoanDefaultProbability.ipynb)\n   \n#### 7. Chatbot and automation\n   [Digital Assistant-chat-bots - using NLP](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%202%20-%20Digital%20Assistant-chat-bots\u002FDigitalAssistant-chat-bot.ipynb)\u003Cbr\u002F>[Documents Summarization - using NLP](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%202%20-%20Digital%20Assistant-chat-bots\u002FCase%20Study%203%20-%20Documents%20Summarization\u002FDocumentSummarization.ipynb)\n    \n### Notebooks by Machine Learning Types\n\n#### 1. Supervised Learning- Regression and Time series Models\n   [Stock Price Prediction ](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%201%20-%20Stock%20Price%20Prediction\u002FStockPricePrediction.ipynb)\u003Cbr\u002F>[Derivative Pricing](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%202%20-%20Derivatives%20Pricing\u002FDerivativesPricing.ipynb)\u003Cbr\u002F>[Investor Risk Tolerance and Robo-advisors](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%203%20-%20Investor%20Risk%20Tolerance%20and%20Robo-advisors\u002FInvestorRiskToleranceAndRoboAdvisor.ipynb)\u003Cbr\u002F>[Yield Curve Prediction](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%204%20-%20Yield%20Curve%20Prediction\u002F%20YieldCurvePrediction.ipynb)\n   \n#### 2. Supervised Learning- Classification Models\n   [Fraud Detection](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy1%20-%20Fraud%20Detection\u002FFraudDetection.ipynb)\u003Cbr\u002F>[Loan Default Probability](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy2%20-%20Loan%20Default%20Probability\u002FLoanDefaultProbability.ipynb)\u003Cbr\u002F>[Bitcoin Trading Strategy](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy3%20-%20Bitcoin%20Trading%20Strategy\u002FBitcoinTradingStrategy.ipynb)\u003Cbr\u002F>\n\n#### 3. Unsupervised Learning- Dimensionality Reduction Models\n   [Portfolio Management - Eigen Portfolio](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy1%20-%20Portfolio%20Management%20-%20Eigen%20Portfolio\u002FPortfolioManagementEigen%20Portfolio.ipynb)\u003Cbr\u002F>[Yield Curve Construction and Interest Rate Modeling](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy2%20-%20Yield%20Curve%20Construction%20and%20Interest%20Rate%20Modeling\u002FYieldCurveConstruction.ipynb)\u003Cbr\u002F>[Bitcoin Trading - Enhancing Speed and accuracy](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy3%20-Bitcoin%20Trading%20-%20Enhancing%20Speed%20and%20accuracy\u002FBitcoinTradingEnhancingSpeedAccuracy.ipynb)\u003Cbr\u002F>\n   \n#### 4. Unsupervised Learning- Clustering\n\n   [Clustering for Pairs Trading](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study1%20-%20Clustering%20for%20Pairs%20Trading\u002FClusteringForPairsTrading.ipynb)\u003Cbr\u002F>[Portfolio Management - Clustering Investors](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study2%20-%20Portfolio%20Management%20-%20%20Clustering%20Investors\u002FPortfolioManagementClusteringInvestors.ipynb)\u003Cbr\u002F>[Hierarchial Risk Parity](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study3%20-%20Hierarchial%20Risk%20Parity\u002FHierarchicalRiskParity.ipynb)\u003Cbr\u002F>\n    \n#### 5. Reinforcement Learning\n\n   [Reinforcement Learning based Trading Strategy](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%201%20-%20Reinforcement%20Learning%20based%20Trading%20Strategy\u002FReinforcementLearningBasedTradingStrategy.ipynb)\u003Cbr\u002F>[Derivatives Hedging](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%202%20-%20Derivatives%20Hedging\u002FDerivativesHedging.ipynb)\u003Cbr\u002F>[Portfolio Allocation](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%203%20-%20Portfolio%20Allocation\u002FPortfolioAllocation.ipynb)\u003Cbr\u002F>\n   \n#### 6. Natural Language Processing\n\n   [NLP and Sentiments Analysis based Trading Strategy](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%201%20-%20NLP%20and%20Sentiments%20Analysis%20based%20Trading%20Strategy\u002FNLPandSentimentAnalysisBasedTradingStrategy.ipynb)\u003Cbr\u002F>[Digital Assistant-chat-bots](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%202%20-%20Digital%20Assistant-chat-bots\u002FDigitalAssistant-chat-bot.ipynb)\u003Cbr\u002F>[Documents Summarization](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%202%20-%20Digital%20Assistant-chat-bots\u002FCase%20Study%203%20-%20Documents%20Summarization\u002FDocumentSummarization.ipynbb)\u003Cbr\u002F>\n    \n### Master Template for different machine learning type\n  [Supervised learning - Regression and Time series](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FRegression-MasterTemplate.ipynb)\u003Cbr\u002F> [Supervised learning - Classification](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FClassification-MasterTemplate.ipynb)\u003Cbr\u002F>[Unsupervised learning - Dimensionality Reduction ](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FDimensionalityReduction-MasterTemplate.ipynb)\u003Cbr\u002F>[Unsupervised learning - Clustering](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FClustering-MasterTemplate.ipynb)\u003Cbr\u002F>[Natural Language Processing](Chapter%2010%20-%20Natural%20Language%20Processing\u002FNLP-MasterTemplate.ipynb)\u003Cbr\u002F>\n  \n    \n\n","# 金融领域的机器学习和数据科学蓝图 - Jupyter 笔记本\n\n此 GitHub 仓库包含 O'Reilly 书籍《金融领域的机器学习和数据科学蓝图》中的案例研究代码。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftatsath_fin-ml_readme_939ad947a04f.jpg\" title=\"book\" width=\"150\" \u002F>\n\n您可以通过克隆此仓库并在本地运行 Jupyter 来打开您感兴趣的 [Jupyter](http:\u002F\u002Fjupyter.org\u002F) 笔记本。此选项让您可以摆弄代码。在这种情况下，请按照下面的安装说明进行操作。\n\n### 想要在线玩这些笔记本而无需安装任何东西？\n可以使用以下任何服务。\n\n**警告**：请注意，这些服务提供临时环境：您所做的任何操作都会在一段时间后被删除，因此请确保下载您关心的任何数据。\n\n* **推荐**：在 [Binder](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Ftatsath\u002Ffin-ml\u002Fmaster) 中打开它：\n\u003Ca href=\"https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Ftatsath\u002Ffin-ml\u002Fmaster\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftatsath_fin-ml_readme_596af5d6338e.png\" width=\"90\" \u002F>\u003C\u002Fa>\n\n  * _注意_：Binder 是一个托管服务，书籍的目录将完全像在本地机器上一样打开，无需安装。文件夹内不同文件之间的连接将无缝工作。大多数情况下，Binder 启动快速且运行良好，但当本书的 GitHub 仓库更新时，Binder 会从头创建新环境，这可能需要相当长的时间。此外，某些案例研究，特别是需要更多缓存数据的案例研究可能会比较慢。\n  \n* 在 [Colaboratory](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster) 中打开此仓库：\n\u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftatsath_fin-ml_readme_53bfc49bf4db.png\" width=\"90\" \u002F>\u003C\u002Fa>\n\n  * _注意_：Google colab 支持 GPU，速度可能相当快。但是，git 目录文件夹中数据文件的链接可能无法正常工作。在 google colab 上运行 jupyter 笔记本时，请单独上传数据文件。对于在 google colab 上加载数据文件，您可以用 github 路径替换本地目录路径。例如，对于第 7 章案例研究 1 的数据，代码中的 _dataset = read_csv('Dow_adjcloses.csv')_ 可以替换为 _dataset = read_csv('https:\u002F\u002Fraw.githubusercontent.com\u002Ftatsath\u002Ffin-ml\u002Fmaster\u002FChapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy1%20-%20Portfolio%20Management%20-%20Eigen%20Portfolio\u002FDow_adjcloses.csv')_ 以便在 google colab 上运行。\n\n### 只是想快速查看一些笔记本，而不执行任何代码？\n\n使用 [jupyter.org 的笔记本查看器](https:\u002F\u002Fnbviewer.jupyter.org\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster\u002Findex.ipynb) 浏览此仓库：\n\u003Ca href=\"https:\u002F\u002Fnbviewer.jupyter.org\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster\u002Findex.ipynb\">\u003Cimg src=\"https:\u002F\u002Fjupyter.org\u002Fassets\u002Fnav_logo.svg\" width=\"150\" \u002F>\u003C\u002Fa>\n\n### 想在您自己的机器上安装此项目？\n\n首先安装 [Anaconda](https:\u002F\u002Fwww.anaconda.com\u002Fdistribution\u002F)（或 [Miniconda](https:\u002F\u002Fdocs.conda.io\u002Fen\u002Flatest\u002Fminiconda.html)）、[git](https:\u002F\u002Fgit-scm.com\u002Fdownloads)，如果您有 TensorFlow 兼容的 GPU，请安装 [GPU 驱动](https:\u002F\u002Fwww.nvidia.com\u002FDownload\u002Findex.aspx)。\n\n接下来，通过打开终端并输入以下命令来克隆此项目（不要在每行开头输入 `$` 符号，它们只是表示这些是终端命令）：\n\n\n\n    $ cd $HOME  # 或您喜欢的任何其他开发目录\n    $ git clone https:\u002F\u002Fgithub.com\u002Ftatsath\u002Ffin-ml.git\n    $ cd fin-ml\n\n如果您不想安装 git，可以改为下载 [master.zip](https:\u002F\u002Fgithub.com\u002Ftatsath\u002Ffin-ml\u002Farchive\u002Fmaster.zip)，解压它，将结果目录重命名为 `fin-ml` 并将其移动到您的开发目录。\n\n如果您熟悉 Python 并且知道如何安装 Python 库，请继续安装 `requirements.txt` 中列出的库，然后跳转到 [启动 Jupyter](#starting-jupyter) 部分。如果您需要详细说明，请继续阅读。我们鼓励您使用 'requirement.txt' 文件中的包版本。\n\n## Python 和所需库\n当然，您显然需要 Python。Python 3 如今已在许多系统上预装。您可以通过输入以下命令来检查您拥有的版本（您可能需要将 `python3` 替换为 `python`）：\n\n    $ python3 --version  # 适用于 Python 3\n\n任何 Python 3 版本都可以，最好是 3.5 或更高版本。如果您没有 Python 3，我们建议您安装它。要做到这一点，您有多个选项：在 Windows 或 MacOSX 上，您可以直接从 [python.org](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F) 下载它。在 MacOSX 上，您也可以使用 [MacPorts](https:\u002F\u002Fwww.macports.org\u002F) 或 [Homebrew](https:\u002F\u002Fbrew.sh\u002F)。如果您在 MacOSX 上使用 Python 3.6，需要运行以下命令来安装 `certifi` 证书包，因为 MacOSX 上的 Python 3.6 没有用于验证 SSL 连接的证书（请参阅此 [StackOverflow 问题](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F27835619\u002Furllib-and-ssl-certificate-verify-failed-error)）：\n\n    $ \u002FApplications\u002FPython\\ 3.6\u002FInstall\\ Certificates.command\n\n在 Linux 上，除非您知道自己在做什么，否则应该使用系统的打包系统。例如，在 Debian 或 Ubuntu 上，输入：\n\n    $ sudo apt-get update\n    $ sudo apt-get install python3 python3-pip\n\n## 安装 Anaconda\n\n安装 Python 后，我们建议安装 [Anaconda](https:\u002F\u002Fdocs.anaconda.com\u002Fanaconda\u002Finstall\u002F)。这是一个包含 Python 和许多科学库的包。您应该选择 Python 3 版本。\n\n## 使用 pip\n\n安装 Anaconda 应该会安装案例研究中大多数常用的库。鉴于 Anaconda 包可能存在变化，某些库可能已过时，因此学习如何使用 pip 安装 Python 包是一个好主意。\n\n### 安装 pip\n\n以下是在终端中需要输入的命令，用于使用 pip 进行安装。注意：在以下所有命令中，如果你选择使用 Python 2 而不是 Python 3，必须将 `pip3` 替换为 `pip`，将 `python3` 替换为 `python`。\n\n首先需要确保已安装最新版本的 pip。如果你使用的是最新版本的 Python，pip 应该已经安装了。你可以使用以下命令检查。\n\n    $ pip -V\n\n如果没有安装 pip，可以在 Linux 上运行以下命令\n\n    $ sudo apt-get install python3-pip\n\n或者下载 [get-pip.py](https:\u002F\u002Fbootstrap.pypa.io\u002Fget-pip.py) 并在 Windows 上使用以下命令安装\n\n    $ python3 get-pip.py\n\n如果已经安装了 `pip`，最好将其升级到最新版本。\n\n    $ python3 -m pip install --user --upgrade pip\n\n`--user` 选项将只为当前用户安装最新版本的 pip。如果你想在系统范围内安装（即为所有用户安装），你必须具有管理员权限（例如在 Linux 上使用 `sudo python3` 而不是 `python3`），并且应该删除 `--user` 选项。以下使用 `--user` 选项的命令也是如此。\n\n### 创建虚拟环境（可选）\n\n接下来，你可以选择创建一个隔离环境（virtual environment）。这是推荐的做法，因为它可以为每个项目创建不同的环境（例如，本项目一个环境），每个环境可以包含完全不同的库和版本：\n\n    $ python3 -m pip install --user --upgrade virtualenv\n    $ python3 -m virtualenv -p `which python3` env\n\n这将在当前目录中创建一个名为 `env` 的新目录，其中包含基于 Python 3 的隔离 Python 环境。如果系统上安装了多个版本的 Python 3，你可以将 `` `which python3` `` 替换为你喜欢的 Python 可执行文件路径。\n\n现在你必须激活这个环境。每次你想使用这个环境时，都需要运行这个命令。\n\n    $ source .\u002Fenv\u002Fbin\u002Factivate\n\n在 Windows 上，命令略有不同：\n\n    $ .\\env\\Scripts\\activate\n\n### 安装 Python 包\n\n接下来，使用 pip 安装所需的 Python 包。如果不使用虚拟环境（virtualenv），应该添加 `--user` 选项（或者可以在系统范围内安装库，但这可能需要管理员权限，例如在 Linux 上使用 `sudo pip3` 而不是 `pip3`）。\n\n以下命令用于安装特定版本的 Python 包。\n\n    $ pip3 install \u003CPACKAGE>==\u003CVERSION>\n\n如果想从文件安装一系列包，可以使用以下命令。\n\n    $ python3 -m pip install --upgrade -r requirements.txt\n\n太棒了！你已经设置好了，现在只需要启动 Jupyter 即可。\n\n## 安装包模型\n\n对于自然语言处理（Natural Language Processing）这一章，我们将使用 `spaCy` Python 包。安装 `spaCy` 不会安装语言模型（language models）。为此，我们需要打开 Python 并使用以下命令自行安装。\n\n    $ python -m spacy download en_core_web_lg\n\n## 启动 Jupyter\n\n好的！现在可以启动 Jupyter，只需输入：\n\n    $ jupyter notebook\n\n这将打开浏览器，你应该会看到 Jupyter 的树形视图，显示当前目录的内容。如果浏览器没有自动打开，请访问 [127.0.0.1:8888](http:\u002F\u002F127.0.0.1:8888\u002Ftree)。点击 `index.ipynb` 开始！\n\n## 在 Jupyter 中使用 pip 安装库\n\n如果在 Jupyter 笔记本中安装库后无法导入，可能是因为安装到了系统 Python 环境中。我们可以使用 Jupyter 笔记本开头的 ! 符号来安装包。以下是截至目前最新 Anaconda 包之外所需的库。\n\n    $ !pip install spacy\n    $ !pip install pandas-datareader\n    $ !pip install keras\n    $ !pip install dash\n    $ !pip install dash\n    $ !pip install dash_daq\n    $ !pip install quandl\n    $ !pip install cvxopt\n\n## 想查看各个案例研究或 Jupyter 笔记本吗？\n\n###金融应用笔记本\n\n#### 1. 交易策略与算法交易\n[使用分类方法的比特币交易策略](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy3%20-%20Bitcoin%20Trading%20Strategy\u002FBitcoinTradingStrategy.ipynb)\u003Cbr\u002F>[比特币交易 - 使用降维（Dimensionality Reduction）提升速度和准确性](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy3%20-Bitcoin%20Trading%20-%20Enhancing%20Speed%20and%20accuracy\u002FBitcoinTradingEnhancingSpeedAccuracy.ipynb)\u003Cbr\u002F>[配对交易策略的聚类分析（Clustering）](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study1%20-%20Clustering%20for%20Pairs%20Trading\u002FClusteringForPairsTrading.ipynb)\u003Cbr\u002F>[基于强化学习（Reinforcement Learning）的交易策略](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%201%20-%20Reinforcement%20Learning%20based%20Trading%20Strategy\u002FReinforcementLearningBasedTradingStrategy.ipynb)\u003Cbr\u002F>[基于自然语言处理（NLP）和情感分析的交易策略](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%201%20-%20NLP%20and%20Sentiments%20Analysis%20based%20Trading%20Strategy\u002FNLPandSentimentAnalysisBasedTradingStrategy.ipynb)\n\n#### 2. 投资组合管理与智能投顾\n[投资者风险容忍度与智能投顾 - 使用监督回归（Supervised Regression）](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%203%20-%20Investor%20Risk%20Tolerance%20and%20Robo-advisors\u002FInvestorRiskToleranceAndRoboAdvisor.ipynb)\u003Cbr\u002F>[智能投顾仪表盘 - 由机器学习驱动](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%203%20-%20Investor%20Risk%20Tolerance%20and%20Robo-advisors\u002FSample-Robo%20Advisor.ipynb)\u003Cbr\u002F>[投资组合管理 - 特征投资组合（Eigen Portfolio）- 使用降维（Dimensionality Reduction）](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy1%20-%20Portfolio%20Management%20-%20Eigen%20Portfolio\u002FPortfolioManagementEigen%20Portfolio.ipynb)\u003Cbr\u002F>[投资组合管理 - 投资者聚类分析](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study2%20-%20Portfolio%20Management%20-%20%20Clustering%20Investors\u002FPortfolioManagementClusteringInvestors.ipynb)\u003Cbr\u002F>[分层风险平价（Hierarchical Risk Parity）- 使用聚类分析](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study3%20-%20Hierarchial%20Risk%20Parity\u002FHierarchicalRiskParity.ipynb)\u003Cbr\u002F>[投资组合配置 - 使用强化学习（Reinforcement Learning）](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%203%20-%20Portfolio%20Allocation\u002FPortfolioAllocation.ipynb)\n    \n#### 3. 衍生品定价与对冲\n[衍生品定价 - 使用监督回归（Supervised Regression）](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%202%20-%20Derivatives%20Pricing\u002FDerivativesPricing.ipynb)\u003Cbr\u002F>[衍生品对冲 - 使用强化学习（Reinforcement Learning）](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%202%20-%20Derivatives%20Hedging\u002FDerivativesHedging.ipynb)\n \n#### 4. 资产价格预测\n[股票价格预测 - 使用回归和时间序列（Regression and Time Series）](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%201%20-%20Stock%20Price%20Prediction\u002FStockPricePrediction.ipynb)\u003Cbr\u002F>[收益率曲线预测 - 使用回归和时间序列](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%204%20-%20Yield%20Curve%20Prediction\u002F%20YieldCurvePrediction.ipynb)\u003Cbr\u002F>[收益率曲线构建与利率建模 - 使用降维（Dimensionality Reduction）](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy2%20-%20Yield%20Curve%20Construction%20and%20Interest%20Rate%20Modeling\u002FYieldCurveConstruction.ipynb)\n    \n#### 5. 欺诈检测\n[欺诈检测 - 使用分类方法（Classification）](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy1%20-%20Fraud%20Detection\u002FFraudDetection.ipynb)\n   \n#### 6. 贷款违约概率预测\n[贷款违约概率 - 使用分类方法（Classification）](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy2%20-%20Loan%20Default%20Probability\u002FLoanDefaultProbability.ipynb)\n   \n#### 7. 聊天机器人与自动化\n[数字助手聊天机器人 - 使用自然语言处理（NLP）](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%202%20-%20Digital%20Assistant-chat-bots\u002FDigitalAssistant-chat-bot.ipynb)\u003Cbr\u002F>[文档摘要 - 使用自然语言处理（NLP）](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%202%20-%20Digital%20Assistant-chat-bots\u002FCase%20Study%203%20-%20Documents%20Summarization\u002FDocumentSummarization.ipynb)\n\n### 按机器学习类型分类的 Notebook\n\n#### 1. 监督学习 - 回归和时间序列模型\n   [股票价格预测](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%201%20-%20Stock%20Price%20Prediction\u002FStockPricePrediction.ipynb)\u003Cbr\u002F>[衍生品定价](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%202%20-%20Derivatives%20Pricing\u002FDerivativesPricing.ipynb)\u003Cbr\u002F>[投资者风险承受能力和智能投顾](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%203%20-%20Investor%20Risk%20Tolerance%20and%20Robo-advisors\u002FInvestorRiskToleranceAndRoboAdvisor.ipynb)\u003Cbr\u002F>[收益率曲线预测](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FCase%20Study%204%20-%20Yield%20Curve%20Prediction\u002F%20YieldCurvePrediction.ipynb)\n   \n#### 2. 监督学习 - 分类模型\n   [欺诈检测](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy1%20-%20Fraud%20Detection\u002FFraudDetection.ipynb)\u003Cbr\u002F>[贷款违约概率](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy2%20-%20Loan%20Default%20Probability\u002FLoanDefaultProbability.ipynb)\u003Cbr\u002F>[比特币交易策略](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FCaseStudy3%20-%20Bitcoin%20Trading%20Strategy\u002FBitcoinTradingStrategy.ipynb)\u003Cbr\u002F>\n\n#### 3. 无监督学习 - 降维模型\n   [投资组合管理 - 特征投资组合](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy1%20-%20Portfolio%20Management%20-%20Eigen%20Portfolio\u002FPortfolioManagementEigen%20Portfolio.ipynb)\u003Cbr\u002F>[收益率曲线构建和利率建模](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy2%20-%20Yield%20Curve%20Construction%20and%20Interest%20Rate%20Modeling\u002FYieldCurveConstruction.ipynb)\u003Cbr\u002F>[比特币交易 - 提升速度和精度](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FCaseStudy3%20-Bitcoin%20Trading%20-%20Enhancing%20Speed%20and%20accuracy\u002FBitcoinTradingEnhancingSpeedAccuracy.ipynb)\u003Cbr\u002F>\n   \n#### 4. 无监督学习 - 聚类\n\n   [配对交易的聚类](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study1%20-%20Clustering%20for%20Pairs%20Trading\u002FClusteringForPairsTrading.ipynb)\u003Cbr\u002F>[投资组合管理 - 投资者聚类](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study2%20-%20Portfolio%20Management%20-%20%20Clustering%20Investors\u002FPortfolioManagementClusteringInvestors.ipynb)\u003Cbr\u002F>[分层风险平价](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FCase%20Study3%20-%20Hierarchial%20Risk%20Parity\u002FHierarchicalRiskParity.ipynb)\u003Cbr\u002F>\n    \n#### 5. 强化学习\n\n   [基于强化学习的交易策略](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%201%20-%20Reinforcement%20Learning%20based%20Trading%20Strategy\u002FReinforcementLearningBasedTradingStrategy.ipynb)\u003Cbr\u002F>[衍生品对冲](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%202%20-%20Derivatives%20Hedging\u002FDerivativesHedging.ipynb)\u003Cbr\u002F>[投资组合配置](Chapter%209%20-%20Reinforcement%20Learning\u002FCase%20Study%203%20-%20Portfolio%20Allocation\u002FPortfolioAllocation.ipynb)\u003Cbr\u002F>\n   \n#### 6. 自然语言处理\n\n   [基于自然语言处理和情感分析的交易策略](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%201%20-%20NLP%20and%20Sentiments%20Analysis%20based%20Trading%20Strategy\u002FNLPandSentimentAnalysisBasedTradingStrategy.ipynb)\u003Cbr\u002F>[数字助手-聊天机器人](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%202%20-%20Digital%20Assistant-chat-bots\u002FDigitalAssistant-chat-bot.ipynb)\u003Cbr\u002F>[文档摘要](Chapter%2010%20-%20Natural%20Language%20Processing\u002FCase%20Study%202%20-%20Digital%20Assistant-chat-bots\u002FCase%20Study%203%20-%20Documents%20Summarization\u002FDocumentSummarization.ipynbb)\u003Cbr\u002F>\n    \n### 不同机器学习类型的主模板\n  [监督学习 - 回归和时间序列](Chapter%205%20-%20Sup.%20Learning%20-%20Regression%20and%20Time%20Series%20models\u002FRegression-MasterTemplate.ipynb)\u003Cbr\u002F> [监督学习 - 分类](Chapter%206%20-%20Sup.%20Learning%20-%20Classification%20models\u002FClassification-MasterTemplate.ipynb)\u003Cbr\u002F>[无监督学习 - 降维](Chapter%207%20-%20Unsup.%20Learning%20-%20Dimensionality%20Reduction\u002FDimensionalityReduction-MasterTemplate.ipynb)\u003Cbr\u002F>[无监督学习 - 聚类](Chapter%208%20-%20Unsup.%20Learning%20-%20Clustering\u002FClustering-MasterTemplate.ipynb)\u003Cbr\u002F>[自然语言处理](Chapter%2010%20-%20Natural%20Language%20Processing\u002FNLP-MasterTemplate.ipynb)\u003Cbr\u002F>","# fin-ml 快速上手指南\n\nfin-ml 是面向金融领域的机器学习和数据科学 Jupyter Notebook 开源项目，源自 O'Reilly 书籍《Machine Learning and Data Science Blueprints for Finance》。\n\n## 环境准备\n\n### 系统要求\n\n- Python 3.5 或更高版本\n- 操作系统：Windows \u002F macOS \u002F Linux\n\n### 前置依赖\n\n- **Anaconda**（推荐）或 **Miniconda**\n- **git**\n- （可选）TensorFlow 兼容的 GPU 驱动\n\n### 国内加速方案\n\n推荐使用国内镜像源加速安装：\n\n```bash\n# 临时使用镜像安装依赖\npip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple -r requirements.txt\n\n# 或设置默认镜像\npip config set global.index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n---\n\n## 安装步骤\n\n### 1. 克隆项目\n\n```bash\ncd $HOME\ngit clone https:\u002F\u002Fgithub.com\u002Ftatsath\u002Ffin-ml.git\ncd fin-ml\n```\n\n> **提示**：如未安装 git，可直接下载 [master.zip](https:\u002F\u002Fgithub.com\u002Ftatsath\u002Ffin-ml\u002Farchive\u002Fmaster.zip)，解压后重命名为 `fin-ml` 即可。\n\n### 2. 安装依赖\n\n```bash\n# 使用 pip 安装 requirements.txt 中的所有依赖\npython3 -m pip install --upgrade -r requirements.txt\n```\n\n### 3. 安装 NLP 语言模型（可选）\n\n如需使用自然语言处理章节，需额外安装 spaCy 语言模型：\n\n```bash\npython -m spacy download en_core_web_lg\n```\n\n### 4. 启动 Jupyter\n\n```bash\njupyter notebook\n```\n\n启动后访问 [http:\u002F\u002F127.0.0.1:8888](http:\u002F\u002F127.0.0.1:8888)，点击 `index.ipynb` 即可开始。\n\n---\n\n## 在线使用（无需安装）\n\n如不想本地安装，可使用以下在线服务：\n\n| 服务 | 说明 |\n|------|------|\n| **Binder**（推荐） | [https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Ftatsath\u002Ffin-ml\u002Fmaster](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Ftatsath\u002Ffin-ml\u002Fmaster) |\n| **Google Colab** | [https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster) |\n| **NBViewer** | [https:\u002F\u002Fnbviewer.jupyter.org\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster\u002Findex.ipynb](https:\u002F\u002Fnbviewer.jupyter.org\u002Fgithub\u002Ftatsath\u002Ffin-ml\u002Fblob\u002Fmaster\u002Findex.ipynb) |\n\n> **注意**：在线环境为临时环境，数据会被定期清理，请及时保存重要数据。\n\n---\n\n## 基本使用\n\n打开任意 Notebook 后，基本使用流程如下：\n\n```python\nimport pandas as pd\nimport numpy as np\n\n# 读取数据（以项目自带数据为例）\ndataset = pd.read_csv('Dow_adjcloses.csv')\n\n# 查看数据前几行\ndataset.head()\n```\n\n项目包含多个金融场景的案例，涵盖：\n\n- 交易策略与算法交易\n- 投资组合管理与智能投顾\n- 信用风险评估\n- 欺诈检测\n- 自然语言处理与情绪分析","某券商量化研究团队的 junior 分析师小李，需要在一周内完成一份关于A股市场因子挖掘的研究报告，用于向投资决策委员会展示机器学习在选股策略中的应用效果。\n\n### 没有 fin-ml 时\n\n- 小李需要自己从 Wind 或 Tushare 下载数据，再逐行编写数据清洗、缺失值处理、标准化等基础代码，光是数据预处理就花了 3 天\n- 网上关于金融机器学习的教程要么过于理论化，要么代码质量参差不齐，小李花了大量时间筛选和验证开源代码的正确性\n- 在实现 PCA 降维和聚类分析时，小李对金融数据的特性把握不足，特征选择和参数调优全靠试错，模型效果始终不理想\n- 由于缺乏系统性框架，小李的报告结构混乱，向非技术背景的决策者解释模型逻辑时非常吃力\n- 临近截止日期，小李还在为代码调试和可视化图表发愁，无法专注于策略逻辑本身的优化\n\n### 使用 fin-ml 后\n\n- fin-ml 提供了完整的 Chapter 7 案例（无监督学习-降维与投资组合管理），小李直接复用其中的数据处理流程，将预处理时间压缩到半天\n- 仓库中的 Jupyter Notebook 包含了针对金融数据优化的代码实现和详细注释，小李可以快速理解每个步骤的金融含义\n- 案例中演示了如何将 PCA 应用于 Eigen Portfolio 构建，并提供了参数选择的最佳实践，小李的模型效果显著提升\n- fin-ml 的案例结构清晰，配套了完整的数据文件和可视化代码，小李的报告逻辑严谨，图表专业\n- 小李有充足时间进行策略回测和敏感性分析，最终报告获得了投资决策委员会的高度认可\n\nfin-ml 通过提供可直接运行的金融机器学习案例模板，让量化分析师能够快速从零搭建完整的研究流程，将精力聚焦于策略本身的优化而非重复造轮子。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ftatsath_fin-ml_208f7867.png","tatsath","Hariom Tatsat","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Ftatsath_9fd02854.png","Quant, Author, ML and AI enthusiast.",null,"https:\u002F\u002Fgithub.com\u002Ftatsath",[83,87],{"name":84,"color":85,"percentage":86},"Jupyter Notebook","#DA5B0B",100,{"name":88,"color":89,"percentage":90},"Python","#3572A5",0,1156,488,"2026-04-03T01:22:54","Linux, macOS, Windows","未说明（若有 TensorFlow 兼容 GPU 可提升性能）","未说明",{"notes":98,"python":99,"dependencies":100},"建议使用 Anaconda 或 Miniconda 管理环境；需安装 git；NLP 章节需额外运行 'python -m spacy download en_core_web_lg' 下载语言模型；推荐使用 requirements.txt 中指定的包版本以确保兼容性；如使用 Google Colab 需手动上传数据文件","3.5+（推荐 3.6 或更高版本）",[101,102,103,104,105,106,107,108,109,110],"spacy","pandas-datareader","keras","dash","dash_daq","quandl","cvxopt","numpy","pandas","scikit-learn",[13],[113,114,115,116,117],"python","machine-learning","finance","fintech","algorithmic-trading","2026-03-27T02:49:30.150509","2026-04-06T08:40:52.617828",[121],{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},754,"比特币随机森林交易策略中，如何获取最近时间戳的综合信号（而非仅基于EMA的信号）？","在该项目的案例研究中，信号是通过短期EMA与长期EMA的交叉来定义的。如果需要组合所有特征生成综合信号，可以采用自定义方法：1）创建新的特征列来表示市场涨跌（如使用收益率）；2）定义买入\u002F卖出规则，例如当短期EMA高于长期EMA时为买入信号，反之为卖出信号；3）将所有特征输入随机森林模型进行训练，模型输出的预测结果即为综合交易信号。具体实现时，可以修改signal列的生成逻辑，将单一EMA交叉规则扩展为多特征组合规则。","https:\u002F\u002Fgithub.com\u002Ftatsath\u002Ffin-ml\u002Fissues\u002F4",[]]