使用 Golang 实现的个人股票工具

Overview

x-stock

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

使用 Golang 实现的个人股票工具,股票数据来源于东方财富网、亿牛网、腾讯证券。

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

功能

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

TODO:

  • 获取 K 线图数据
  • 按我的 X 均线交易法则筛选可以买入的短期股票
  • 检测器实现技术面检测方法
  • 监控自选和持仓的股票,触发交易纪律则进行提醒
  • 提供 WEB 界面操作
  • 提供终端界面操作
  • 导入自选通过接口实现自动化
  • 实现支持完整的东方财富选股器条件

我的选股规则

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

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 + 今年 Q1 营收增长比))

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. 配发股利

我的交易纪律

长线

TODO

短线

TODO

使用方法

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

查看使用说明:

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

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

官网地址: http://x-stock.axiaoxin.com

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 文件。

查看使用说明:

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

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

OPTIONS:
   --filename value, -f value                      指定导出文件名 (default: ./dist/x-stock.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.min_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 文件:
./x-stock -l error exportor -f ./stocks.json
  • 导出 CSV 文件:
./x-stock -l error exportor -f ./stocks.csv
  • 导出 EXCEL 文件:
./x-stock -l error exportor -f ./stocks.xlsx
  • 导出 PNG 图片:
./x-stock -l error exportor -f ./stocks.png
  • 导出全部支持的类型:
./x-stock -l error exportor -f ./stocks.all
  • 自定义筛选、检测参数
./x-stock -l error exportor -f ./stocks.xlsx --filter.min_roe=6 --checker.min_roe=6

checker

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

查看使用说明:

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

USAGE:
   x-stock 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.min_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)

命令行使用示例:

./x-stock -l error checker -k 比亚迪

检测结果:

欢迎 Star

