# kzz **Repository Path**: pzizhang/kzz ## Basic Information - **Project Name**: kzz - **Description**: 可转债双低转债和三要素转债策略,数据抓取自集思录 计划加入数据回测功能及数据告警发送email功能 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 15 - **Created**: 2022-04-19 - **Last Updated**: 2022-04-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 双低转债及三要素可转债 **注:爬取[集思录](https://www.jisilu.cn)上的可转债信息,并按照规则进行筛选排序,仅供交流学习之用,请勿用于商业用途** ## **项目地址:https://gitee.com/zsyoung01/kzz** ## 介绍 本项目采用可转债双低转债和三要素转债策略,数据抓取自集思录。 1. 已支持三种排序筛选方式(最终结果逆序排序): - 溢价率升序排名+价格升序排名+到期收益率降序排名 - 溢价率+价格-到期收益率 - 溢价率+剩余年限-到期收益率 2. 已支持Email添加附件发送功能 3. 已支持数据回测功能 4. 已支持监测数据告警发送到微信功能 ## 特性 1. 网络请求-数据解析-文件存储 三层结构 2. 多线程下载 3. 网络自动重试 4. 错误日志记录 5. Python3 ## 你可能需要 - pip3 install requests - pip3 install json - pip3 install datetime - pip3 install threadpool - pip3 install retrying ## 项目结构 ![img.png](img.png) ## 代码说明 - Main.py -> 主程序入口,业务处理 - MainLinux.py -> 主程序入口,业务处理(Linux环境) - ChangeMonitor.py -> 监测卖点和名单变化 - config.ini -> 配置文件 - Config.py -> 解析config.ini配置文件 - DataBackTest.py -> 三要素收益数据回测 - GetLoginData.py -> 获取登录后的集思录数据 - SendMailAttach.py -> 发送带附件的Email - SendMailAttachLinux.py -> 发送带附件的Email(Linux环境) - ThreeElements1.py -> 溢价率升序排名+价格升序排名+到期收益率降序排名 - ThreeElements2.py -> 溢价率+价格-到期收益率 - ThreeElements3.py -> 溢价率+剩余年限-到期收益率(三要素) - send_change.sh -> 发送监测数据到微信的脚本 - shell - send_message.sh -> 发送数据到微信的脚本 - util - DateUtils.py -> 时间处理工具 - HttpUtils.py -> 网络请求工具 - FileUtils.py -> 文件保存工具 - LoginUtils.py -> 登录工具 - LogUtils.py -> 日志工具 - constants - Constant.py -> 常量设置 ## 其他文件: - CbPrice.py -> 可转债二叉树定价模型 - kzz.json -> 抓取到的原始数据json ## 使用说明 1. 本项目只支持查询当天数据,不支持查询历史数据 2. 发送邮件功能需要在config.ini自行设置邮件参数 3. 参数调整完之后,windows环境启动Main.py,Linux环境启动MainLinux.py即可 ## LICENSE ``` Copyright 2019 zsyoung Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```