← 返回
未分类 中文

Xia China Stock Analysis

Comprehensive A-share & HK stock analysis toolkit for OpenClaw agents. Technical indicators (MA/MACD/RSI/KDJ/BOLL), multi-source data (Eastmoney API, Akshare...
全面的A股及港股分析工具包,适用于OpenClaw代理。技术指标(MA/MACD/RSI/KDJ/BOLL),多源数据(东方财富API、Akshare…)
oldairman oldairman 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 311
下载
💾 0
安装
1
版本
#latest

概述

China Stock Analysis v1.0

A comprehensive stock analysis toolkit for Chinese A-share and Hong Kong markets. Provides technical indicators, financial data queries, news aggregation, and integrated analysis reports.

Features

  • 📊 Technical Indicators — MA, MACD, RSI, KDJ, Bollinger Bands, Volume
  • 📡 Multi-Source Data — Eastmoney MX API, Akshare, Yahoo Finance with auto-fallback
  • 📰 News Aggregation — Multi-source stock news search
  • 👀 Watchlist + Alerts — Track stocks with price targets and signal alerts
  • 📋 Integrated Reports — One-command comprehensive analysis with natural language output
  • Daily Automation — Cron-ready daily close analysis scripts

Configuration

No API Key Required!

This skill uses 100% free data sources — no registration or API keys needed:

  • Sina Finance — Real-time quotes + historical K-line (primary)
  • Akshare — A-share market data (fallback)
  • Yahoo Finance — Global market data (fallback)

Optional Environment Variables

VariableDescription
-----------------------
PYTHONIOENCODINGSet to utf-8 on Windows to avoid encoding errors

Usage

1. Technical Analysis

# A-share stock (6-digit code)
python {baseDir}/scripts/technical_indicators.py 002475
python {baseDir}/scripts/technical_indicators.py 600519

# Specify data source
python {baseDir}/scripts/technical_indicators.py 002475 --source eastmoney
python {baseDir}/scripts/technical_indicators.py 002475 --source akshare
python {baseDir}/scripts/technical_indicators.py 002475.SZ --source yahoo

# JSON output for automation
python {baseDir}/scripts/technical_indicators.py 002475 --format json

Output includes:

  • MA (5/10/20/60/120/250) with alignment status
  • MACD (DIF/DEA/histogram) with crossover detection
  • RSI (6/14/24) with overbought/oversold signals
  • KDJ with crossover detection
  • Bollinger Bands (upper/mid/lower, bandwidth, position)
  • Volume analysis (volume ratio, price-volume relationship)
  • Composite trend score (-100 to 100) with signal summary

2. Integrated Analysis Report

# Full analysis (technical + news + recommendation)
python {baseDir}/scripts/integrated_analysis.py 002475

# With explicit stock name
python {baseDir}/scripts/integrated_analysis.py 002475 --name 立讯精密

# Multiple stocks
python {baseDir}/scripts/integrated_analysis.py 002475 002594 600938

# Daily close analysis (reads watchlist)
python {baseDir}/scripts/daily_close_analysis.py
python {baseDir}/scripts/daily_close_analysis.py --stocks 002475.立讯精密 002594.比亚迪

Report includes:

  • Technical indicators summary
  • Key support/resistance levels
  • Recent news and catalysts
  • Buy/Hold/Sell recommendation with rationale
  • Risk warnings

3. Real-time Quote

# Single stock quote
python {baseDir}/scripts/sina_finance.py 002475 --mode quote

# Historical K-line
python {baseDir}/scripts/sina_finance.py 002475 --mode kline --period 6mo

# Batch quotes (multiple stocks in one request)
python {baseDir}/scripts/sina_finance.py --mode batch --symbols 002475 002594 600519

4. News Search

# Search stock news
python {baseDir}/scripts/news_search.py "立讯精密 最新消息"

# Search with date range
python {baseDir}/scripts/news_search.py "比亚迪" --days 7

5. Watchlist Management

# Add stock to watchlist
python {baseDir}/scripts/watchlist.py add 002475 --name 立讯精密

# Add with price alert
python {baseDir}/scripts/watchlist.py add 002475 --name 立讯精密 --target 45.00 --stop 30.00

# View watchlist
python {baseDir}/scripts/watchlist.py list

# Check alerts
python {baseDir}/scripts/watchlist.py check

Cron Integration

For automated daily analysis, set up cron jobs:

# Pre-market analysis (09:15 weekdays)
- cron: "15 9 * * 1-5"
  command: "python {baseDir}/scripts/integrated_analysis.py 002475 002594 600938 --mode pre-market"

# Morning summary (11:35 weekdays)
- cron: "35 11 * * 1-5"
  command: "python {baseDir}/scripts/daily_close_analysis.py --mode morning"

# Close analysis (15:05 weekdays)
- cron: "5 15 * * 1-5"
  command: "python {baseDir}/scripts/daily_close_analysis.py"

Data Sources (All Free, No API Key)

SourceMarketsSpeedReliabilityKey Required
----------------------------------------------------
Sina FinanceA-share, HK, USFastHighNo
AkshareA-share, HK, USMediumHighNo
Yahoo FinanceA-share, HK, USMediumMediumNo

Fallback order: Sina Finance → Akshare → Yahoo Finance

Analysis Output Template

## 📊 {股票名称}({代码}) 综合分析

### 📈 技术指标概览
| 指标 | 数值 | 信号 |
|------|------|------|
| MA趋势 | 多头/空头排列 | 🟢/🔴 |
| MACD | DIF/DEA/柱状 | 金叉/死叉 |
| RSI(14) | XX | 超买/超卖/中性 |
| KDJ | K/D/J值 | 金叉/死叉 |
| 布林带 | 上/中/下轨 | 位置判断 |
| 综合评分 | XX/100 | 强看多→强看空 |

### 📰 近期资讯
- ...

### 💡 投资建议
**建议:买入/持有/卖出**
- 理由:...
- 关键位:支撑 XX / 压力 XX
- 风险:...

⚠️ 以上分析仅供参考,不构成投资建议。投资有风险,入市需谨慎。

Supported Markets

MarketCode FormatExamples
------------------------------
Shanghai AXXXXXX.SH600519.SH (贵州茅台)
Shenzhen AXXXXXX.SZ000001.SZ (平安银行)
Hong KongXXXX.HK0700.HK (腾讯)
Shorthand (A-share)6 digits002475 (立讯精密)

Dependencies

pandas>=1.5
numpy>=1.24
requests>=2.28
akshare>=1.10   # optional fallback, recommended
yfinance>=0.2    # optional fallback, recommended

Limitations

  • A-share data may have 15-20 min delay on some sources
  • MX API requires valid API key (free tier available)
  • Hong Kong stock coverage varies by data source
  • Technical indicators based on historical data, not predictive

Disclaimer

⚠️ NOT FINANCIAL ADVICE. For informational purposes only. Consult a licensed financial advisor before making investment decisions.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 21:45 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

professional

All-Market Financial Data Hub

financial-ai-analyst
基于东方财富数据库,支持自然语言查询金融数据,覆盖A股、港股、美股、基金、债券等资产,提供实时行情、公司信息、估值、财务报表等,适用于投资研究、交易复盘、市场监控、行业分析、信用研究、财报审计、资产配置等场景,满足机构与个人需求。返回结果为
★ 121 📥 41,211
professional

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 276 📥 57,387
ai-agent

Xia Desktop Agent

oldairman
Windows 桌面自动化代理。可通过自然语言或预设指令进行截屏、点击、输入文字、按键、启动应用、发送微信消息/文件、ToDesk 远程连接等操作。适用于用户请求控制桌面、发送微信或建立远程连接的场景。
★ 1 📥 591