stockproof 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. stockproof-0.3.0/LICENSE +21 -0
  2. stockproof-0.3.0/PKG-INFO +276 -0
  3. stockproof-0.3.0/README.md +248 -0
  4. stockproof-0.3.0/pyproject.toml +46 -0
  5. stockproof-0.3.0/setup.cfg +4 -0
  6. stockproof-0.3.0/setup.py +5 -0
  7. stockproof-0.3.0/stockproof/__init__.py +15 -0
  8. stockproof-0.3.0/stockproof/__main__.py +5 -0
  9. stockproof-0.3.0/stockproof/announcements.py +263 -0
  10. stockproof-0.3.0/stockproof/backtest.py +282 -0
  11. stockproof-0.3.0/stockproof/cli.py +1121 -0
  12. stockproof-0.3.0/stockproof/clock.py +14 -0
  13. stockproof-0.3.0/stockproof/cn.py +513 -0
  14. stockproof-0.3.0/stockproof/companies.py +51 -0
  15. stockproof-0.3.0/stockproof/compare.py +146 -0
  16. stockproof-0.3.0/stockproof/core.py +124 -0
  17. stockproof-0.3.0/stockproof/dashboard.py +788 -0
  18. stockproof-0.3.0/stockproof/dashboard_page.py +1152 -0
  19. stockproof-0.3.0/stockproof/demo.py +56 -0
  20. stockproof-0.3.0/stockproof/demo_data/calendar.json +1 -0
  21. stockproof-0.3.0/stockproof/demo_data/cn/eps_v2_000898.SZ.json +1 -0
  22. stockproof-0.3.0/stockproof/demo_data/cn/eps_v2_00700.HK.json +1 -0
  23. stockproof-0.3.0/stockproof/demo_data/cn/eps_v2_09988.HK.json +1 -0
  24. stockproof-0.3.0/stockproof/demo_data/cn/eps_v2_300750.SZ.json +1 -0
  25. stockproof-0.3.0/stockproof/demo_data/cn/eps_v2_600519.SH.json +1 -0
  26. stockproof-0.3.0/stockproof/demo_data/cn/names.json +1 -0
  27. stockproof-0.3.0/stockproof/demo_data/dashboard.json +1 -0
  28. stockproof-0.3.0/stockproof/demo_data/demo.json +1 -0
  29. stockproof-0.3.0/stockproof/demo_data/digests/2026-10-30.html +53 -0
  30. stockproof-0.3.0/stockproof/demo_data/digests/2026-10-30.json +1 -0
  31. stockproof-0.3.0/stockproof/demo_data/lab/reports/20261030-064920-f50929.html +66 -0
  32. stockproof-0.3.0/stockproof/demo_data/lab/reports/20261030-065010-434ad9.html +66 -0
  33. stockproof-0.3.0/stockproof/demo_data/lab/trials.jsonl +2 -0
  34. stockproof-0.3.0/stockproof/demo_data/policy/industry_map.json +1 -0
  35. stockproof-0.3.0/stockproof/demo_data/policy/results.json +1 -0
  36. stockproof-0.3.0/stockproof/demo_data/quotes/000898.SZ.csv +487 -0
  37. stockproof-0.3.0/stockproof/demo_data/quotes/00700.HK.csv +494 -0
  38. stockproof-0.3.0/stockproof/demo_data/quotes/09988.HK.csv +494 -0
  39. stockproof-0.3.0/stockproof/demo_data/quotes/300750.SZ.csv +488 -0
  40. stockproof-0.3.0/stockproof/demo_data/quotes/600519.SH.csv +487 -0
  41. stockproof-0.3.0/stockproof/demo_data/quotes/AAPL.csv +503 -0
  42. stockproof-0.3.0/stockproof/demo_data/quotes/BABA.csv +503 -0
  43. stockproof-0.3.0/stockproof/demo_data/quotes/JPM.csv +503 -0
  44. stockproof-0.3.0/stockproof/demo_data/quotes/MRK.csv +503 -0
  45. stockproof-0.3.0/stockproof/demo_data/quotes/MSFT.csv +503 -0
  46. stockproof-0.3.0/stockproof/demo_data/quotes/NVDA.csv +503 -0
  47. stockproof-0.3.0/stockproof/demo_data/quotes/_CSI300.csv +488 -0
  48. stockproof-0.3.0/stockproof/demo_data/quotes/_HSI.csv +494 -0
  49. stockproof-0.3.0/stockproof/demo_data/quotes/_SPX.csv +503 -0
  50. stockproof-0.3.0/stockproof/demo_data/research/cn_backtest.json +1 -0
  51. stockproof-0.3.0/stockproof/demo_data/research/cn_earnings.csv +11064 -0
  52. stockproof-0.3.0/stockproof/demo_data/research/cn_meta.json +1 -0
  53. stockproof-0.3.0/stockproof/demo_data/research/cn_news.csv +65 -0
  54. stockproof-0.3.0/stockproof/demo_data/research/us_backtest.json +1 -0
  55. stockproof-0.3.0/stockproof/demo_data/research/us_earnings.csv +2469 -0
  56. stockproof-0.3.0/stockproof/demo_data/research/us_meta.json +1 -0
  57. stockproof-0.3.0/stockproof/demo_data/research/us_news.csv +595 -0
  58. stockproof-0.3.0/stockproof/demo_data/screens/cn_2026-10-29.json +1 -0
  59. stockproof-0.3.0/stockproof/demo_data/screens/cn_backtest.json +1 -0
  60. stockproof-0.3.0/stockproof/demo_data/screens/scorecards_2026-10-30.json +1 -0
  61. stockproof-0.3.0/stockproof/demo_data/sec/company_tickers.json +1 -0
  62. stockproof-0.3.0/stockproof/demo_data/sec/facts_1045810.json +1 -0
  63. stockproof-0.3.0/stockproof/demo_data/sec/facts_1577552.json +1 -0
  64. stockproof-0.3.0/stockproof/demo_data/sec/facts_19617.json +1 -0
  65. stockproof-0.3.0/stockproof/demo_data/sec/facts_310158.json +1 -0
  66. stockproof-0.3.0/stockproof/demo_data/sec/facts_320193.json +1 -0
  67. stockproof-0.3.0/stockproof/demo_data/sec/facts_789019.json +1 -0
  68. stockproof-0.3.0/stockproof/demo_data/stockproof.db +0 -0
  69. stockproof-0.3.0/stockproof/digest.py +214 -0
  70. stockproof-0.3.0/stockproof/earnings.py +184 -0
  71. stockproof-0.3.0/stockproof/earnings_calendar.py +204 -0
  72. stockproof-0.3.0/stockproof/earnings_report.py +116 -0
  73. stockproof-0.3.0/stockproof/eps.py +100 -0
  74. stockproof-0.3.0/stockproof/explain.py +152 -0
  75. stockproof-0.3.0/stockproof/i18n.py +479 -0
  76. stockproof-0.3.0/stockproof/lab.py +904 -0
  77. stockproof-0.3.0/stockproof/lab_report.py +217 -0
  78. stockproof-0.3.0/stockproof/llm.py +98 -0
  79. stockproof-0.3.0/stockproof/mcp_server.py +944 -0
  80. stockproof-0.3.0/stockproof/news.py +91 -0
  81. stockproof-0.3.0/stockproof/policy.py +514 -0
  82. stockproof-0.3.0/stockproof/portfolio.py +328 -0
  83. stockproof-0.3.0/stockproof/portfolio_report.py +121 -0
  84. stockproof-0.3.0/stockproof/quotes.py +202 -0
  85. stockproof-0.3.0/stockproof/report.py +146 -0
  86. stockproof-0.3.0/stockproof/research.py +556 -0
  87. stockproof-0.3.0/stockproof/research_cn.py +415 -0
  88. stockproof-0.3.0/stockproof/research_report.py +449 -0
  89. stockproof-0.3.0/stockproof/schedule.py +323 -0
  90. stockproof-0.3.0/stockproof/scorecard.py +476 -0
  91. stockproof-0.3.0/stockproof/scoring.py +83 -0
  92. stockproof-0.3.0/stockproof/screener.py +551 -0
  93. stockproof-0.3.0/stockproof/sec.py +103 -0
  94. stockproof-0.3.0/stockproof/store.py +169 -0
  95. stockproof-0.3.0/stockproof/summary.py +71 -0
  96. stockproof-0.3.0/stockproof.egg-info/PKG-INFO +276 -0
  97. stockproof-0.3.0/stockproof.egg-info/SOURCES.txt +121 -0
  98. stockproof-0.3.0/stockproof.egg-info/dependency_links.txt +1 -0
  99. stockproof-0.3.0/stockproof.egg-info/entry_points.txt +2 -0
  100. stockproof-0.3.0/stockproof.egg-info/requires.txt +18 -0
  101. stockproof-0.3.0/stockproof.egg-info/top_level.txt +1 -0
  102. stockproof-0.3.0/tests/test_announcements.py +66 -0
  103. stockproof-0.3.0/tests/test_backtest.py +82 -0
  104. stockproof-0.3.0/tests/test_calendar.py +65 -0
  105. stockproof-0.3.0/tests/test_cli_menu.py +27 -0
  106. stockproof-0.3.0/tests/test_cn.py +287 -0
  107. stockproof-0.3.0/tests/test_compare.py +46 -0
  108. stockproof-0.3.0/tests/test_dashboard.py +164 -0
  109. stockproof-0.3.0/tests/test_demo.py +78 -0
  110. stockproof-0.3.0/tests/test_digest.py +44 -0
  111. stockproof-0.3.0/tests/test_earnings.py +256 -0
  112. stockproof-0.3.0/tests/test_lab.py +201 -0
  113. stockproof-0.3.0/tests/test_mcp.py +190 -0
  114. stockproof-0.3.0/tests/test_moves.py +86 -0
  115. stockproof-0.3.0/tests/test_policy.py +162 -0
  116. stockproof-0.3.0/tests/test_portfolio.py +79 -0
  117. stockproof-0.3.0/tests/test_rename.py +58 -0
  118. stockproof-0.3.0/tests/test_research.py +246 -0
  119. stockproof-0.3.0/tests/test_research_cn.py +206 -0
  120. stockproof-0.3.0/tests/test_schedule.py +116 -0
  121. stockproof-0.3.0/tests/test_scorecard.py +140 -0
  122. stockproof-0.3.0/tests/test_screener.py +232 -0
  123. stockproof-0.3.0/tests/test_stockproof.py +231 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jitao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,276 @@
