Git Product home page Git Product logo

axiaoxin-com / investool Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 314.0 32.11 MB

Golang实现财报分析、个股基本面检测、基本面选股、4433法则基金筛选与检测、基金持仓相似度、股票选基、基金经理筛选

Home Page: https://axiaoxin.com/investool

License: Apache License 2.0

Go 68.22% Shell 1.38% Dockerfile 0.03% CSS 0.07% HTML 24.87% JavaScript 5.45%
eastmoney fund stock

investool's Introduction

InvesTool

Open Source Love made-with-Go visitors GitHub release Github all releases

InvesTool 项目是使用 Golang 实现的个人投资分析工具,主要是为了提高按基本面选股和基金筛选的效率工具。最初是本地的脚本,后来使用 Golang 实现提供命令行版本,目前主要以 Web 网页版为主实现相关功能。数据来源于东方财富网、亿牛网、新浪财经、天天基金。

郑重声明

免责声明:程序代码仅供本人学习研究使用,如作他用所承受的法律责任一概与作者无关(下载使用即代表你同意上述观点)。使用者不得干扰或破坏数据来源网站的服务或与服务相连的服务器和网络,且本程序不对您构成任何投资建议,据此操作,风险自担。

InvesTool 解决什么问题?

InvesTool 要解决的问题是,在使用东方财富选股器按设置的条件筛选出股票后,通常筛选出的股票数量较多,需要人工对每一支股票的财报指标进行分析以判断是否可以长期持有。

需要分析的指标较多,并且有一些指标无法直接获取,需要进行计算或根据历史财务数据进行计算,在大量股票需要分析的时候这是一个繁琐的工作,因此开发了 InvesTool 来让这个过程自动化。

功能

当前已实现的功能:

  • 按指定条件的默认值自动筛选可以长期持有其股票的优质公司
  • 按指定条件的自定义值自动筛选可以长期持有其股票的优质公司
  • 实现股票检测器
  • 支持 ROE、EPS、营收、利润、整体质地、估值、合理价、负债率、历史波动率、市值 检测
  • 将筛选结果导出为 JSON 文件
  • 将筛选结果导出为 CSV 文件
  • 将筛选结果导出为 EXCEL 文件,并按行业、价格、历史波动率分工作表
  • 将筛选结果导出为股票代码图片便于东方财富 APP 上导入到自选列表
  • 支持关键词搜索股票并对其进行评估
  • 检测器支持对银行股按不同规则进行检测
  • 支持净利率和毛利率稳定性判断
  • 增加获取东方财富智能诊股中综合评价和价值评估信息
  • 支持 PEG 检测
  • 支持营收本业比检测
  • 支持财报审计意见检测
  • 完善命令行使用方式,筛选参数和检测参数支持命令行自定义
  • 支持负债流动比检测
  • 支持现金流检测
  • 提供 WEB 界面操作
  • 支持基金 4433 筛选
  • 自定义基金筛选
  • 基金检测
  • 股票选基
  • 股票持仓相似度检测
  • 基金经理筛选

我的选股规则

根据各种指标筛选值得长期持有其股票进行投资的优质公司。(优质公司不代表当前股价在涨,长线存股)

1. 财务优质

  • 最新 ROE 高于 8%
  • ROE 平均值小于 20 时,至少 3 年内逐年递增
  • EPS 至少 3 年内逐年递增
  • 营业总收入至少 3 年内逐年递增
  • 净利润至少 3 年内逐年递增
  • 负债率低于 60% (金融股除外)
  • 配发股利
  • 净利率、毛利率稳定(标准差不高于 1 )
  • 本业营收比 90%-110% 之间,经营内容具备基础、垄断、必要性服务等特征。本业比=营业利润/(营业利润+营业外收入)
  • PEG 低于 1.5 PEG=PE/净利润复合增长率 <0.8 低估成长动能,0.8-1.2 股价与成长动能匹配,1.2-1.5 市场给出较高评价,>1.5 股价与成长动能不匹配(个别股王除外)