Stargazers over time

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

    [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 https://github.com/axiaoxin-com/x-stock/issues/25

    问题解决:

    • 下载分发文件 tzdata.zip

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

    • x-stock webserver

    参考:

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

    opened by GGACHA 4
  • win10 cmd运行exe,提示找不到json

    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,是要自己设置这几个配置文件吗?有没有默认配置呀

    opened by mo-joy 3
  • 不通过web 启动,单纯的使用exportor 会导致任务卡死

    不通过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 的时候,设置为默认值

    opened by zhqqqy 1
  • x-stock改名

    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.

    opened by axiaoxin 0
  • 修复按关键字checker银行股信息时,不良贷款率,不良贷款拨备覆盖率结果为资本充足率的值的bug

    修复按关键字checker银行股信息时,不良贷款率,不良贷款拨备覆盖率结果为资本充足率的值的bug

    问题原因:不良贷款率、不良贷款拨备覆盖率的值错误使用了资本充足率的值即Newcapitalader。

    解决方法:将不良贷款率、不良贷款拨备覆盖率使用正确的值即NonPerLoan、Bldkbbl

    验证过程: 使用 q-stock checker -k xyyh 命令查询兴业银行的信息

    | 资本充足率 | 资本充足率:12.590000 | +------------------------------------+-----------------------------------+ | 不良贷款率 | 不良贷款率:12.590000 | +------------------------------------+-----------------------------------+ | 负债率 | 负债率:92.014855 | +------------------------------------+-----------------------------------+ | 不良贷款拨备覆盖率 | 不良贷款拨备覆盖率:12.590000

    修改后

    +--------------------------------------+-----------------------------------+ | 不良贷款拨备覆盖率 | 不良贷款拨备覆盖率:256.940000 | +--------------------------------------+-----------------------------------+ | PEG | PEG:1.055440715292834 | +--------------------------------------+-----------------------------------+ | 配发股利股息 | 最新股息率: 4.081425 | +--------------------------------------+-----------------------------------+ | 行业均值水平估值 | 低于行业均值水平 | +--------------------------------------+-----------------------------------+ | 市值 | 市值:4044.73 亿 | +--------------------------------------+-----------------------------------+ | 资本充足率 | 资本充足率:12.590000 +--------------------------------------+-----------------------------------+ | 不良贷款率 | 不良贷款率:1.150000 | +--------------------------------------+-----------------------------------+

    opened by qinguangrui 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.

    opened by axiaoxin 0
  • PEG检测范围需>0

    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.

    opened by axiaoxin 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.

    opened by axiaoxin 0
  • 日志调整

    日志调整

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

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

    opened by axiaoxin 0
  • 基金检测中部分港股被误判为A股

    基金检测中部分港股被误判为A股

    Describe the bug 单纯以易方达优质精选混合(QDII)(110011) 为例,此基金三季度报持仓明细在第10页-12页中,其中的港股有2个被误判成实际并未持仓的A股。

    To Reproduce 复现步骤,打开网页端,基金,基金检测,输入110011,勾选检测持仓个股,得到结果。

    Expected behavior 无法检测的港股不要误判成A股

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

    净收入没有持续高于经营产生的现金流(超过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.

    opened by axiaoxin 1
  • roic>10%

    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.

    opened by axiaoxin 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.

    opened by angel126 1
Releases(v1.3.5)
Owner
github.com/axiaoxin-com
axiaoxin's open source project
github.com/axiaoxin-com
Golang library with POSIX-compliant command-line UI (CLI) and Hierarchical-configuration. Better substitute for stdlib flag.

cmdr cmdr is a POSIX-compliant, command-line UI (CLI) library in Golang. It is a getopt-like parser of command-line options, be compatible with the ge

hz 116 Oct 28, 2022
Fully featured Go (golang) command line option parser with built-in auto-completion support.

go-getoptions Go option parser inspired on the flexibility of Perl’s GetOpt::Long. Table of Contents Quick overview Examples Simple script Program wit

David Gamba 46 Sep 26, 2022
CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser

CONTRIBUTIONS ONLY What does this mean? I do not have time to fix issues myself. The only way fixes or new features will be added is by people submitt

Alec Thomas 3.3k Nov 24, 2022
A CLI tool implemented by Golang to manage `CloudComb` resource

CloudComb CLI tool: comb Get Started comb is a CLI tool for manage resources in CloudComb base on cloudcomb-go-sdk. Support Mac, Linux and Windows. We

Bingo Huang 22 Jan 4, 2021
Automatically generate Go (golang) struct definitions from example JSON

gojson gojson generates go struct definitions from json or yaml documents. Example $ curl -s https://api.github.com/repos/chimeracoder/gojson | gojson

Aditya Mukerjee 2.6k Nov 22, 2022
Command Line Alias Manager and Plugin System - Written in Golang

aly - Command Line Alias Manager and Packager Aly offers the simplest way to manage, share, and obtain command line aliases! Warning: This project is

Max Bridgland 21 Jun 16, 2022
💻 PTerm | Pretty Terminal Printer A golang module to print pretty text

✨ PTerm is a modern go module to beautify console output. Featuring charts, progressbars, tables, trees, and many more ?? It's completely configurable and 100% cross-platform compatible.

null 3.1k Nov 29, 2022
A collection of terminal-based widgets for richer Golang CLI apps.

Flinch A collection of terminal-based widgets for richer Golang CLI apps. Ships with a library to build your own widgets/TUIs too. Warning: This modul

Liam Galvin 38 Oct 15, 2022
A really basic thread-safe progress bar for Golang applications

progressbar A very simple thread-safe progress bar which should work on every OS without problems. I needed a progressbar for croc and everything I tr

Zack 2.9k Dec 2, 2022
Console progress bar for Golang

Terminal progress bar for Go Installation go get github.com/cheggaaa/pb/v3 Documentation for v1 bar available here Quick start package main import (

Sergey Cherepanov 3.3k Nov 22, 2022
Color package for Go (golang)

color Color lets you use colorized outputs in terms of ANSI Escape Codes in Go (Golang). It has support for Windows too! The API can be used in severa

Fatih Arslan 5.8k Dec 2, 2022
Golang terminal dashboard

termui termui is a cross-platform and fully-customizable terminal dashboard and widget library built on top of termbox-go. It is inspired by blessed-c

Zack Guo 12.2k Nov 28, 2022
A library for writing system daemons in golang.

go-daemon Library for writing system daemons in Go. Now supported only UNIX-based OS (Windows is not supported). But the library was tested only on Li

Sergey Yarmonov 1.8k Dec 1, 2022
Go (golang) package with 70+ configurable terminal spinner/progress indicators.

Spinner spinner is a simple package to add a spinner / progress indicator to any terminal application. Examples can be found below as well as full exa

Brian Downs 1.9k Nov 15, 2022
ASCII table in golang

ASCII Table Writer Generate ASCII table on the fly ... Installation is simple as go get github.com/olekukonko/tablewriter Features Automatic Padding

Oleku Konko 3.6k Dec 1, 2022
Basic command line example using golang grpc client tools

This is a basic command line interface that demonstrates using the golang GRPC API. The API is reused between dishy and the wifi router, however both

null 40 Nov 7, 2022
Rule engine implementation in Golang

"Gopher Holds The Rules" Grule-Rule-Engine import "github.com/hyperjumptech/grule-rule-engine" Rule Engine for Go Grule is a Rule Engine library for t

Hyperjump 1.5k Dec 1, 2022
Got: Simple golang package and CLI tool to download large files faster 🏃 than cURL and Wget!

Got. Simple and fast concurrent downloader. Installation ❘ CLI Usage ❘ Module Usage ❘ License Comparison Comparison in cloud server: [[email protected]

Mohamed El Bahja 616 Nov 25, 2022
Modern ls command with vscode like File Icon and Git Integrations. Written in Golang

logo-ls modern ls command with beautiful Icons and Git Integrations . Written in Golang Command and Arguments supported are listed in HELP.md Table of

Yash Handa 936 Nov 23, 2022