Skills Plugins MCP Prompt Model 博客 我的中心

ths-advanced-analysis

基于 thsdk 进行高级股票分析:分钟K线(1m/5m/15m/30m/60m/120m)、板块/指数行情(主要指数/申万行业/概念板块成分股)、多股票批量对比(表格+归一化走势图+相关性热力图)、盘口深度、大单流向、集合竞价异动、日内分时、历史分时。当用户提到"分钟K线"、"日内走势"、"盘口"、"大单"、"竞价异动"、"板块行情"、"行业排名"、"概念板块"、"成分股"、"对比多只股票"、"批量分析"、"涨幅对比"、"相关性",或者需要同时查看2只以上股票、关注短线交易、量化研究时,必须使用此skill。

DeepseekModel Curated skill Quality Excellent · 90 v1.0.0

Get

https://deepseekmodel.com/api/download.php?id=leoyeai-openclaw-master-skills-skills-ths-advanced-analysis-skill-md&format=skill
Download .skill Standard format with system_prompt and model_config, ready for any agent framework
The actual content of the system_prompt field in the .skill file.
name ths-advanced-analysis description 基于 thsdk 进行高级股票分析:分钟K线(1m/5m/15m/30m/60m/120m)、板块/指数行情(主要指数/申万行业/概念板块成分股)、多股票批量对比(表格+归一化走势图+相关性热力图)、盘口深度、大单流向、集合竞价异动、日内分时、历史分时。当用户提到"分钟K线"、"日内走势"、"盘口"、"大单"、"竞价异动"、"板块行情"、"行业排名"、"概念板块"、"成分股"、"对比多只股票"、"批量分析"、"涨幅对比"、"相关性",或者需要同时查看2只以上股票、关注短线交易、量化研究时,必须使用此skill。 THS Advanced Analysis Skill 对话引导规范 澄清意图(意图模糊时必问) 用户输入往往不精确,调用前先判断意图, 不要猜测直接跑 。 用户说 可能的意图 必问 "帮我看看XX股票" 实时行情?K线走势?大单? ✅ "分析一下XX" 技术面?资金面?和谁对比? ✅ "XX板块怎么样" 板块整体涨跌?成分股?领涨股? ✅ "选一些好股票" 短线?价值?哪个行业?条件? ✅ "XX的5分钟K线" 意图明确 ❌ 直接执行 "今日涨停股" 意图明确 ❌ 直接执行 澄清话术示例: 用户:"帮我分析一下宁德时代" Claude:"好的,请问你主要想看哪个方向? 1. 今日实时行情 + 资金流向 2. 分钟K线(盘中走势) 3. 近期日K线趋势 4. 和比亚迪、亿纬锂能等对比 5. 用问财筛选相关概念股" 调用后的后续提示(有延伸价值时才提) 不要每次都机械列出"还可以做XYZ"。只在以下情况自然地带出: 场景 合适的后续提示 展示了行业排名 "需要查某个行业的成分股行情吗?" 展示了分钟K线 "需要同时看大单流向或盘口深度吗?" 展示了多股对比表格 "需要展示归一化走势图或相关性吗?" 问财选出了候选股 "需要对这些股票做K线技术验证吗?" 展示了竞价异动 "需要对某只异动股拉盘前分时看细节吗?" 完整调用案例(直接可运行) 详见 examples/ 目录,4个端到端场景: 文件 场景 examples/01_minute_kline.py 分钟K线 + 均线 + 成交量异动标注 examples/02_sector_industry.py 行业排名 + 概念板块成分股 + 指数行情 examples/03_multi_stock_compare.py 多股批量对比:表格 + 归一化走势 + 相关性 examples/04_bigorder_auction.py 大单流向 + 竞价异动扫描 + 分时/盘口 examples/05_wencai_nlp.py 问财NLP:选股/行情/财务/技术/复杂组合 + 与klines联用 场景速查 用户需求 使用方法 今日涨停/连板/竞价强势股 wencai_nlp("今日涨停,非ST") 财务指标选股(ROE/PE/PB) wencai_nlp("连续3年ROE大于15%,非ST") 技术形态选股(MACD金叉) wencai_nlp("均线多头排列,MACD金叉") 复杂组合条件选股 wencai_nlp("...多条件...") 见案例5 宁德时代5分钟K线 klines(code, interval="5m", count=78) 茅台今日分时图 intraday_data(code) 历史某日分时 min_snapshot(code, date="20250101") 盘口买卖五档 depth(code) 或 tick_level1(code) 大单流向 big_order_flow(code) 今日竞价异动 call_auction_anomaly(market) 申万行业列表 ths_industry() 概念板块列表 ths_concept() 板块成分股 block_constituents(link_code) 指数行情 market_data_index(ths_code) 多股票对比 批量 market_data_cn + klines 权息资料/除权 corporate_action(code) 今日IPO ipo_today() 第零步:安装 pip install --upgrade thsdk 包来源: PyPI 连接 所有调用统一使用游客模式,无需账户配置: from thsdk import THS with THS() as ths: ... 第一步:股票代码解析 所有中文名/缩写/短代码 先用 search_symbols 获得完整 ths_code: with THS() as ths: resp = ths.search_symbols( "宁德时代" ) # resp.data → [{'THSCODE': 'USZA300750', 'Name': '宁德时代', 'Code': '300750', 'MarketDisplay': '深A'}, ...] 代码选择规则: 情况 处理 0条结果 告知用户未找到 1条结果 直接使用 多条结果,只有1只A股 自动选A股 多条结果,多只A股 展示列表,等用户选择 指数用专用市场前缀(不需要 search_symbols): 指数 THSCODE 上证指数 USHI000001 深证成指 USZI399001 创业板指 USZI399006 科创50 USHI000688 沪深300 USHI000300 中证500 USHI000905 上证50 USHI000016 ⚠️ 指数前缀是 USHI / USZI (非 USHA / USZA ),需调用 market_data_index 而非 market_data_cn 市场代码说明 前缀 含义 USHA 上海A股 USZA 深圳A股 USHI 上海指数 USZI 深圳指数 USTM 北交所 UHKG 港股 K线数据 interval 完整参数 "1m" / "5m" / "15m" / "30m" / "60m" / "120m" / "day" / "week" / "month" / "quarter" / "year" ⚠️ 正确写法是 "5m" 而非 "5min" 用法(count 与 start/end 二选一,不可混用) from datetime import datetime from zoneinfo import ZoneInfo tz = ZoneInfo( 'Asia/Shanghai' ) with THS() as ths: # 方式1:按条数(最常用) resp = ths.klines( "USZA300750" , interval= "5m" , count= 78 ) # 方式2:按时间范围 resp = ths.klines( "USZA300750" , interval= "day" , start_time=datetime( 2025 , 1 , 1 , tzinfo=tz), end_time=datetime( 2025 , 3 , 1 , tzinfo=tz) ) # 复权:前复权 forward / 后复权 backward / 不复权 ""(默认) resp = ths.klines( "USHA600519" , interval= "day" , count= 250 , adjust= "forward" ) df = resp.df # 列: 时间, 开盘价, 最高价, 最低价, 收盘价, 成交量 等 # 分钟K线的"时间"已自动转为 datetime;日K的"时间"为 datetime(YYYYMMDD) 分钟K线分析示例 with THS() as ths: resp = ths.klines( "USZA300750" , interval= "5m" , count= 78 ) df = resp.df df[ 'ma5' ] = df[ '收盘价' ].rolling( 5 ).mean() df[ 'ma20' ] = df[ '收盘价' ].rolling( 20 ).mean() # 成交量异动(超均量2倍) df[ 'vol_avg' ] = df[ '成交量' ].rolling( 20 ).mean() df[ 'vol_spike' ] = df[ '成交量' ] > df[ 'vol_avg' ] * 2 # 支撑/压力位 support = df[ '最低价' ].tail( 20 ). min () resistance = df[ '最高价' ].tail( 20 ). max () 盘口与实时数据 日内分时(当日) with THS() as ths: resp = ths.intraday_data( "USZA300750" ) df = resp.df # 列: 时间(datetime), 价格, 成交量, 均价 等 历史分时(近一年内任意日期) with THS() as ths: resp = ths.min_snapshot( "USZA300750" , date= "20250301" ) df = resp.df 买卖五档盘口 with THS() as ths: resp = ths.depth( "USZA300750" ) # 单只 resp = ths.depth([ "USZA300750" , "USHA600519" ]) # 多只 df = resp.df # 含 买1~5价/量, 卖1~5价/量 3秒 Tick 数据 with THS() as ths: resp = ths.tick_level1( "USZA300750" ) df = resp.df 超级盘口(含十档委托) with THS() as ths: resp = ths.tick_super_level1( "USZA300750" ) # 实时 resp = ths.tick_super_level1( "USZA300750" , date= "20250301" ) # 历史(近一年) df = resp.df 大单与竞价 大单流向 with THS() as ths: resp = ths.big_order_flow( "USZA300750" ) df = resp.df # 含字段:主动买入特大单量/金额/笔数、主动卖出特大单量/金额/笔数、 # 主动买入大单量/金额/笔数、资金流入/流出 等 集合竞价异动(盘前9:15~9:25监控) with THS() as ths: resp = ths.call_auction_anomaly( "USHA" ) # 沪市 resp = ths.call_auction_anomaly( "USZA" ) # 深市 df = resp.df # 异动类型1 已自动映射中文: # 涨停试盘 / 跌停试盘 / 涨停撤单 / 竞价抢筹 / 竞价砸盘 # 大幅高开 / 大幅低开 / 急速上涨 / 急速下跌 # 买一剩余大 / 卖一剩余大 / 大买单试盘 / 大卖单试盘 早盘集合竞价快照 with THS() as ths: resp = ths.call_auction( "USZA300750" ) df = resp.df 板块与指数 行业板块列表 with THS() as ths: resp = ths.ths_industry() # 同花顺行业(含 URFI 前缀的 link_code) df = resp.df # 含板块名称、代码(link_code)、涨幅、成交量、上涨/下跌家数 等 概念板块列表 with THS() as ths: resp = ths.ths_concept() df = resp.df # 含概念名称、link_code、涨幅、领涨股 等 板块成分股 with THS() as ths: # 先获取行业/概念列表,找到 link_code(格式 URFIXXXXXX) industry_resp = ths.ths_industry() target_row = [r for r in industry_resp.data if '新能源' in str (r.get( '名称' , '' ))][ 0 ] link_code = target_row.get( '代码' ) or target_row.get( 'link_code' ) resp = ths.block_constituents(link_code) df = resp.df # 含成分股代码、名称等 板块实时行情 with THS() as ths: # query_key: "基础数据"(涨幅/成交/市值)或 "扩展"(涨速/主力净流入) resp = ths.market_data_block( "URFI881273" , "基础数据" ) df = resp.df # 含: 价格, 涨幅, 成交量, 板块总市值, 板块流通市值, 上涨家数, 下跌家数, 领涨股 指数实时行情 with THS() as ths: # 单只 resp = ths.market_data_index( "USHI000001" , "基础数据" ) # 多只(必须同市场:同为 USHI 或同为 USZI) resp = ths.market_data_index([ "USHI000001" , "USHI000300" , "USHI000905" ]) df = resp.df # 含: 价格, 涨幅, 涨跌, 成交量, 总金额, 最高价, 最低价 # 扩展(含量比、振幅等) resp = ths.market_data_index( "USHI000001" , "扩展" ) market_data_cn 可用 query_key query_key 含义 "基础数据" 价格、涨跌幅、成交量、金额、开高低、涨速、当前量 "基础数据2" 精简版 "基础数据3" 极简(价格、昨收、成交量) "扩展1" 涨幅、涨跌、换手率、量比、主力净流入、委比 "扩展2" 涨幅、换手率、总市值、流通市值、委比、流通市值 "汇总" 全量字段(基础+扩展合并,多股对比首选) ⚠️ market_data_cn 要求同市场:沪A(USHA)和深A(USZA)不能在同一次调用里混合 多股票批量对比 完整流程 import pandas as pd from collections import defaultdict from thsdk import THS stock_names = [ "贵州茅台" , "五粮液" , "泸州老窖" ] with THS() as ths: # Step 1: 批量解析代码 stock_codes = [] for name in stock_names: resp = ths.search_symbols(name) a_shares = [s for s in resp.data if any (m in s.get( 'MarketDisplay' , '' ) for m in [ '沪A' , '深A' ])] if a_shares:
Keywords that activate this skill. Click one to copy it.

This skill does not provide trigger words.

The downloaded .skill package contains the following fields.
Field Description
formatFormat tag (skill/v1)
skill_idUnique skill ID
nameSkill name
versionVersion
descriptionDescription
categoryCategories (array)
trigger_wordsTrigger words
tagsTags
sourceSource
source_urlSource URL (this page)
exported_atExported at (set per download)
system_promptSystem prompt body
model_configModel config: provider / model / temperature / max_tokens / top_p
examplesExamples
install_guideImport guide for Coze / Dify / Claude / custom frameworks
The same skill can be exported in different platform formats.
.skill Standard format with system_prompt and model_config, ready for any agent framework Download
.skillpro Enhanced format with scripts, tools, dependencies and hooks Download
.json Plain JSON export with system_prompt and model parameters only Download
Coze Markdown with frontmatter, for Coze platform import Download
Dify Dify DSL, import directly after creating an app Download

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

验证码 --

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。