双低转债及三要素可转债
注:爬取集思录上的可转债信息,并按照规则进行筛选排序,仅供交流学习之用,请勿用于商业用途
项目地址
https://gitee.com/zsyoung01/kzz
介绍
本项目采用可转债双低转债和三要素转债策略,数据抓取自集思录。
- 已支持三种排序筛选方式(最终结果逆序排序):
- 溢价率升序排名+价格升序排名+到期收益率降序排名
- 溢价率+价格-到期收益率
- 溢价率+剩余年限-到期收益率
- 已支持Email添加附件发送功能
- 未来计划加入数据回测功能及数据告警发送email功能
特性
- 网络请求-数据解析-文件存储 三层结构
- 多线程下载
- 网络自动重试
- 错误日志记录
- Python3
你可能需要
- pip3 install requests
- pip3 install json
- pip3 install datetime
- pip3 install threadpool
- pip3 install retrying
项目结构
代码说明
- Main.py -> 主程序入口,业务处理
- config.ini -> 配置文件
- Config.py -> 解析config.ini配置文件
- SendMailAttach.py -> 发送带附件的Email
- ThreeElements1.py -> 溢价率升序排名+价格升序排名+到期收益率降序排名
- ThreeElements2.py -> 溢价率+价格-到期收益率
- ThreeElements3.py -> 溢价率+剩余年限-到期收益率(三要素)
- HttpUtils.py -> 网络请求工具
- FileUtils.py -> 文件保存工具
- LogUtils.py -> 日志工具
- Constants.py -> 常量设置
其他文件:
- CbPrice.py -> 可转债二叉树定价模型
- kzz.json -> 抓取到的原始数据json
使用说明
- 本项目只支持查询当天数据,不支持查询历史数据
- 发送邮件功能需要在config.ini自行设置邮件参数
- 参数调整完之后直接启动Main.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.