gitmyhub

news-stock-selector

Python ★ 19 updated 17d ago

新闻选股助手,从新闻和热点中自动识别相关 A 股标的,通过多源行情验证和量化 Tier 评分引擎产出结构化选股结果,并生成深色交易台风格的 HTML 日报。

A Claude Code skill that reads today's news, finds Chinese A-share stocks mentioned or implied, scores each one using sentiment and catalyst factors, and outputs a dark-theme HTML report with T1/T2/T3 tier rankings.

PythonClaude Codesetup: hardcomplexity 3/5

This is a Claude Code skill that reads news and market updates, then identifies Chinese A-share stocks (companies listed on the Shanghai and Shenzhen exchanges) that may be worth watching based on what the news says. It is designed to run inside Claude Code as an add-on command rather than as a standalone application.

The skill works in five steps. First it searches for recent news using web search tools. Then it identifies which specific stocks are mentioned or implied by the stories, standardizing each one to its official stock code and name. Next it fetches current market price data for those stocks through a chain of six data sources: if the first source (Xueqiu) fails or is unavailable, it automatically tries the next one (Tencent, then Sina, then EastMoney, then two levels of TuShare). This fallback chain means the skill can still get data even if some sources are down.

Once it has the data, it scores each stock using a formula that combines five factors: the sentiment level of the news (how positive or negative), the type of catalyst (policy support and mergers score highest, while trending topics and analyst ratings score lower), how confident and timely the catalyst is, and what trading strategy the situation suggests. Stocks that hit the limit-up price on the previous day are automatically capped at the lowest tier regardless of their formula score. The result is a three-tier ranking: T1 for strong picks, T2 for stocks worth watching, and T3 for stocks to track but not prioritize.

The final step generates an HTML daily report in a dark trading-terminal visual style. The report shows an overview of how many stocks were found and at what tiers, followed by tables for each tier with price data and strategy tags. It also includes outlook notes and a disclaimer. The file is saved to the desktop and opened in a browser automatically.

The project is written in Python, requires Python 3.10 or newer, and is licensed under MIT. It was built specifically for the Chinese A-share market and assumes the user has access to a TuShare data API token.

Where it fits