ZhuLinsen/daily_stock_analysis
LLM 驱动的多市场股票智能分析系统:多源行情、实时新闻、决策看板与自动推送,支持零成本定时运行。 LLM-powered multi-market stock analysis system with multi-source market data, real-time news, decision dashboard, automated notifications, and cost-free scheduled runs.
Python★ 69,131+506 that day#6 on trending
C58.3/100
Duplication60
6.2% in python, tsx, typescript, javascript, bash, powershell, nsis, dockerDead code88
1.4%Complexity38
71% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
1.96%duplicated code · 4,712 of 240,958 lines
326clones in code
539code files of 1,170 scanned
6.07%duplicated over all files · 2,310 clones
Most complex files
- src/services/screening_service.py1384 cx
- src/services/system_config_service.py1282 cx
- src/analyzer.py1134 cx
- data_provider/base.py1046 cx
- src/search_service.py921 cx
- src/core/pipeline.py911 cx
- src/config.py824 cx
- src/share_image.py696 cx
- apps/dsa-web/src/components/settings/LLMChannelEditor.tsx688 cx
- src/agent/web_intent_resolver.py687 cx
Dead code 1.4% unused · 128 findings
- src/agent/web_intent_resolver.pyunused-file
- src/agent/web_intent_types.pyunused-file
- src/agent/web_intent_tokenizer.pyunused-file
- src/agent/tool_surface.pyunused-file
- bot/platforms/discord.pyunused-file
- src/notification_capabilities.pyunused-file
- bot/handler.pyunused-file
- src/services/analyzer_service.pyunused-file
- src/formatters.py:chunk_markdown_preserving_blocksunused-export
- apps/dsa-desktop/preload.jsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 97 lines in 2 placespython601 tokens
2090 "api=ak.stock_zh_a_spot action=failed error=%s", 2091 e, 2092 ) 2093 2094 return None 2095 2096def _calc_market_stats( 2097 self, 2098 df: pd.DataFrame, 2099 ) -> Optional[Dict[str, Any]]:1057 "api=ef.stock.get_realtime_quotes action=failed error=%s", 1058 e, 1059 ) 1060 return None 1061 1062def _calc_market_stats( 1063 self, 1064 df: pd.DataFrame, 1065 ) -> Optional[Dict[str, Any]]: 1066 """从行情 DataFrame 计算涨跌统计。"""First 10 of 97 lines, the second copy on the right.
- 94 lines in 2 placespython568 tokens
2092 ) 2093 2094 return None 2095 2096def _calc_market_stats( 2097 self, 2098 df: pd.DataFrame, 2099 ) -> Optional[Dict[str, Any]]: 2100 """从行情 DataFrame 计算涨跌统计。""" 2101 import numpy as npFirst 10 of 94 lines.
- 93 lines in 2 placespython560 tokens
73{market_guidelines} 74 75## 工作流程(必须严格按阶段顺序执行,每阶段等工具结果返回后再进入下一阶段) 76 77**第一阶段 · 行情与K线**(首先执行) 78- `get_realtime_quote` 获取实时行情 79- `get_daily_history` 获取历史K线 80 81**第二阶段 · 技术与筹码**(等第一阶段结果返回后执行) 82- `analyze_trend` 获取技术指标First 10 of 93 lines.
7 more
- 18 lines in 3 placespython186 tokens
- 43 lines in 2 placespython335 tokens
- 59 lines in 2 placespython278 tokens
- 52 lines in 2 placespython262 tokens
- 50 lines in 2 placespython255 tokens
- 20 lines in 2 placespython230 tokens
- 69 lines in 2 placespython224 tokens
Largest clones over all files, tests and data included
- 11 lines in 3 placesmarkdowndocs and examples382 tokens
5[](https://github.com/ZhuLinsen/daily_stock_analysis/stargazers) 6[](https://arxiv.org/abs/2608.26990) 7[](https://github.com/ZhuLinsen/daily_stock_analysis/actions/workflo… 8[](https://opensource.org/licenses/MIT) 9[](https://www.python.org/downloads/) 10[](https://github.com/features/actions) 11[](https://hub.docker.com/r/zhulinsen/daily_stock_analysis) 12 13<p align="center"> 14 <img src="https://trendshift.io/api/badge/trendshift/repositories/18527/daily?language=Python" alt="#1 Python Repository Of The Day | Trendshift" width="250"…First 10 of 11 lines.
- 8 lines in 12 placespythontests62 tokenstests/test_portfolio_pr2.py:342–349tests/test_portfolio_pr2.py:518–525tests/test_portfolio_pr2.py:544–551tests/test_portfolio_pr2.py:581–588tests/test_portfolio_pr2.py:648–655and 7 more
342def test_risk_threshold_boundary(self) -> None: 343 account = self.service.create_account(name="Main", broker="Demo", market="cn", base_currency="CNY") 344 aid = account["id"] 345 self.service.record_cash_ledger( 346 account_id=aid, 347 event_date=date(2026, 1, 1), 348 direction="in", 349 amount=20000,518def test_sector_concentration_cn_board_mapping(self, _mock_fetch) -> None: 519 account = self.service.create_account(name="Main", broker="Demo", market="cn", base_currency="CNY") 520 aid = account["id"] 521 self.service.record_cash_ledger( 522 account_id=aid, 523 event_date=date(2026, 1, 1), 524 direction="in", 525 amount=10000.0, - 10 lines in 14 placespythontests51 tokenstests/test_notification.py:1063–1072tests/test_notification.py:1099–1110tests/test_notification.py:1133–1144tests/test_notification.py:1321–1330tests/test_notification.py:1393–1402and 9 more
1063def test_generate_brief_report_shows_model_by_default(self, mock_get_config: mock.MagicMock): 1064 mock_get_config.return_value = _make_config(report_renderer_enabled=False) 1065 service = NotificationService() 1066 result = AnalysisResult( 1067 code="600519", 1068 name="贵州茅台", 1069 sentiment_score=72, 1070 trend_prediction="看多", 1071 operation_advice="持有", 1072 analysis_summary="稳健",1099def test_generate_dashboard_report_shows_phase_decision_in_default_renderer( 1100 self, mock_get_config: mock.MagicMock 1101): 1102 mock_get_config.return_value = _make_config(report_renderer_enabled=False) 1103 service = NotificationService() 1104 result = AnalysisResult( 1105 code="600519", 1106 name="贵州茅台", 1107 sentiment_score=72, 1108 trend_prediction="看多", - 16 lines in 10 placespythontests70 tokens
- 97 lines in 2 placespython601 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 340 | 191,106 | 296 | 4,403 | 2.3% |
| tsx | 102 | 31,659 | 18 | 176 | 0.56% |
| typescript | 82 | 14,176 | 11 | 125 | 0.88% |
| javascript | 5 | 2,433 | 1 | 8 | 0.33% |
| bash | 6 | 1,074 | 0 | 0 | 0% |
| powershell | 4 | 510 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 652 | 363,045 | 1,734 | 22,153 | 6.1% |
| tsx | 170 | 63,385 | 425 | 5,813 | 9.17% |
| typescript | 134 | 29,120 | 39 | 439 | 1.51% |
| json | 15 | 10,058 | 35 | 1,057 | 10.51% |
| javascript | 7 | 4,265 | 27 | 306 | 7.17% |
| css | 1 | 2,924 | 16 | 168 | 5.75% |
| yaml | 44 | 3,922 | 13 | 208 | 5.3% |
| markdown | 77 | 19,113 | 8 | 83 | 0.43% |
| bash | 26 | 1,825 | 7 | 67 | 3.67% |
| text | 18 | 509 | 3 | 25 | 4.91% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 10, 2026 | #6 | 69,131 (+506) | 1,170 | 499,864 | 2,310 | 6.07% | 1.96% | C 58.3 | 15c7cdc |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.