Sar Calculator

Calculate SAR indicator, analyze A-share trends, price position, volume ratio, momentum, and provide a four-dimensional score and trading suggestion.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 30 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (SAR calculator for A-share analysis) align with the code and SKILL.md: it uses the Baostock client and pandas/numpy to fetch historical K-line data and compute SAR, volume ratio, momentum, and scores. No unrelated credentials, binaries, or services are requested.
Instruction Scope
Runtime instructions only direct the agent/user to run the provided Python script and to install baostock/pandas. The script only calls Baostock APIs and performs local computations; it does not read unrelated system files or transmit data to unexpected endpoints. SKILL.md references a workspace path (~/.openclaw/...), which is an implementation detail but not a data-exfiltration vector.
Install Mechanism
There is no formal install spec; SKILL.md instructs pip install baostock pandas. Installing packages from PyPI is a common, moderate-risk action — expected for a Python tool — but it does mean code is dependent on third-party packages fetched at install time. No obscure download URLs or archive extraction are used.
Credentials
The skill requests no environment variables, no credentials, and no config paths. The Baostock client is used without requiring secrets, which is consistent with the stated purpose.
Persistence & Privilege
The skill is instruction-only with a local script and does not request persistent or elevated platform privileges (always:false). It does not modify other skills or system-wide settings.
Assessment
This skill appears to do exactly what it says: fetch data from Baostock and compute SAR-based analytics. Before installing, consider: (1) pip will install baostock and pandas from PyPI—review those packages if you require strong supply-chain assurance; (2) the script makes network calls to Baostock (so it needs Internet access); (3) the repository/source and homepage are unknown—you should review the included sar_calculator.py yourself (it is present and readable) and run it in a sandbox or isolated environment if you have safety concerns. If you plan to run it regularly, verify Baostock's terms and that no authentication tokens are required for your usage pattern.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk971p1xaexx0w1kdwpeagytx7s831scp

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

SAR指标计算工具

SAR(抛物线转向指标)计算工具,用于A股技术分析。

功能说明

  1. 获取股票K线数据 - 使用Baostock接口获取历史K线数据
  2. 计算SAR值 - 抛物线转向指标计算
  3. 判断SAR趋势 - 识别上涨/下跌趋势
  4. 判断价格位置 - 判断收盘价是否在SAR上方/下方
  5. 计算成交量比 - 今日成交量与5日均量的比值
  6. 四维评分 - 从趋势、位置、成交量、动量四个维度评分

使用方法

# 查看帮助
python ~/.openclaw/workspace/skills/sar-calculator/sar_calculator.py --help

# 分析单只股票
python ~/.openclaw/workspace/skills/sar-calculator/sar_calculator.py --stock 600519

# 分析多只股票
python ~/.openclaw/workspace/skills/sar-calculator/sar_calculator.py --stock 600519 000858 300750

# 指定日期范围
python ~/.openclaw/workspace/skills/sar-calculator/sar_calculator.py --stock 600519 --start 2025-01-01 --end 2025-03-17

# 简短输出
python ~/.openclaw/workspace/skills/sar-calculator/sar_calculator.py --stock 600519 --quiet

安装依赖

pip install baostock pandas

评分维度说明

维度分数范围评分标准
趋势评分0-25上涨趋势=25,下跌趋势=0
位置评分0-25价格在SAR上方=25,下方=0
成交量评分0-25量比≥1.5=25,≥1.2=18,≥1.0=12,≥0.8=6,<0.8=0
动量评分0-255日涨幅≥10%=25,≥5%=20,≥0%=15,≥-5%=8,<-5%=0

综合建议

  • 总分 ≥ 75: 强烈看多
  • 总分 ≥ 50: 谨慎看多
  • 总分 ≥ 25: 谨慎看空
  • 总分 < 25: 强烈看空

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…