1
+ Metadata-Version: 2.4
2
+ Name: stockproof
3
+ Version: 0.3.0
4
+ Summary: LLM stock research with cited sources (news, earnings, filings), tested on 10 years of point-in-time data: quant lab, portfolio check-up, web dashboard, DeepSeek Harness / MCP plugin. US, China A-shares, HK.
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/taoqizhang55-code/stockproof
7
+ Project-URL: Issues, https://github.com/taoqizhang55-code/stockproof/issues
8
+ Keywords: stocks,llm,sentiment,earnings,a-shares,deepseek,deepseek-harness,event-study,backtesting,mcp
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Topic :: Office/Business :: Financial :: Investment
12
+ Classifier: Natural Language :: Chinese (Simplified)
13
+ Classifier: Natural Language :: English
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: requests>=2.25
18
+ Requires-Dist: pandas>=1.3
19
+ Provides-Extra: dev
20
+ Requires-Dist: pytest; extra == "dev"
21
+ Provides-Extra: cn
22
+ Requires-Dist: akshare; python_version >= "3.11" and extra == "cn"
23
+ Provides-Extra: research
24
+ Requires-Dist: yfinance; extra == "research"
25
+ Provides-Extra: mcp
26
+ Requires-Dist: mcp; python_version >= "3.10" and extra == "mcp"
27
+ Dynamic: license-file
28
+
29
+ # stockproof · 有据
30
+
31
+ **An LLM reads stock news, earnings reports and company announcements for you, with every point linked to its
32
+ source. A research toolkit then checks each signal against years of prices, and the app tells you what that
33
+ check found.** US stocks, China A-shares and Hong Kong. English and 中文.
34
+
35
+ [![tests](https://github.com/taoqizhang55-code/stockproof/actions/workflows/tests.yml/badge.svg)](https://github.com/taoqizhang55-code/stockproof/actions/workflows/tests.yml)
36
+ ![python](https://img.shields.io/badge/python-3.10%2B-blue) ![license](https://img.shields.io/badge/license-MIT-green)
37
+ · [中文说明](https://github.com/taoqizhang55-code/stockproof/blob/main/README.zh-CN.md)
38
+
39
+ **Try it offline in 30 seconds** (no API key, no time limit). The demo opens the full dashboard on bundled real
40
+ data; only buttons that need the internet or an AI model are turned off:
41
+
42
+ ```bash
43
+ pip install stockproof
44
+ stockproof demo
45
+ ```
46
+
47
+ No GitHub account or git needed. In mainland China, a mirror is faster:
48
+ `pip install stockproof -i https://pypi.tuna.tsinghua.edu.cn/simple`
49
+
50
+ Liked it? The [10-minute tour](#10-minute-tour) takes you from the demo to your own stocks, a backtest and a
51
+ portfolio check-up.
52
+
53
+ ![Screen and evidence scorecard](https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/screen.png)
54
+
55
+ ## What it does
56
+
57
+ **Daily stock watching**
58
+
59
+ | | Command | What you get |
60
+ |---|---|---|
61
+ | **News mood** | `scan` | Headlines for each stock, scored by an LLM for **relevance** and sentiment. Stories about other companies and repeats of the same event are dropped. |
62
+ | **Earnings** | `earnings` | The company's own release (SEC 8-K/6-K, Eastmoney for China) read by the LLM: tone, guidance, key points and risks, plus the **earnings surprise (SUE)** from point-in-time EPS. |
63
+ | **Announcements** | dashboard | A-share and HK filings are classified by importance (insider selling, regulator letters, buybacks, big contracts and more), and the important ones are summarized. |
64
+ | **Why did it move?** | dashboard | For an unusual move, the LLM explains it using only the news, filings and reports published around that day, cites each one, and says so when nothing explains the move. |
65
+ | **What changed?** | dashboard | The latest two reports compared: results, outlook, new risks, business and payouts. |
66
+ | **Daily digest · calendar · schedule** | `daily`, `calendar`, `schedule` | A daily summary of your watchlist, upcoming reports, and an automatic run every evening (macOS, Windows, Linux), with a desktop notification. |
67
+
68
+ **Screen and scorecards**
69
+
70
+ | | Command | What you get |
71
+ |---|---|---|
72
+ | **Whole-market screen** | `screen` | Every A-share ranked by earnings surprise, growth, ROE and trend, with at most 3 per industry and plain-language reasons. Any stock's rank can be looked up. |
73
+ | **Evidence scorecard** | `scorecard` | 0–100 per dimension, with cited evidence, positives and risks. **Each dimension shows whether history tests found it useful, and only tested dimensions count toward the total.** |
74
+
75
+ **Research and the quant lab**
76
+
77
+ | | Command | What you get |
78
+ |---|---|---|
79
+ | **Research** | `research` | Event studies and cost-aware backtests: does any of this predict returns? |
80
+ | **Policy signals** | `policy` | 新闻联播 since 2016, read for industry policy: stance and strength on the wording ladder (研究 → 稳步推进 → 加快 → 大力支持). |
81
+ | **Quant lab** | `lab` | Backtest **any** idea described as a small spec (earnings, 业绩预告, policy signals, factors) on point-in-time history, with an illustrated report. The last 2 years are **locked** until you confirm once, and every variant you try **raises the bar** for significance. |
82
+
83
+ **Your portfolio, and AI agents**
84
+
85
+ | | Command | What you get |
86
+ |---|---|---|
87
+ | **Portfolio check-up** | `portfolio` | Your holdings on real price history: concentration, holdings that secretly move together, where the risk comes from, and replays of the 2015 / 2018 / 2020 / 2021–22 / 2024 crashes on today's weights. |
88
+ | **AI agents** | `mcp` | 23 MCP tools (DeepSeek Harness plugin in `dsh-plugin/`; Claude and Cursor work too). Every feature above can be asked in plain words ("what can you do?" lists them), and the agent can **do research it can't do alone**: run backtests on real data, screen 5,000 stocks, check your portfolio. |
89
+
90
+ Everything runs in one local web page (`stockproof dashboard`). The **Home** tab shows what you can do, with clickable examples; the **Lab** tab backtests ideas from a form, no JSON needed; the **Portfolio** tab checks up your holdings and remembers them for next time. The first time you use stockproof in DeepSeek Harness, the agent lists everything it can do and suggests trying the dashboard; after that, ask "what can you do?", type `/stockproof` for ready-made requests, or say "open the dashboard". Say "open the dashboard's lab tab" to jump to a page. Running `stockproof` with no arguments prints the same grouped menu, and in DeepSeek Harness typing `/` lists ready-made prompts (check up a portfolio, backtest an idea, why did it move…).
91
+
92
+ <p align="center"><img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/dashboard.png" width="64%" alt="Dashboard"> <img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/scorecard.png" width="30%" alt="Evidence scorecard"></p>
93
+
94
+ ### What an LLM can't do alone — and can with stockproof
95
+
96
+ Ask DeepSeek Harness *"A 股业绩大超预期的公司,财报公布后第二天买入持有 20 天,扣费后能跑赢吗?"*. The model turns the
97
+ question into a spec, the lab runs it on ten years of point-in-time A-share data, and a report opens in your browser.
98
+ The answer was **no**: −3.6% a year (t = −2.0), positive in 3 of 4 years before 2020 and negative every year from 2020 to 2024. Ask for a variant
99
+ and the agent reports that the significance bar went up with the number of tries.
100
+
101
+ ![DeepSeek Harness runs a backtest with stockproof](https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/dsh_lab.png)
102
+
103
+ <p align="center"><img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/lab_report.png" width="48%" alt="Quant lab report"> <img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/portfolio.png" width="48%" alt="Portfolio check-up"></p>
104
+
105
+ In DeepSeek Harness, type `/stockproof` for ten ready-made requests:
106
+
107
+ <p align="center"><img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/dsh_skills.png" width="80%" alt="stockproof skills in the DeepSeek Harness / menu"></p>
108
+
109
+ ## What the research found
110
+
111
+ Run on the author's data (2016–2026). Each result is a click away in the Research tab, with t-statistics and caveats.
112
+
113
+ | Question | Answer |
114
+ |---|---|
115
+ | Do prices react to earnings surprises? | **Yes, on the day.** Good minus bad SUE: US large caps +1.7% (t = 5.4), CSI 300 +2.0% (t = 17.4). Dated by the 10-Q or legal deadline instead, the reaction is gone, so the real date matters. |
116
+ | Does the LLM's reading add anything? | **Yes, for the reaction.** On 472 US releases, tone explains the day's move where SUE does not (tone t = 3.1, SUE t = −0.5; R² 0.004 → 0.035). A-shares: negative tone −1.3% (t = −4.2). |
117
+ | …and does it predict what happens next? | **No.** Tone does not predict days 2–61 (t = 0.6). |
118
+ | Post-earnings drift? | Gone in US large caps since 2021. Still present in A-shares (+2.2%, t = 2.5), **but long-only it earns +0.3%/yr after costs** (t = 0.2): the drift sits on the short side, which A-share investors can hardly trade. |
119
+ | Does a fundamentals screen beat the market? | **No.** Top 30 by the composite score: +1.3%/yr vs the same universe (t = 0.5). Momentum alone: +6.4%/yr (t = 1.5, not significant). |
120
+ | Does 新闻联播 policy wording predict industry returns? | **Not tradably.** Over 8,490 new central measures, the strength of the wording is priced in **before the open** (+0.03%, t = 5.3; strongest level +0.12%). Afterwards, supported industries do slightly worse. Backtest: +0.6%/yr (t = 0.4). |
121
+
122
+ The pattern holds across all of these: public information is priced fast. So stockproof helps you **read and check
123
+ evidence faster**. It does not hand you a trading signal, and the app says this wherever it shows a score.
124
+
125
+ ## Principles
126
+
127
+ - **Cited, not invented.** The LLM may only use the numbered items it is given. Uncited points are dropped, and
128
+ "unexplained" is an allowed answer.
129
+ - **Scores carry their track record.** ✓ useful in tests · tested, not significant · ? not tested yet.
130
+ - **Point-in-time.** EPS as first reported, real announcement dates, entry after the news. No peeking ahead.
131
+ - **Any LLM.** DeepSeek (default), OpenAI, Qwen, a local Ollama model, or any OpenAI-compatible API. Each
132
+ item is read once and cached in SQLite, so daily use costs cents.
133
+ - **No paid data.** SEC EDGAR, Yahoo/Google News RSS, Nasdaq, and Eastmoney / Sina / CCTV / Shenwan via AKShare.
134
+ - **Local and private.** The dashboard listens on 127.0.0.1 only and refuses requests from other websites. API
135
+ keys are read from the environment and never written to disk.
136
+
137
+ ## Install
138
+
139
+ Python 3.10+ (3.11+ for China markets).
140
+
141
+ Works on macOS, Windows and Linux (tested on all three in CI).
142
+
143
+ ```bash
144
+ pip install "stockproof[cn,mcp]"
145
+ ```
146
+
147
+ Then give it an API key (DeepSeek by default; `stockproof providers` lists the others). US earnings also need a
148
+ contact for the SEC.
149
+
150
+ **macOS / Linux** — add to `~/.zshrc` (or `~/.bashrc`) so it is kept, then open a new terminal:
151
+
152
+ ```bash
153
+ export DEEPSEEK_API_KEY="sk-..."
154
+ export STOCKPROOF_SEC_CONTACT="Your Name you@example.com"
155
+ ```
156
+
157
+ **Windows** — in PowerShell (saved for your user; open a new window afterwards):
158
+
159
+ ```powershell
160
+ setx DEEPSEEK_API_KEY "sk-..."
161
+ setx STOCKPROOF_SEC_CONTACT "Your Name you@example.com"
162
+ ```
163
+
164
+ Then start the dashboard:
165
+
166
+ ```bash
167
+ stockproof dashboard
168
+ ```
169
+
170
+ Add stocks in the page (`AAPL`, `600519`, `300750`, `00700` …) and click **Refresh news** / **Refresh earnings**.
171
+
172
+ ## 10-minute tour
173
+
174
+ After [installing](#install) and setting your API key:
175
+
176
+ 1. **Look around the demo (2 min).** `stockproof demo`, then open each tab. The Home tab shows what you can do,
177
+ with examples to click.
178
+ 2. **Your own stocks (3 min).** `stockproof dashboard` → Stocks tab → type a few codes (`AAPL, 600519, 00700`) →
179
+ **Add** → **Refresh news**, then **Refresh earnings**. The first refresh takes about a minute per stock. Click a
180
+ row for its news, earnings read and announcements; click **Why?** next to an unusual move.
181
+ 3. **Test an idea (2 min).** Lab tab → click a template, e.g. "Buy after big earnings beats, hold 20 days" →
182
+ **Backtest**. Read the verdict, then change a condition and run it again: the significance bar goes up
183
+ with each variant you try.
184
+ 4. **Check your portfolio (1 min).** Portfolio check-up tab → type your holdings (`600519 100, AAPL 50`) → **Check my
185
+ portfolio**. The report shows concentration, holdings that move together and how today's weights did in
186
+ past crashes.
187
+ 5. **Ask in plain words (1 min, optional).** `stockproof mcp --install-dsh`, restart DeepSeek Harness, type
188
+ `/stockproof` or ask "what can you do?".
189
+ 6. **Keep it up to date (1 min).** `stockproof schedule --time 21:00` refreshes your watchlist every evening and
190
+ writes the daily digest (macOS, Windows, Linux).
191
+
192
+ ## Commands
193
+
194
+ ```bash
195
+ stockproof dashboard # everything in one local page
196
+ stockproof scan AAPL 600519 00700 --lang zh # news mood report
197
+ stockproof earnings AAPL MSFT --open # latest releases read by the LLM, with SUE
198
+ stockproof screen --top 30 # whole-market A-share screen
199
+ stockproof screen --backtest --skip-screen # test the screening rule on history
200
+ stockproof scorecard # evidence cards for the screen's top 10
201
+ stockproof scorecard 600519 NVDA # …or for any stocks
202
+ stockproof research --market cn --open # earnings event study + backtest (us / cn)
203
+ stockproof policy # 新闻联播 policy study (first run: a few hours of downloads)
204
+ stockproof daily # one refresh of the watchlist + daily digest
205
+ stockproof schedule --time 21:00 # run `daily` every evening (macOS, Windows, Linux)
206
+ stockproof calendar # who reports in the next two weeks
207
+ stockproof mcp --install-dsh # add to DeepSeek Harness on this computer (desktop app too)
208
+ stockproof lab caps # quant lab: what can be tested here
209
+ stockproof lab run '{"type":"earnings","filters":[{"field":"sue","op":">=","value":2}],"hold_days":20}' --open
210
+ stockproof lab confirm <id> # one shot on the locked holdout
211
+ stockproof portfolio "600519 100, 00700 300, AAPL 50" # portfolio check-up
212
+ stockproof demo # offline demo, no key
213
+ ```
214
+
215
+ Chinese codes can be typed in any common form: `600519`, `600519.SS`, `300750`, `920001`, `700`, `0700.HK`.
216
+
217
+ ## How the pieces work
218
+
219
+ <details><summary><b>News relevance</b></summary>
220
+
221
+ A feed for MRK also returns stories about the German Merck KGaA, a feed for GE returns GE HealthCare news, and
222
+ NVDA appears in every "stock market today" article (in one scan only 2 of 14 headlines were really about
223
+ Nvidia). The model gives each headline a relevance score (0–1) and a sentiment score (−1 to +1), with a reason.
224
+ Off-topic stories stay visible but are not counted. When several headlines cover the same event, the model
225
+ marks them as duplicates, so the event counts once.
226
+ </details>
227
+
228
+ <details><summary><b>Earnings and SUE</b></summary>
229
+
230
+ SUE = (this quarter's EPS − the same quarter last year) / standard deviation of the previous 8 such changes,
231
+ using EPS as first reported. US quarters come from SEC XBRL, and Q4 = full year − Q1–Q3. A-share reports are
232
+ year-to-date totals, so single quarters are derived by subtraction. Announcement dates come from the 8-K
233
+ Item 2.02 filing (after 16:00 New York time counts as the next day) or from Eastmoney's 预约披露 actual
234
+ disclosure date.
235
+ </details>
236
+
237
+ <details><summary><b>Screen and scorecard</b></summary>
238
+
239
+ - **Screen:** fundamentals for all ~5,200 A-shares come from Eastmoney's 业绩报表 tables (one download per report period).
240
+ - Filters: no ST stocks, market value ≥ 50亿, at least 2 years listed.
241
+ - Score: the average percentile of five factors.
242
+ - **Scorecard:** six dimensions plus industry policy, with one LLM call per stock per day.
243
+ - Earnings quality asks whether growth comes from the core business and is backed by cash, or from one-offs.
244
+ - Announcements count each kind of event once, since one buyback can produce ten filings.
245
+ </details>
246
+
247
+ <details><summary><b>Backtests</b></summary>
248
+
249
+ - **Entry and holding:** entry at the close after the reaction (earnings) or at the next open (policy), with
250
+ capital split into slots and empty slots holding the market.
251
+ - **A-share costs and trading rules:**
252
+ - Commission 0.025% per side, slippage 0.1% per side.
253
+ - Stamp duty on sales: 0.1%, or 0.05% from 2023-08-28.
254
+ - Price limits are respected, at 10% / 20% / 30% depending on the board.
255
+ - **Benchmark:** the equal-weighted average of the stocks studied, because today's CSI 300 members beat the
256
+ index by 13% a year (survivorship).
257
+ </details>
258
+
259
+ ## Data sources and limits
260
+
261
+ - **Sources:** SEC EDGAR, Nasdaq, Yahoo/Google News RSS, and Eastmoney, Sina, CCTV and Shenwan via AKShare.
262
+ - These are free, public, unofficial endpoints. They can change or rate-limit you.
263
+ - stockproof slows down, retries, and stops with a clear message when a source refuses.
264
+ - `tools/*_probe.py` checks which sources work from your network.
265
+ - **LLM errors:** models can misread. Every point links to the original, so check it.
266
+ - **Not investment advice.** The research above is part of the reason this tool doesn't give buy or sell calls.
267
+
268
+ ## Development
269
+
270
+ ```bash
271
+ pip install -e ".[dev,mcp]"
272
+ pytest # ~180 offline tests: fake feeds, fake LLM, fake AKShare; no key or network needed
273
+ python tools/make_demo.py # rebuild the demo bundle from your own stockproof_data
274
+ ```
275
+
276
+ MIT License.
@@ -0,0 +1,248 @@
1
+ # stockproof · 有据
2
+
3
+ **An LLM reads stock news, earnings reports and company announcements for you, with every point linked to its
4
+ source. A research toolkit then checks each signal against years of prices, and the app tells you what that
5
+ check found.** US stocks, China A-shares and Hong Kong. English and 中文.
6
+
7
+ [![tests](https://github.com/taoqizhang55-code/stockproof/actions/workflows/tests.yml/badge.svg)](https://github.com/taoqizhang55-code/stockproof/actions/workflows/tests.yml)
8
+ ![python](https://img.shields.io/badge/python-3.10%2B-blue) ![license](https://img.shields.io/badge/license-MIT-green)
9
+ · [中文说明](https://github.com/taoqizhang55-code/stockproof/blob/main/README.zh-CN.md)
10
+
11
+ **Try it offline in 30 seconds** (no API key, no time limit). The demo opens the full dashboard on bundled real
12
+ data; only buttons that need the internet or an AI model are turned off:
13
+
14
+ ```bash
15
+ pip install stockproof
16
+ stockproof demo
17
+ ```
18
+
19
+ No GitHub account or git needed. In mainland China, a mirror is faster:
20
+ `pip install stockproof -i https://pypi.tuna.tsinghua.edu.cn/simple`
21
+
22
+ Liked it? The [10-minute tour](#10-minute-tour) takes you from the demo to your own stocks, a backtest and a
23
+ portfolio check-up.
24
+
25
+ ![Screen and evidence scorecard](https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/screen.png)
26
+
27
+ ## What it does
28
+
29
+ **Daily stock watching**
30
+
31
+ | | Command | What you get |
32
+ |---|---|---|
33
+ | **News mood** | `scan` | Headlines for each stock, scored by an LLM for **relevance** and sentiment. Stories about other companies and repeats of the same event are dropped. |
34
+ | **Earnings** | `earnings` | The company's own release (SEC 8-K/6-K, Eastmoney for China) read by the LLM: tone, guidance, key points and risks, plus the **earnings surprise (SUE)** from point-in-time EPS. |
35
+ | **Announcements** | dashboard | A-share and HK filings are classified by importance (insider selling, regulator letters, buybacks, big contracts and more), and the important ones are summarized. |
36
+ | **Why did it move?** | dashboard | For an unusual move, the LLM explains it using only the news, filings and reports published around that day, cites each one, and says so when nothing explains the move. |
37
+ | **What changed?** | dashboard | The latest two reports compared: results, outlook, new risks, business and payouts. |
38
+ | **Daily digest · calendar · schedule** | `daily`, `calendar`, `schedule` | A daily summary of your watchlist, upcoming reports, and an automatic run every evening (macOS, Windows, Linux), with a desktop notification. |
39
+
40
+ **Screen and scorecards**
41
+
42
+ | | Command | What you get |
43
+ |---|---|---|
44
+ | **Whole-market screen** | `screen` | Every A-share ranked by earnings surprise, growth, ROE and trend, with at most 3 per industry and plain-language reasons. Any stock's rank can be looked up. |
45
+ | **Evidence scorecard** | `scorecard` | 0–100 per dimension, with cited evidence, positives and risks. **Each dimension shows whether history tests found it useful, and only tested dimensions count toward the total.** |
46
+
47
+ **Research and the quant lab**
48
+
49
+ | | Command | What you get |
50
+ |---|---|---|
51
+ | **Research** | `research` | Event studies and cost-aware backtests: does any of this predict returns? |
52
+ | **Policy signals** | `policy` | 新闻联播 since 2016, read for industry policy: stance and strength on the wording ladder (研究 → 稳步推进 → 加快 → 大力支持). |
53
+ | **Quant lab** | `lab` | Backtest **any** idea described as a small spec (earnings, 业绩预告, policy signals, factors) on point-in-time history, with an illustrated report. The last 2 years are **locked** until you confirm once, and every variant you try **raises the bar** for significance. |
54
+
55
+ **Your portfolio, and AI agents**
56
+
57
+ | | Command | What you get |
58
+ |---|---|---|
59
+ | **Portfolio check-up** | `portfolio` | Your holdings on real price history: concentration, holdings that secretly move together, where the risk comes from, and replays of the 2015 / 2018 / 2020 / 2021–22 / 2024 crashes on today's weights. |
60
+ | **AI agents** | `mcp` | 23 MCP tools (DeepSeek Harness plugin in `dsh-plugin/`; Claude and Cursor work too). Every feature above can be asked in plain words ("what can you do?" lists them), and the agent can **do research it can't do alone**: run backtests on real data, screen 5,000 stocks, check your portfolio. |
61
+
62
+ Everything runs in one local web page (`stockproof dashboard`). The **Home** tab shows what you can do, with clickable examples; the **Lab** tab backtests ideas from a form, no JSON needed; the **Portfolio** tab checks up your holdings and remembers them for next time. The first time you use stockproof in DeepSeek Harness, the agent lists everything it can do and suggests trying the dashboard; after that, ask "what can you do?", type `/stockproof` for ready-made requests, or say "open the dashboard". Say "open the dashboard's lab tab" to jump to a page. Running `stockproof` with no arguments prints the same grouped menu, and in DeepSeek Harness typing `/` lists ready-made prompts (check up a portfolio, backtest an idea, why did it move…).
63
+
64
+ <p align="center"><img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/dashboard.png" width="64%" alt="Dashboard"> <img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/scorecard.png" width="30%" alt="Evidence scorecard"></p>
65
+
66
+ ### What an LLM can't do alone — and can with stockproof
67
+
68
+ Ask DeepSeek Harness *"A 股业绩大超预期的公司,财报公布后第二天买入持有 20 天,扣费后能跑赢吗?"*. The model turns the
69
+ question into a spec, the lab runs it on ten years of point-in-time A-share data, and a report opens in your browser.
70
+ The answer was **no**: −3.6% a year (t = −2.0), positive in 3 of 4 years before 2020 and negative every year from 2020 to 2024. Ask for a variant
71
+ and the agent reports that the significance bar went up with the number of tries.
72
+
73
+ ![DeepSeek Harness runs a backtest with stockproof](https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/dsh_lab.png)
74
+
75
+ <p align="center"><img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/lab_report.png" width="48%" alt="Quant lab report"> <img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/portfolio.png" width="48%" alt="Portfolio check-up"></p>
76
+
77
+ In DeepSeek Harness, type `/stockproof` for ten ready-made requests:
78
+
79
+ <p align="center"><img src="https://raw.githubusercontent.com/taoqizhang55-code/stockproof/main/docs/images/dsh_skills.png" width="80%" alt="stockproof skills in the DeepSeek Harness / menu"></p>
80
+
81
+ ## What the research found
82
+
83
+ Run on the author's data (2016–2026). Each result is a click away in the Research tab, with t-statistics and caveats.
84
+
85
+ | Question | Answer |
86
+ |---|---|
87
+ | Do prices react to earnings surprises? | **Yes, on the day.** Good minus bad SUE: US large caps +1.7% (t = 5.4), CSI 300 +2.0% (t = 17.4). Dated by the 10-Q or legal deadline instead, the reaction is gone, so the real date matters. |
88
+ | Does the LLM's reading add anything? | **Yes, for the reaction.** On 472 US releases, tone explains the day's move where SUE does not (tone t = 3.1, SUE t = −0.5; R² 0.004 → 0.035). A-shares: negative tone −1.3% (t = −4.2). |
89
+ | …and does it predict what happens next? | **No.** Tone does not predict days 2–61 (t = 0.6). |
90
+ | Post-earnings drift? | Gone in US large caps since 2021. Still present in A-shares (+2.2%, t = 2.5), **but long-only it earns +0.3%/yr after costs** (t = 0.2): the drift sits on the short side, which A-share investors can hardly trade. |
91
+ | Does a fundamentals screen beat the market? | **No.** Top 30 by the composite score: +1.3%/yr vs the same universe (t = 0.5). Momentum alone: +6.4%/yr (t = 1.5, not significant). |
92
+ | Does 新闻联播 policy wording predict industry returns? | **Not tradably.** Over 8,490 new central measures, the strength of the wording is priced in **before the open** (+0.03%, t = 5.3; strongest level +0.12%). Afterwards, supported industries do slightly worse. Backtest: +0.6%/yr (t = 0.4). |
93
+
94
+ The pattern holds across all of these: public information is priced fast. So stockproof helps you **read and check
95
+ evidence faster**. It does not hand you a trading signal, and the app says this wherever it shows a score.
96
+
97
+ ## Principles
98
+
99
+ - **Cited, not invented.** The LLM may only use the numbered items it is given. Uncited points are dropped, and
100
+ "unexplained" is an allowed answer.
101
+ - **Scores carry their track record.** ✓ useful in tests · tested, not significant · ? not tested yet.
102
+ - **Point-in-time.** EPS as first reported, real announcement dates, entry after the news. No peeking ahead.
103
+ - **Any LLM.** DeepSeek (default), OpenAI, Qwen, a local Ollama model, or any OpenAI-compatible API. Each
104
+ item is read once and cached in SQLite, so daily use costs cents.
105
+ - **No paid data.** SEC EDGAR, Yahoo/Google News RSS, Nasdaq, and Eastmoney / Sina / CCTV / Shenwan via AKShare.
106
+ - **Local and private.** The dashboard listens on 127.0.0.1 only and refuses requests from other websites. API
107
+ keys are read from the environment and never written to disk.
108
+
109
+ ## Install
110
+
111
+ Python 3.10+ (3.11+ for China markets).
112
+
113
+ Works on macOS, Windows and Linux (tested on all three in CI).
114
+
115
+ ```bash
116
+ pip install "stockproof[cn,mcp]"
117
+ ```
118
+
119
+ Then give it an API key (DeepSeek by default; `stockproof providers` lists the others). US earnings also need a
120
+ contact for the SEC.
121
+
122
+ **macOS / Linux** — add to `~/.zshrc` (or `~/.bashrc`) so it is kept, then open a new terminal:
123
+
124
+ ```bash
125
+ export DEEPSEEK_API_KEY="sk-..."
126
+ export STOCKPROOF_SEC_CONTACT="Your Name you@example.com"
127
+ ```
128
+
129
+ **Windows** — in PowerShell (saved for your user; open a new window afterwards):
130
+
131
+ ```powershell
132
+ setx DEEPSEEK_API_KEY "sk-..."
133
+ setx STOCKPROOF_SEC_CONTACT "Your Name you@example.com"
134
+ ```
135
+
136
+ Then start the dashboard:
137
+
138
+ ```bash
139
+ stockproof dashboard
140
+ ```
141
+
142
+ Add stocks in the page (`AAPL`, `600519`, `300750`, `00700` …) and click **Refresh news** / **Refresh earnings**.
143
+
144
+ ## 10-minute tour
145
+
146
+ After [installing](#install) and setting your API key:
147
+
148
+ 1. **Look around the demo (2 min).** `stockproof demo`, then open each tab. The Home tab shows what you can do,
149
+ with examples to click.
150
+ 2. **Your own stocks (3 min).** `stockproof dashboard` → Stocks tab → type a few codes (`AAPL, 600519, 00700`) →
151
+ **Add** → **Refresh news**, then **Refresh earnings**. The first refresh takes about a minute per stock. Click a
152
+ row for its news, earnings read and announcements; click **Why?** next to an unusual move.
153
+ 3. **Test an idea (2 min).** Lab tab → click a template, e.g. "Buy after big earnings beats, hold 20 days" →
154
+ **Backtest**. Read the verdict, then change a condition and run it again: the significance bar goes up
155
+ with each variant you try.
156
+ 4. **Check your portfolio (1 min).** Portfolio check-up tab → type your holdings (`600519 100, AAPL 50`) → **Check my
157
+ portfolio**. The report shows concentration, holdings that move together and how today's weights did in
158
+ past crashes.
159
+ 5. **Ask in plain words (1 min, optional).** `stockproof mcp --install-dsh`, restart DeepSeek Harness, type
160
+ `/stockproof` or ask "what can you do?".
161
+ 6. **Keep it up to date (1 min).** `stockproof schedule --time 21:00` refreshes your watchlist every evening and
162
+ writes the daily digest (macOS, Windows, Linux).
163
+
164
+ ## Commands
165
+
166
+ ```bash
167
+ stockproof dashboard # everything in one local page
168
+ stockproof scan AAPL 600519 00700 --lang zh # news mood report
169
+ stockproof earnings AAPL MSFT --open # latest releases read by the LLM, with SUE
170
+ stockproof screen --top 30 # whole-market A-share screen
171
+ stockproof screen --backtest --skip-screen # test the screening rule on history
172
+ stockproof scorecard # evidence cards for the screen's top 10
173
+ stockproof scorecard 600519 NVDA # …or for any stocks
174
+ stockproof research --market cn --open # earnings event study + backtest (us / cn)
175
+ stockproof policy # 新闻联播 policy study (first run: a few hours of downloads)
176
+ stockproof daily # one refresh of the watchlist + daily digest
177
+ stockproof schedule --time 21:00 # run `daily` every evening (macOS, Windows, Linux)
178
+ stockproof calendar # who reports in the next two weeks
179
+ stockproof mcp --install-dsh # add to DeepSeek Harness on this computer (desktop app too)
180
+ stockproof lab caps # quant lab: what can be tested here
181
+ stockproof lab run '{"type":"earnings","filters":[{"field":"sue","op":">=","value":2}],"hold_days":20}' --open
182
+ stockproof lab confirm <id> # one shot on the locked holdout
183
+ stockproof portfolio "600519 100, 00700 300, AAPL 50" # portfolio check-up
184
+ stockproof demo # offline demo, no key
185
+ ```
186
+
187
+ Chinese codes can be typed in any common form: `600519`, `600519.SS`, `300750`, `920001`, `700`, `0700.HK`.
188
+
189
+ ## How the pieces work
190
+
191
+ <details><summary><b>News relevance</b></summary>
192
+
193
+ A feed for MRK also returns stories about the German Merck KGaA, a feed for GE returns GE HealthCare news, and
194
+ NVDA appears in every "stock market today" article (in one scan only 2 of 14 headlines were really about
195
+ Nvidia). The model gives each headline a relevance score (0–1) and a sentiment score (−1 to +1), with a reason.
196
+ Off-topic stories stay visible but are not counted. When several headlines cover the same event, the model
197
+ marks them as duplicates, so the event counts once.
198
+ </details>
199
+
200
+ <details><summary><b>Earnings and SUE</b></summary>
201
+
202
+ SUE = (this quarter's EPS − the same quarter last year) / standard deviation of the previous 8 such changes,
203
+ using EPS as first reported. US quarters come from SEC XBRL, and Q4 = full year − Q1–Q3. A-share reports are
204
+ year-to-date totals, so single quarters are derived by subtraction. Announcement dates come from the 8-K
205
+ Item 2.02 filing (after 16:00 New York time counts as the next day) or from Eastmoney's 预约披露 actual
206
+ disclosure date.
207
+ </details>
208
+
209
+ <details><summary><b>Screen and scorecard</b></summary>
210
+
211
+ - **Screen:** fundamentals for all ~5,200 A-shares come from Eastmoney's 业绩报表 tables (one download per report period).
212
+ - Filters: no ST stocks, market value ≥ 50亿, at least 2 years listed.
213
+ - Score: the average percentile of five factors.
214
+ - **Scorecard:** six dimensions plus industry policy, with one LLM call per stock per day.
215
+ - Earnings quality asks whether growth comes from the core business and is backed by cash, or from one-offs.
216
+ - Announcements count each kind of event once, since one buyback can produce ten filings.
217
+ </details>
218
+
219
+ <details><summary><b>Backtests</b></summary>
220
+
221
+ - **Entry and holding:** entry at the close after the reaction (earnings) or at the next open (policy), with
222
+ capital split into slots and empty slots holding the market.
223
+ - **A-share costs and trading rules:**
224
+ - Commission 0.025% per side, slippage 0.1% per side.
225
+ - Stamp duty on sales: 0.1%, or 0.05% from 2023-08-28.
226
+ - Price limits are respected, at 10% / 20% / 30% depending on the board.
227
+ - **Benchmark:** the equal-weighted average of the stocks studied, because today's CSI 300 members beat the
228
+ index by 13% a year (survivorship).
229
+ </details>
230
+
231
+ ## Data sources and limits
232
+
233
+ - **Sources:** SEC EDGAR, Nasdaq, Yahoo/Google News RSS, and Eastmoney, Sina, CCTV and Shenwan via AKShare.
234
+ - These are free, public, unofficial endpoints. They can change or rate-limit you.
235
+ - stockproof slows down, retries, and stops with a clear message when a source refuses.
236
+ - `tools/*_probe.py` checks which sources work from your network.
237
+ - **LLM errors:** models can misread. Every point links to the original, so check it.
238
+ - **Not investment advice.** The research above is part of the reason this tool doesn't give buy or sell calls.
239
+
240
+ ## Development
241
+
242
+ ```bash
243
+ pip install -e ".[dev,mcp]"
244
+ pytest # ~180 offline tests: fake feeds, fake LLM, fake AKShare; no key or network needed
245
+ python tools/make_demo.py # rebuild the demo bundle from your own stockproof_data
246
+ ```
247
+
248
+ MIT License.
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "stockproof"
7
+ version = "0.3.0"
8
+ description = "LLM stock research with cited sources (news, earnings, filings), tested on 10 years of point-in-time data: quant lab, portfolio check-up, web dashboard, DeepSeek Harness / MCP plugin. US, China A-shares, HK."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ keywords = ["stocks", "llm", "sentiment", "earnings", "a-shares", "deepseek", "deepseek-harness", "event-study", "backtesting", "mcp"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Operating System :: OS Independent",
17
+ "Topic :: Office/Business :: Financial :: Investment",
18
+ "Natural Language :: Chinese (Simplified)",
19
+ "Natural Language :: English",
20
+ ]
21
+ dependencies = [
22
+ "requests>=2.25",
23
+ "pandas>=1.3",
24
+ ]
25
+
26
+ [project.optional-dependencies]
27
+ dev = ["pytest"]
28
+ # China markets (A-shares, Hong Kong). AKShare needs Python 3.11+
29
+ cn = ["akshare; python_version >= \"3.11\""]
30
+ # price download for `stockproof research --download`
31
+ research = ["yfinance"]
32
+ # `stockproof mcp`: tools for AI agents (MCP needs Python 3.10+)
33
+ mcp = ["mcp; python_version >= \"3.10\""]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/taoqizhang55-code/stockproof"
37
+ Issues = "https://github.com/taoqizhang55-code/stockproof/issues"
38
+
39
+ [project.scripts]
40
+ stockproof = "stockproof.cli:main"
41
+
42
+ [tool.setuptools.packages.find]
43
+ include = ["stockproof", "stockproof.*"]
44
+
45
+ [tool.setuptools.package-data]
46
+ stockproof = ["demo_data/*", "demo_data/**/*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,5 @@
1
+ # Lets older pip versions (before 21.3) do an editable install: pip install -e .
2
+ # All real settings live in pyproject.toml.
3
+ from setuptools import setup
4
+
5
+ setup()
@@ -0,0 +1,15 @@
1
+ """stockproof (有据): an LLM reads stock news, earnings and filings with cited sources, and history checks what matters."""
2
+
3
+ import os as _os
4
+
5
+ __version__ = "0.3.0"
6
+
7
+
8
+ def compat_env() -> None:
9
+ """The project was called marketmood until 0.2: keep reading the old MARKETMOOD_* variables."""
10
+ for k, v in list(_os.environ.items()):
11
+ if k.startswith("MARKETMOOD_"):
12
+ _os.environ.setdefault("STOCKPROOF_" + k[len("MARKETMOOD_"):], v)
13
+
14
+
15
+ compat_env()
@@ -0,0 +1,5 @@
1
+ """Allows `python3 -m stockproof ...` without installing."""
2
+ from stockproof.cli import main
3
+
4
+ if __name__ == "__main__":
5
+ main()