bull-bear-line

bull-bear-line is a skill for Claude Code, Codex from FeiCoder/Skill-Factory. It costs 41 tokens per session (976 once invoked), scanned A, original, MIT.

A stock-market timing model that uses two calculated price boundaries to identify possible shifts between rising, falling, and sideways markets. It is based on a mathematical model of random price movement and estimated returns and volatility.

In plain words
What is it for?
Use it to calculate bull and bear boundaries, classify market conditions, and create buy, sell, or wait signals for markets with clear trends.
Why use it?
It gives a defined rule for interpreting market direction instead of relying only on judgment, while recognizing that its results depend on the chosen estimates and time period.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/feicoder/skill-factory/bull-bear-line
Any agent
npx skills add FeiCoder/Skill-Factory --skill bull-bear-line
Clone the repo
git clone --depth 1 https://github.com/FeiCoder/Skill-Factory

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bull-bear-line

README.md
[![agentmods](https://agentmods.dev/badge/skills/feicoder/skill-factory/bull-bear-line.svg)](https://agentmods.dev/skills/feicoder/skill-factory/bull-bear-line)
Your own site
<a href="https://agentmods.dev/skills/feicoder/skill-factory/bull-bear-line"><img src="https://agentmods.dev/badge/skills/feicoder/skill-factory/bull-bear-line.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 976 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.00976
Opus 5 $0.00020 $0.00488
Sonnet 5 $0.00008 $0.00195
Haiku 4.5 $0.00004 $0.00098

Measured 6d ago against content hash 6d01bdea02b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

bull-bear-line scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

produced_skill/timing/bull-bear-line/SKILL.md · 115 lines

What it actually says

牛熊线择时

基本概念

牛熊线是基于几何布朗运动理论,定义两根线来判断市场方向:

  • 牛线(Bull Line):上涨临界线
  • 熊线(Bear Line):下跌临界线

核心思想

  • 价格突破牛线 → 牛市开始 → 买入
  • 价格突破熊线 → 熊市开始 → 卖出
  • 牛熊线之间 → 震荡整理

理论基础

布朗运动与股市

1900年数学家巴契里耶提出股价类似布朗运动:

  1. 交易行为:交易者买卖如同分子撞击粒子
  2. 估值与温度:市场热时估值高
  3. 市值与质量:小市值波动更大
  4. 交易量:交易活跃时波动加剧

股价布朗运动

dS = μSdt + σSdW
其中:
- μ: 期望收益率
- σ: 波动率
- dW: 布朗运动

方向性定义

将期望值上下一定距离设为临界值:

  • SUPlim:强势区域上限(牛线)
  • SDownlim:弱势区域下限(熊线)

策略模型

牛熊线计算

BullPrice(T) = F(S0, μ, σ, T, P)
BearPrice(T) = G(S0, μ, σ, T, P)

参数:
- S0: 初始价格
- μ: 期望收益率(需估计)
- σ: 波动率(需估计)
- T: 时间周期
- P: 置信水平

参数估计

  • μ:基于历史平均收益率
  • σ:基于历史波动率
  • T:选择合适的回顾周期
  • P:选择置信水平(如95%)

交易规则

判断标准

  1. 在牛线之上 → 强势状态 → 买入持有
  2. 在熊线之下 → 弱势状态 → 卖出观望
  3. 在牛熊线之间 → 盘整状态 → 不操作

实证案例(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 涨过牛线,买入 把握脉冲行情

策略评价

优点

  1. 不过滤大机会:成功把握所有牛市
  2. 规避大风险:成功规避所有熊市
  3. 清晰信号:突破牛熊线界限明确

适合市场

  • 趋势明显的市场
  • 大牛大熊转换明显的A股

注意事项

  1. 参数敏感:μ和σ的估计影响结果
  2. 盘整期:牛熊线之间可能有反复
  3. 假突破:需要结合其他指标确认

实践建议

  1. 选择合适的回顾周期T
  2. 使用滚动估计更新参数
  3. 结合成交量确认信号
  4. 设置止损位
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 115 lines · 41 tokens per session scan A 6d01bdea02b4

Subscribe to this mod's changes

bull-bear-line is a skill published in the GitHub repository FeiCoder/Skill-Factory (10 stars, last pushed 6mo ago), licensed MIT. It adds 41 tokens to every session and 976 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.