Install
$ agentstack add skill-feicoder-skill-factory-bull-bear-line ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
牛熊线择时
基本概念
牛熊线是基于几何布朗运动理论,定义两根线来判断市场方向:
- 牛线(Bull Line):上涨临界线
- 熊线(Bear Line):下跌临界线
核心思想
- 价格突破牛线 → 牛市开始 → 买入
- 价格突破熊线 → 熊市开始 → 卖出
- 牛熊线之间 → 震荡整理
理论基础
布朗运动与股市
1900年数学家巴契里耶提出股价类似布朗运动:
- 交易行为:交易者买卖如同分子撞击粒子
- 估值与温度:市场热时估值高
- 市值与质量:小市值波动更大
- 交易量:交易活跃时波动加剧
股价布朗运动
dS = μSdt + σSdW
其中:
- μ: 期望收益率
- σ: 波动率
- dW: 布朗运动
方向性定义
将期望值上下一定距离设为临界值:
- SUPlim:强势区域上限(牛线)
- SDownlim:弱势区域下限(熊线)
策略模型
牛熊线计算
BullPrice(T) = F(S0, μ, σ, T, P)
BearPrice(T) = G(S0, μ, σ, T, P)
参数:
- S0: 初始价格
- μ: 期望收益率(需估计)
- σ: 波动率(需估计)
- T: 时间周期
- P: 置信水平
参数估计
- μ:基于历史平均收益率
- σ:基于历史波动率
- T:选择合适的回顾周期
- P:选择置信水平(如95%)
交易规则
判断标准
- 在牛线之上 → 强势状态 → 买入持有
- 在熊线之下 → 弱势状态 → 卖出观望
- 在牛熊线之间 → 盘整状态 → 不操作
实证案例(2001-2010年)
| 时间 | 操作 | 效果 | |------|------|------| | 2001.6.8 | 跌破牛线,卖出 | 成功规避2年半下跌 | | 2003.12.3 | 涨过牛线,买入 | 把握4个月行情 | | 2004.4.6 | 跌破牛线,卖出 | 规避1.5年下跌 | | 2005.12.26 | 涨过牛线,买入 | 把握5800点大行情 | | 2007.10.18 | 跌破牛线,卖出 | 规避历史最大下跌 | | 2009.2.4 | 涨过牛线,买入 | 把握反弹行情 | | 2010.10.1 | 涨过牛线,买入 | 把握脉冲行情 |
策略评价
优点
- 不过滤大机会:成功把握所有牛市
- 规避大风险:成功规避所有熊市
- 清晰信号:突破牛熊线界限明确
适合市场
- 趋势明显的市场
- 大牛大熊转换明显的A股
注意事项
- 参数敏感:μ和σ的估计影响结果
- 盘整期:牛熊线之间可能有反复
- 假突破:需要结合其他指标确认
实践建议
- 选择合适的回顾周期T
- 使用滚动估计更新参数
- 结合成交量确认信号
- 设置止损位
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: FeiCoder
- Source: FeiCoder/Skill-Factory
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.