axiaoxin-com / investool Goto Github PK
View Code? Open in Web Editor NEWGolang实现财报分析、个股基本面检测、基本面选股、4433法则基金筛选与检测、基金持仓相似度、股票选基、基金经理筛选
Home Page: https://axiaoxin.com/investool
License: Apache License 2.0
Golang实现财报分析、个股基本面检测、基本面选股、4433法则基金筛选与检测、基金持仓相似度、股票选基、基金经理筛选
Home Page: https://axiaoxin.com/investool
License: Apache License 2.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.
如题
输入多只股票输出同时持有这些股票的基金
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
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):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
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):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
大佬 请问您考虑过开发一个docker的web版本么 谢谢了
哈喽大佬,我想问下以前您的网站里面有股票的基本面查询,为啥现在找不到了是下线了吗?
Describe the bug
单纯以易方达优质精选混合(QDII)(110011) 为例,此基金三季度报持仓明细在第10页-12页中,其中的港股有2个被误判成实际并未持仓的A股。
To Reproduce
复现步骤,打开网页端,基金,基金检测,输入110011,勾选检测持仓个股,得到结果。
Expected behavior
无法检测的港股不要误判成A股
这个输出的股票,是什么判断依据,代表什么呢
网页请求没有设置超时时间,后端nginx超时为600s,golang server 超时10分钟。怀疑是浏览器自己超时断开链接。服务端完成整个筛选大约在30秒内。
来自firefox的请求全部出现broken pipe,页面无响应,chrome请求是正常的。
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.
Describe the bug
x-stock 不通过web 启动,单纯的使用exportor 会导致任务卡死,
To Reproduce
Steps to reproduce the behavior:
Expected behavior
应该导出excel 表格
Desktop (please complete the following information):
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 的时候,设置为默认值
Describe the bug
v1.2.27-28 在未安装go环境的windows上读取时区出错
To Reproduce
env = "localhost"
为 env = "prod"
方便手动更新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):
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级公司债券的当期收益率
合理价差=预估合理价/当前价格*100%
core/searcher.go:func1:57 market类型
eastmoney/select_stocks.go:QuerySelectedStocksWithFilter:232
eastmoney/select_stocks.go:QuerySelectedStocksWithFilter:241 改为info
直接运行
go run main.go json -d
好像并没有线上那么多数据
(a)购买市盈率较低的重要企业(比如道琼斯中的企业)的股票;(b)挑选价格低于净流动资产价值(或营运资本价值)的各类股票。
添加成立年数条件、取消强制排除成立在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.
QuerySelectedStocksWithFilter 方法
如果是港股的话,返回数据为空。比如腾讯00700。
作为普通的java开发, 看到go 有点不懂, 我能否摘抄里面的api路径, 自己用java去玩一遍?
7年平均eps*最高的25倍市盈率
能否增加持有人结构数据
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,通过 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.
https://suggest3.sinajs.cn/suggest/key=东方
腾讯证券搜不到东方生物
接口返回空数据。
解决方案已验证:
请求参数SECURITY_CODE换成SECUCODE
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.