Install
openclaw skills install @sunsongyeah/macd-stock-screenerA股左右侧MACD选股筛选器,含东方财富股吧舆情采集与情感分析报告。当用户需要扫描全市场MACD金叉信号、MACD选股、左右侧策略选股、MACD即将金叉筛选时使用此skill。支持右侧MACD金叉选股(DIF上穿DEA)和左侧MACD即将金叉选股(DIF在DEA下方但差距收敛)。不含回测。
openclaw skills install @sunsongyeah/macd-stock-screener本 skill 封装了 A 股全市场 MACD 选股 + 东方财富股吧舆情采集的完整流程:
脚本路径为 skill 目录下的 scripts/macd_screener.py。
# 完整流程:选股 + 舆情采集 + 报告生成(右侧+左侧,各10只)
python <skill-dir>/scripts/macd_screener.py
# 自定义数量
python <skill-dir>/scripts/macd_screener.py -n 15
# 仅运行右侧金叉
python <skill-dir>/scripts/macd_screener.py --right-only
# 仅运行左侧即将金叉
python <skill-dir>/scripts/macd_screener.py --left-only
# 仅选股不采集舆情
python <skill-dir>/scripts/macd_screener.py --scan-only
# 跳过舆情采集
python <skill-dir>/scripts/macd_screener.py --skip-sentiment
# 指定输出目录
python <skill-dir>/scripts/macd_screener.py -o ./my_output/
当用户表示需要 MACD 选股时,找到 scripts/macd_screener.py 的绝对路径并运行它。
在 outputs/YYYY-MM-DD/ 目录下生成:
right_macd_candidates.csv — 右侧金叉候选列表(含收盘价、评论数)left_macd_candidates.csv — 左侧即将金叉候选列表(含收盘价、DIF-DEA差距、评论数)sentiment_report.md — 股吧舆情情感分析报告summary.md — 每日选股汇总ak.stock_comment_em)| 参数 | 默认值 | 说明 |
|---|---|---|
| 快线周期 (fast) | 12 | EMA 快线 |
| 慢线周期 (slow) | 26 | EMA 慢线 |
| 信号线周期 (signal) | 9 | DEA 平滑 |
| 最低历史数据 | 30 日 | 数据不足则跳过 |
| 左侧回看窗口 (lookback) | 3 日 | 连续收敛判断窗口 |
| 前复权 | qfq | 价格校准方式 |
| 排除范围 | ST/*ST/退市/北交所 | 仅保留沪深创主板 |
pip install akshare pandas numpy