Giter VIP home page Giter VIP logo

axiaoxin-com / investool Goto Github PK

View Code? Open in Web Editor NEW
1.3K 31.0 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%
stock eastmoney fund

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  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.

股票选基金

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

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

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.

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.

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.

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.

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

[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

内在价值

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

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

日志调整

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

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

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

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

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.

支持神奇九转

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.

HK 股票无数据返回

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

api 列表

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

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.

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

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

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.

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.