chanlun-analyzer

缠论分析引擎 v3.0 — 基于czsc算法的6层处理架构(包含处理→分型→笔→中枢→背驰),识别2买/3买卖点。零外部依赖,纯Python实现。触发词:缠论分析、笔和中枢、缠论结构。

3,891 stars

Best use case

chanlun-analyzer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

缠论分析引擎 v3.0 — 基于czsc算法的6层处理架构(包含处理→分型→笔→中枢→背驰),识别2买/3买卖点。零外部依赖,纯Python实现。触发词:缠论分析、笔和中枢、缠论结构。

Teams using chanlun-analyzer should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/chanlun-analyzer/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/antfraud/chanlun-analyzer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/chanlun-analyzer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How chanlun-analyzer Compares

Feature / Agentchanlun-analyzerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

缠论分析引擎 v3.0 — 基于czsc算法的6层处理架构(包含处理→分型→笔→中枢→背驰),识别2买/3买卖点。零外部依赖,纯Python实现。触发词:缠论分析、笔和中枢、缠论结构。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 缠论分析引擎 v3.0

基于 czsc (waditu/czsc) 算法的纯 Python 缠论引擎,6层确定性买卖点识别。

## 6层处理架构

```
L0 数据获取(腾讯K线 qfq复权日K)
  → L1 包含处理(严格对齐 czsc remove_include)
    → L2 分型识别(顶/底,强制交替,严格 >/<)
      → L3 笔生成(首分型→极端突破→包含检查→min_bi_len)
        → L4 中枢构建(3笔重叠 ZG=min(hi) ZD=max(lo),支持扩展)
          → L5 动力学信号(MACD柱面积背驰 → 1买/2买/3买)
```

## 买点定义
- **2买**:笔向下离开中枢后,再向下笔不创新低 + MACD柱面积缩小(背驰)
- **3买**:笔向上突破中枢后,回拉笔不进入中枢上沿(ZG)

## 使用

```bash
# 分析单只股票
python3 scripts/chanlun_analyzer.py analyze --symbol sz002815 --days 250

# 输出缠论结构(笔、中枢、买卖点)
python3 scripts/chanlun_analyzer.py analyze --symbol sz002815 --days 250 --json

# 仅输出买卖点信号
python3 scripts/chanlun_analyzer.py signals --symbol sz002815
```

## 输出字段

| 字段 | 说明 |
|------|------|
| pens | 笔序列(方向、起止点) |
| zhongshus | 中枢列表(ZG、ZD、区间) |
| buy_points | 买点信号(类型1/2/3、位置、背驰信息) |
| sell_points | 卖点信号 |
| current_structure | 当前缠论状态描述 |

## 依赖

- Python 3.8+
- 标准库(urllib, json, dataclasses, enum)
- 无第三方依赖

## 数据源
- 腾讯K线接口:`web.ifzq.gtimg.cn/appstock/app/fqkline/get`
- 自动前复权处理
- symbol 格式:`sz002815` / `sh600540`

## 算法严格对齐

- L1 包含处理:严格对齐 czsc remove_include
- L2 分型识别:严格 >/<(非 >=/<=),强制顶底交替
- L3 笔生成:czsc check_bi 算法
- 中枢扩展:后续笔进入中枢区间时自动扩展
- 背驰:MACD柱面积对比法

Related Skills

Profit Margin Analyzer

3891
from openclaw/skills

Analyze and optimize profit margins across your business. Identifies margin compression, pricing opportunities, and cost levers.

Pricing Strategy Analyzer

3891
from openclaw/skills

Analyze and optimize pricing for any product or service. Covers value-based, cost-plus, competitive, and tiered pricing models.

Business Strategy & Growth

Portfolio Risk Analyzer

3891
from openclaw/skills

Complete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate institutional-grade risk reports — all without external APIs.

Finance & Investing

Commercial Lease Analyzer

3891
from openclaw/skills

Analyze commercial leases (office, retail, industrial, warehouse) for hidden costs, unfavorable terms, and negotiation leverage. Use when reviewing a new lease, renegotiating a renewal, or comparing multiple lease options.

Business Analysis

Franchise Operations Analyzer

3891
from openclaw/skills

Evaluate franchise opportunities and manage multi-unit operations with data-driven frameworks.

Business & Finance

Financial Due Diligence Analyzer

3891
from openclaw/skills

Run comprehensive financial due diligence on acquisition targets, investment opportunities, or partnership prospects. Built for PE firms, corporate development teams, and founders evaluating deals.

Financial Analysis & Due Diligence

Employee Retention & Turnover Risk Analyzer

3891
from openclaw/skills

Diagnose why people leave. Fix it before they do.

HR & People Analytics

Contract Analyzer

3891
from openclaw/skills

Analyzes contracts and agreements for risks, unusual terms, and missing clauses

Legal Technology & Document Automation

Churn Risk Analyzer

3891
from openclaw/skills

Identify customers most likely to churn before they leave. Uses behavioral signals, usage patterns, and engagement data to score accounts and recommend retention actions.

Workflow & Productivity

simple-tech-analyzer - 简易技术分析器

3891
from openclaw/skills

**版本**: 1.0.0

Finance & Trading

seo-analyzer

3891
from openclaw/skills

Analyzes websites for SEO opportunities. Generates keyword ideas, checks on-page SEO factors, and provides actionable optimization recommendations.

sentiment-analyzer

3891
from openclaw/skills

Analyzes sentiment from social media, news headlines, and financial text. Outputs positive/negative/neutral scores with confidence levels and key phrase extraction.