2. 估值优质

  • 估值较低或中等
  • 股价低于合理价格(合理价格 = 历史市盈率中位数 * (EPS * (1 + 营收增长比))

3. 配置均衡

  • 选择行业分散配置
  • 历史波动率在 1 以内,进行持仓占比: 0.5 以下:0.5 以上 = 6:4

银行股选择标准

银行股由于盈利模式不同,因此选择标准略有不同。

  1. ROE 高于 8%
  2. ROA 高于 0.5%
  3. 资本充足率高于 8%
  4. 不良贷款率低于 3%
  5. 不良贷款拨备覆盖率高于 100%

低价股选择标准

低价股定义:价格范围 10 - 30 元

  1. 市净率不低于 1%
  2. ROE 不低于 8%
  3. 配发股利

个人长线存股的买卖条件

个人对长线存股的理解,股|票分为股和票。短线买的是票,追涨杀跌也好,高抛低吸也好,就是需要去炒它赚短期的价差;长线想买的是手里的持股数,尽量以相对较低的价格买到较多的股数成为该公司的一个股东,目标并不是立刻盈利,主要是作为退休养老金进行存股,买好公司的股票,做公司股东。

关于买,基本面检测符合要求时,选择自己相信的股票,参考计算出的合理股价在低估值时期进行买入,注意了解其行业的宏观周期处于什么阶段,再结合技术分析在相对底部进行买入。一定要买相信的,只有相信才能拿住。

关于卖,基本面不变不卖,当初买入的理由不变不卖,获利卖股的原则:

  • 超涨了(参考合理股价和估值状态)
  • 临时需要资金
  • 对后势没有信心
  • 基本面不符合预期
  • 找到更好的标的

关于 ETF 的选择标准

  • 基本面看净值
  • 完美 ETF:市价与净值相等
  • 合理范围:折/溢价率范围在 1%以内
  • 折价率大于 3%时考虑买入,溢价率大于 3%时考虑卖出
  • 公式:溢价率=(市价 - 净值) / 净值

基金经理筛选标准

基金可以按收益率进行 4433 法则选择外,可以按基金经理进行筛选,毕竟买基金实质是买基金经理,基金经理的选择参考标准为:

  • 从业年限 8 年以上,刚好经历一轮完整牛熊,5 年略短,10 年略长。
  • 年化平均收益 15%以上
  • 管理规模不低于 60 亿
  • 同时管理的基金不超过 10 支,同时管理太多只精力不一定够

基金 4433 筛选方法

基金筛选使用简单的 4433 法则进行筛选,即:

  • 4-最近 1 年收益率排名在同类型基金的前 1/4
  • 4-最近 2 年、3 年、5 年及今年以来收益率排名均在同类型基金的前 1/4
  • 3-最近 6 个月收益率排名在同类型基金的前 1/3
  • 3-最近 3 个月收益率排名在同类型基金的前 1/3

基金 WEB 页面的 4433 基金列表是通过定时任务每个工作日对市场上的超过 1 万多只全部类型的基金(包括债券基金)进行 4433 法则检测,只要收益率满足条件的所有类型的基金都会进入 4433 基金列表。整个过程约 1 分 50 秒可以完成,结果保存在 json 文件中(可通过单元测试中的方法进行数据拉取)。

同时支持4433 严选

  • 由于在基金管理过程中因为可能更换基金经理,所以单纯的满足 4433 不能完全说明这个业绩都是该经理的能力,因此增加了增加基金经理管理该基金的年限筛选
  • 支持 4433 指标的灵活配置,可以按自定义排名值进行筛选
  • 由于基金规模太小有存在清盘风险,规模太大不利于基金经理的灵活调仓,所以筛选 4433 时支持对基金规模进行筛选。建议值为 2-50 亿

当前基金筛选、检测等操作目前只支持 WEB 界面操作,命令行暂未支持。

使用方法

数据接口封装在 datacenter 包中,相关 API 文档地址:https://pkg.go.dev/github.com/axiaoxin-com/investool/datacenter

点击下载对应系统最新版本解压得到可执行文件

查看使用说明:

$ ./investool -h
NAME:
   investool - axiaoxin 的股票工具程序

USAGE:
   该程序不构成任何投资建议,程序只是个人辅助工具,具体分析仍然需要自己判断。

官网地址: http://axiaoxin.com/investool

VERSION:
   0.0.7

AUTHOR:
   axiaoxin <[email protected]>

COMMANDS:
   exportor  股票筛选导出器
   checker   股票检测器
   help, h   Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --loglevel value, -l value  日志级别 [debug|info|warn|error] (default: info) [$XSTOCK_LOGLEVEL]
   --help, -h                  show help (default: false)
   --version, -v               show the version (default: false)

COPYRIGHT:
   (c) 2021 axiaoxin

exportor

exportor 是数据导出器,不使用参数默认导出 EXCEL 文件。

查看使用说明:

./investool exportor -h
NAME:
   investool exportor - 股票筛选导出器

USAGE:
   将按条件筛选出的股票导出到文件,根据文件后缀名自动判断导出类型。支持的后缀名:[xlsx|csv|json|png|all],all 表示导出全部支持的类型。

OPTIONS:
   --filename value, -f value                      指定导出文件名 (default: ./dist/investool.20210509.xlsx) [$XSTOCK_EXPORTOR_FILENAME]
   --disable_check, -C                             关闭基本面检测,导出所有原始筛选结果 (default: false) [$XSTOCK_EXPORTOR_DISABLE_CHECK]
   --filter.min_roe value                          最低净资产收益率 (%) (default: 8.0)
   --filter.min_netprofit_yoy_ratio value          最低净利润增长率 (%) (default: 0.0)
   --filter.min_toi_yoy_ratio value                最低营收增长率 (%) (default: 0.0)
   --filter.min_zxgxl value                        最低最新股息率 (%) (default: 0.0)
   --filter.min_netprofit_growthrate_3_y value     最低净利润 3 年复合增长率(%) (default: 0.0)
   --filter.min_income_growthrate_3_y value        最低营收 3 年复合增长率(%) (default: 0.0)
   --filter.min_listing_yield_year value           最低上市以来年化收益率(%) (default: 0.0)
   --filter.min_pb_new_mrq value                   最低市净率 (default: 1.0)
   --filter.max_debt_asset_ratio value             最大资产负债率 (%) (default: 0.0)
   --filter.min_predict_netprofit_ratio value      最低预测净利润同比增长(%) (default: 0.0)
   --filter.min_predict_income_ratio value         最低预测营收同比增长(%) (default: 0.0)
   --filter.min_total_market_cap value             最低总市值(亿) (default: 100.0)
   --filter.industry_list value                    行业名
   --filter.min_price value                        股价范围最小值(元) (default: 0.0)
   --filter.max_price value                        股价范围最大值(元) (default: 0.0)
   --filter.listing_over_5_y                       上市时间是否超过 5 年 (default: false)
   --filter.min_listing_volatility_year value      最低上市以来年化波动率 (default: 0.0)
   --filter.exclude_cyb                            排除创业板 (default: true)
   --filter.exclude_kcb                            排除科创板 (default: true)
   --filter.special_security_name_abbr_list value  查询指定名称
   --filter.special_security_code_list value       查询指定代码
   --filter.min_roa value                          最小总资产收益率 ROA (default: 0.0)
   --checker.min_roe value                         最新一期 ROE 不低于该值 (default: 8.0)
   --checker.check_years value                     连续增长年数 (default: 3)
   --checker.no_check_years_roe value              ROE 高于该值时不做连续增长检查 (default: 20.0)
   --checker.max_debt_asset_ratio value            最大资产负债率百分比(%) (default: 60.0)
   --checker.max_hv value                          最大历史波动率 (default: 1.0)
   --checker.min_total_market_cap value            最小市值(亿) (default: 100.0)
   --checker.bank_min_roa value                    银行股最小 ROA (default: 0.5)
   --checker.bank_min_zbczl value                  银行股最小资本充足率 (default: 8.0)
   --checker.bank_max_bldkl value                  银行股最大不良贷款率 (default: 3.0)
   --checker.bank_min_bldkbbfgl value              银行股最低不良贷款拨备覆盖率 (default: 100.0)
   --checker.is_check_mll_stability                是否检测毛利率稳定性 (default: true)
   --checker.is_check_jll_stability                是否检测净利率稳定性 (default: true)
   --checker.is_check_price_by_calc                是否使用估算合理价进行检测,高于估算价将被过滤 (default: false)
   --checker.max_peg value                         最大 PEG (default: 1.5)
   --checker.min_byys_ratio value                  最小本业营收比 (default: 0.9)
   --checker.max_byys_ratio value                  最大本业营收比 (default: 1.1)
   --help, -h                                      show help (default: false)

命令行使用示例:

  • 导出 JSON 文件:
./investool -l error exportor -f ./stocks.json
  • 导出 CSV 文件:
./investool -l error exportor -f ./stocks.csv
  • 导出 EXCEL 文件:
./investool -l error exportor -f ./stocks.xlsx
  • 导出 PNG 图片:
./investool -l error exportor -f ./stocks.png
  • 导出全部支持的类型:
./investool -l error exportor -f ./stocks.all
  • 自定义筛选、检测参数
./investool -l error exportor -f ./stocks.xlsx --filter.min_roe=6 --checker.min_roe=6
  • 导出指定名称的股票
./investool -l error exportor -f ./stocks.xlsx --filter.special_security_name_abbr_list 福莱特 --filter.special_security_name_abbr_list 旗滨集团 --disable_check

checker

给定关键词/股票代码搜索股票进行评估检测

查看使用说明:

./investool checker -h
NAME:
   investool checker - 股票检测器

USAGE:
   investool checker [command options] [arguments...]

OPTIONS:
   --keyword value, -k value             检给定股票名称或代码,多个股票批量检测使用/分割。如: 招商银行/**平安/600519
   --checker.min_roe value               最新一期 ROE 不低于该值 (default: 8.0)
   --checker.check_years value           连续增长年数 (default: 3)
   --checker.no_check_years_roe value    ROE 高于该值时不做连续增长检查 (default: 20.0)
   --checker.max_debt_asset_ratio value  最大资产负债率百分比(%) (default: 60.0)
   --checker.max_hv value                最大历史波动率 (default: 1.0)
   --checker.min_total_market_cap value  最小市值(亿) (default: 100.0)
   --checker.bank_min_roa value          银行股最小 ROA (default: 0.5)
   --checker.bank_min_zbczl value        银行股最小资本充足率 (default: 8.0)
   --checker.bank_max_bldkl value        银行股最大不良贷款率 (default: 3.0)
   --checker.bank_min_bldkbbfgl value    银行股最低不良贷款拨备覆盖率 (default: 100.0)
   --checker.is_check_mll_stability      是否检测毛利率稳定性 (default: true)
   --checker.is_check_jll_stability      是否检测净利率稳定性 (default: true)
   --checker.is_check_price_by_calc      是否使用估算合理价进行检测,高于估算价将被过滤 (default: false)
   --checker.max_peg value               最大 PEG (default: 1.5)
   --checker.min_byys_ratio value        最小本业营收比 (default: 0.9)
   --checker.max_byys_ratio value        最大本业营收比 (default: 1.1)
   --help, -h                            show help (default: false)

命令行使用示例:

./investool -l error checker -k 比亚迪

webserver

启动 WEB 服务:

Web 服务使用的是pink-lady 项目模板

./investool webserver

可通过 ---config 指定配置文件,默认读取当前目录下的 ./config.toml

随着时间的推移,从中报发布结束开始,满足默认筛选条件的公司会越来越多,筛选并检测的耗时也会逐渐增加,服务部署时反向代理的超时时间需调大。

index

获取指数代码 000905 信息

./investool index -c 000905 -d

获取指数代码 000905 的成分股:

./investool index -c 000905 -s

获取指数代码 000905 和指数代码 000922 的成分股交集:

./investool index -c 000905 -i 000922

最后

程序输出的所有数据与信息仅供参考,不构成投资建议。再次强调,本程序代码仅供本人学习研究使用,如作他用所承受的法律责任一概与作者无关(下载使用即代表你同意上述观点)。

祝大家投资顺利。

Stargazers over time

investool's People

Contributors

283713406 avatar axiaoxin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

investool's Issues

检测结果和筛选结果增加近一年复盘最优策略

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

股票选基金

输入多只股票输出同时持有这些股票的基金

请问项目能不能以web的形式启动

请问项目有没有可视化页面,能够以web的方式本地启动呢
感谢大神的开发。
本人go小白一个,已经琢磨出通过命令行正常使用各功能。请问有没有可视化页面呢,就像您的网站一样,能以web方式使用各功能

HK 股票无数据返回

QuerySelectedStocksWithFilter 方法
如果是港股的话,返回数据为空。比如腾讯00700。

格雷厄姆选择普通股的单一标准

(a)购买市盈率较低的重要企业(比如道琼斯中的企业)的股票;(b)挑选价格低于净流动资产价值(或营运资本价值)的各类股票。

不通过web 启动,单纯的使用exportor 会导致任务卡死

Describe the bug
x-stock 不通过web 启动,单纯的使用exportor 会导致任务卡死,

To Reproduce
Steps to reproduce the behavior:

  1. execute x-stock -l error exportor
  2. See error,任务卡住

Expected behavior
应该导出excel 表格

Screenshots
image

Desktop (please complete the following information):

  • OS: [macos]
  • Version [x-stock version 1.2.19]

Additional context
排查问题是因为core/selector.go 第52行,

workerCount := int(math.Min(float64(len(stocks)), float64(viper.GetFloat64("app.chan_size"))))
jobChan := make(chan struct{}, workerCount)
	wg := sync.WaitGroup{}
	var mu sync.Mutex

	for _, baseInfo := range stocks {
		wg.Add(1)
		jobChan <- struct{}{}

执行的函数中回去取toml 配置文件中的值,然后对比两个值之间的最小值.由于没有读到配置文件,导致 float64(viper.GetFloat64("app.chan_size")) 为默认值0 ,workerCount 为0 ,jobChan <- struct{}{} 这里就会被阻塞住整个函数。建议判断一下 workerCount 为0 的时候,设置为默认值

检测结果增加扫雷

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[Bug] v1.2.27-28 在未安装go环境的windows上读取时区出错

Describe the bug
v1.2.27-28 在未安装go环境的windows上读取时区出错

To Reproduce

  1. 下载分发包解压进入目录
  2. 修改config.toml中的 env = "localhost"env = "prod" 方便手动更新
  3. 运行 x-stock webserver

Expected behavior
正确打开服务器并下载更新数据, 成功后本地文件夹应多出下列文件.

    fund_4433_list.json
    fund_all_list.json
    fund_type_list.json
    industry_list.json

Screenshots

v1.2.27

> D:\x-stock_1.2.27_Windows_i386>x-stock.exe webserver --config "D://x-stock_1.2.27_Windows_i386//config.toml"

> {"level":"INFO","time":"2021-10-14 21:53:16.505835","logger":"logging.ctx_logger","caller":"webserver/webserver.go:InitWithConfigFile:31","msg":"load toml type config file config from D://x-stock_1.2.27_Windows_i386//","pid":19880,"server_ip":"192.168.1.100","trace_id":"logging_c5k3cj18oau4ra62jvcg"}
> {"level":"DEBUG","time":"2021-10-14 21:53:16.509810","logger":"logging.ctx_logger","caller":"webserver/webserver.go:InitWithConfigFile:69","msg":"Sentry use dns: 1","pid":19880,"server_ip":"192.168.1.100","trace_id":"logging_c5k3cj18oau4ra62jvd0"}
> {"level":"ERROR","time":"2021-10-14 21:53:16.510804","logger":"logging.ctx_logger","caller":"webserver/webserver.go:InitWithConfigFile:72","msg":"Sentry client create error:[Sentry] DsnParseError: invalid scheme","pid":19880,"server_ip":"192.168.1.100","trace_id":"logging_c5k3cj18oau4ra62jvdg"}
> {"level":"DEBUG","time":"2021-10-14 21:53:16.510804","logger":"logging.ctx_logger","caller":"eastmoney/industry_list.go:QueryIndustryList:39","msg":"EastMoney IndustryList https://datacenter.eastmoney.com/stock/selection/api/data/get/ begin","pid":19880,"server_ip":"192.168.1.100","trace_id":"logging_c5k3cj18oau4ra62jve0","reqData":{"client":"APP","source":"SELECT_SECURITIES","sty":"ALL","type":"RPTA_APP_INDUSTRY"}}
> {"level":"DEBUG","time":"2021-10-14 21:53:16.510804","logger":"logging.ctx_logger","caller":"[email protected]/logger.go:func1:280","msg":"Running AtomicLevel HTTP server on :4870/","pid":19880,"server_ip":"192.168.1.100","trace_id":"logging_c5k3cj18oau4ra62jveg"}
> {"level":"DEBUG","time":"2021-10-14 21:53:16.763363","logger":"logging.ctx_logger","caller":"eastmoney/industry_list.go:QueryIndustryList:48","msg":"EastMoney IndustryList https://datacenter.eastmoney.com/stock/selection/api/data/get/ end","pid":19880,"server_ip":"192.168.1.100","trace_id":"logging_c5k3cj18oau4ra62jvf0","latency(ms)":250}
> {"level":"ERROR","time":"2021-10-14 21:53:16.765290","logger":"logging.ctx_logger","caller":"cmds/webserver_cmd.go:func1:59","msg":"services init error:open ./fund_all_list.json: The system cannot find the file specified.","pid":19880,"server_ip":"192.168.1.100","trace_id":"logging_c5k3cj18oau4ra62jvfg"}
> panic: The system cannot find the path specified.
> goroutine 1 [running]:
> github.com/axiaoxin-com/x-stock/cron.RunCronJobs(0x14368001)
>         /Users/axiaoxin/go/src/github.com/axiaoxin-com/x-stock/cron/cron.go:29 +0x2b9
> github.com/axiaoxin-com/x-stock/cmds.ActionWebserver.func1(0x14280e40, 0x2, 0x2)
>         /Users/axiaoxin/go/src/github.com/axiaoxin-com/x-stock/cmds/webserver_cmd.go:64 +0xe9
> github.com/urfave/cli/v2.(*Command).Run(0x140a8c60, 0x14280b40, 0x0, 0x0)
>         /Users/axiaoxin/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:163 +0x3c4
> github.com/urfave/cli/v2.(*App).RunContext(0x14368000, 0x1e7b89c, 0x140a00b8, 0x1408a100, 0x4, 0x4, 0x0, 0x0)
>         /Users/axiaoxin/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:313 +0x651
> github.com/urfave/cli/v2.(*App).Run(...)
>         /Users/axiaoxin/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:224
> main.main()
>         /Users/axiaoxin/go/src/github.com/axiaoxin-com/x-stock/main.go:76 +0x476
v1.2.28

> D:\x-stock_1.2.28_Windows_x86_64>x-stock webserver
> {"level":"INFO","time":"2021-10-15 01:58:02.569335","logger":"logging.ctx_logger","caller":"webserver/webserver.go:InitWithConfigFile:31","msg":"load toml type config file config from ./","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7j0"}
> {"level":"DEBUG","time":"2021-10-15 01:58:02.574363","logger":"logging.ctx_logger","caller":"webserver/webserver.go:InitWithConfigFile:69","msg":"Sentry use dns: 1","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7jg"}
> {"level":"ERROR","time":"2021-10-15 01:58:02.575091","logger":"logging.ctx_logger","caller":"webserver/webserver.go:InitWithConfigFile:72","msg":"Sentry client create error:[Sentry] DsnParseError: invalid scheme","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7k0"}
> {"level":"DEBUG","time":"2021-10-15 01:58:02.576338","logger":"logging.ctx_logger","caller":"[email protected]/logger.go:func1:280","msg":"Running AtomicLevel HTTP server on :4870/","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7l0"}
> {"level":"DEBUG","time":"2021-10-15 01:58:02.576257","logger":"logging.ctx_logger","caller":"eastmoney/industry_list.go:QueryIndustryList:39","msg":"EastMoney IndustryList https://datacenter.eastmoney.com/stock/selection/api/data/get/ begin","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7kg","reqData":{"client":"APP","source":"SELECT_SECURITIES","sty":"ALL","type":"RPTA_APP_INDUSTRY"}}
> {"level":"DEBUG","time":"2021-10-15 01:58:02.936368","logger":"logging.ctx_logger","caller":"eastmoney/industry_list.go:QueryIndustryList:48","msg":"EastMoney IndustryList https://datacenter.eastmoney.com/stock/selection/api/data/get/ end","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7lg","latency(ms)":359}
> {"level":"ERROR","time":"2021-10-15 01:58:02.938722","logger":"logging.ctx_logger","caller":"cmds/webserver_cmd.go:func1:59","msg":"services init error:open ./fund_all_list.json: The system cannot find the file specified.","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7m0"}
> {"level":"ERROR","time":"2021-10-15 01:58:02.939347","logger":"logging.ctx_logger","caller":"cron/cron.go:RunCronJobs:30","msg":"RunCronJobs time LoadLocation error:The system cannot find the path specified.","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7mg"}
> {"level":"DEBUG","time":"2021-10-15 01:58:02.940617","logger":"logging.ctx_logger","caller":"cron/cron.go:RunCronJobs:32","msg":"cron timezone:UTC","pid":14612,"server_ip":"192.168.1.100","trace_id":"logging_c5k6vah8oau3i56dg7n0"}
> panic: time: missing Location in call to Time.In
> 
> goroutine 1 [running]:
> time.Time.In(...)
>         /usr/local/Cellar/go/1.16/libexec/src/time/time.go:1099
> github.com/go-co-op/gocron.(*trueTime).Now(0x3081438, 0x0, 0x35, 0x20fef33, 0x20fef33)
>         /Users/axiaoxin/go/pkg/mod/github.com/go-co-op/[email protected]/timeHelper.go:16 +0xdd
> github.com/go-co-op/gocron.(*Scheduler).now(0xc00007ec80, 0x25f4548, 0x262f860, 0x20fef33)
>         /Users/axiaoxin/go/pkg/mod/github.com/go-co-op/[email protected]/scheduler.go:886 +0x49
> github.com/go-co-op/gocron.(*Scheduler).scheduleNextRun(0xc00007ec80, 0xc00014a000)
>         /Users/axiaoxin/go/pkg/mod/github.com/go-co-op/[email protected]/scheduler.go:149 +0x47
> github.com/go-co-op/gocron.(*Scheduler).runJobs(0xc00007ec80, 0xc00008d560, 0x2, 0x2)
>         /Users/axiaoxin/go/pkg/mod/github.com/go-co-op/[email protected]/scheduler.go:82 +0x49
> github.com/go-co-op/gocron.(*Scheduler).start(0xc00007ec80)
>         /Users/axiaoxin/go/pkg/mod/github.com/go-co-op/[email protected]/scheduler.go:77 +0x85
> github.com/go-co-op/gocron.(*Scheduler).StartAsync(0xc00007ec80)
>         /Users/axiaoxin/go/pkg/mod/github.com/go-co-op/[email protected]/scheduler.go:69 +0x51
> github.com/axiaoxin-com/x-stock/cron.RunCronJobs(0xc000085201)
>         /Users/axiaoxin/go/src/github.com/axiaoxin-com/x-stock/cron/cron.go:39 +0x2aa
> github.com/axiaoxin-com/x-stock/cmds.ActionWebserver.func1(0xc000094600, 0x2, 0x2)
>         /Users/axiaoxin/go/src/github.com/axiaoxin-com/x-stock/cmds/webserver_cmd.go:64 +0x11a
> github.com/urfave/cli/v2.(*Command).Run(0xc0003c9440, 0xc0000944c0, 0x0, 0x0)
>         /Users/axiaoxin/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:163 +0x4dd
> github.com/urfave/cli/v2.(*App).RunContext(0xc0003ca820, 0x1ea27a8, 0xc00002a0b8, 0xc0000623c0, 0x2, 0x2, 0x0, 0x0)
>         /Users/axiaoxin/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:313 +0x825
> github.com/urfave/cli/v2.(*App).Run(...)
>         /Users/axiaoxin/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:224
> main.main()
>         /Users/axiaoxin/go/src/github.com/axiaoxin-com/x-stock/main.go:76 +0x54f

Desktop (please complete the following information):

  • OS: Windows 10 x64

Additional context
#25

问题解决:

  • 下载分发文件 tzdata.zip

  • set "zoneinfo=tzdata.zip" 设置环境变量

  • x-stock webserver

参考:

golang/go#38017
golang/go#21881
https://stackoverflow.com/questions/52489347/how-to-create-a-binary-that-contains-zoneinfo-zip

日志调整

core/searcher.go:func1:57 market类型

eastmoney/select_stocks.go:QuerySelectedStocksWithFilter:232
eastmoney/select_stocks.go:QuerySelectedStocksWithFilter:241 改为info

内在价值

E*(2r+8.5)*4.4/Y

E:每股盈利
r:预期盈利增长率
8.5: 格雷厄姆认为一家业绩稳定增长的公司比较合适的市盈率(A股什么值合适?)
4.4: ???
Y:AAA级公司债券的当期收益率

PEG检测范围需>0

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

api 列表

作为普通的java开发, 看到go 有点不懂, 我能否摘抄里面的api路径, 自己用java去玩一遍?

fund todo

添加成立年数条件、取消强制排除成立在5年以下的基金
收益率235this添加开关
取消返回is4433字段,没有用到

  • 基金检测支持批量检测

基金持仓相似度检测

基金数据能否增加导出

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

x-stock改名

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

基金批量检测时,开启检测个股输出信息混乱

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

roic>10%

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

docker版本

大佬 请问您考虑过开发一个docker的web版本么 谢谢了

净收入没有持续高于经营产生的现金流(超过30%)

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

支持神奇九转

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

win10 cmd运行exe,提示找不到json

问题
win10,通过 release 下载v1.3.4

cmd 运行 如下

.\investool.exe

{"level":"ERROR","time":"2022-07-17 12:16:05.543916","logger":"logging.ctx_logger","caller":"models/global.go:InitGlobalVars:49","msg":"init models global vars error:open ./industry_list.json: The system cannot find the file specified.","pid":15512,"server_ip":"192.168.0.*","trace_id":"logging_cb9oq1aam53jp607ch2g"}
{"level":"ERROR","time":"2022-07-17 12:16:05.543916","logger":"logging.ctx_logger","caller":"models/global.go:InitGlobalVars:52","msg":"init models global vars error:open ./fund_all_list.json: The system cannot find the file specified.","pid":15512,"server_ip":"192.168.0.*","trace_id":"logging_cb9oq1aam53jp607ch30"}
{"level":"ERROR","time":"2022-07-17 12:16:05.544465","logger":"logging.ctx_logger","caller":"models/global.go:InitGlobalVars:55","msg":"init models global vars error:open ./fund_4433_list.json: The system cannot find the file specified.","pid":15512,"server_ip":"192.168.0.*","trace_id":"logging_cb9oq1aam53jp607ch3g"}
{"level":"ERROR","time":"2022-07-17 12:16:05.544465","logger":"logging.ctx_logger","caller":"models/global.go:InitGlobalVars:58","msg":"init models global vars error:open ./fund_type_list.json: The system cannot find the file specified.","pid":15512,"server_ip":"192.168.0.*","trace_id":"logging_cb9oq1aam53jp607ch40"}
{"level":"ERROR","time":"2022-07-17 12:16:05.544465","logger":"logging.ctx_logger","caller":"models/global.go:InitGlobalVars:61","msg":"init models global vars error:open ./fund_managers.json: The system cannot find the file specified.","pid":15512,"server_ip":"192.168.0.*","trace_id":"logging_cb9oq1aam53jp607ch4g"} 

是不是少打包配置文件了?麻烦大佬看下。
仓库里面也没有找到这个json,是要自己设置这几个配置文件吗?有没有默认配置呀

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.