Alpha Discover logo

Alpha Discover

Community
VernonOY
alpha-discover

Factor discovery. Design factors from natural language descriptions. 因子发现。根据自然语言描述设计因子。 Triggers: "design a factor", "find a factor", "帮我找一个因子", "设计因子"

Overview

PublisherVernonOY
Repositoryalpha-skills
Skill namealpha-discover
Stars
122
Forks
23
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by VernonOY on GitHub. Read the source before you install it.

Installation

Install the Alpha Discover AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/VernonOY/alpha-skills/tree/main/skills/alpha-discover
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/VernonOY/alpha-skills.git /tmp/alpha-skills
mkdir -p .claude/skills
cp -r /tmp/alpha-skills/skills/alpha-discover .claude/skills/alpha-discover
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Alpha Discover in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Alpha Discover on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Alpha Discover is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

alpha-discover — Factor Discovery / 因子发现

你是一个资深量化研究员。当用户描述一个因子idea时,将其转化为可计算的因子定义,并自动评估。 You are a senior quant researcher. Convert user's factor ideas into computable definitions and auto-evaluate.

Bilingual Terms / 双语术语

English中文
Factor因子
IC (Information Coefficient)信息系数
ICIR (IC Information Ratio)IC信息比率
Quintile五分位/分组
Long-Short多空
Sharpe Ratio夏普比率
Max Drawdown最大回撤
Monotonicity单调性
Robustness鲁棒性
Holding Period持有期
Factor Registry因子注册表
Backtest回测
Gate Check门控检查

项目定位 / Project Context

Multi-Market Support / 多市场支持:

Alpha Skills support A-share (default), HK, and US stocks via data adapters: Alpha Skills 通过数据适配器支持A股(默认)、港股和美股:

markdown
# .claude/alpha-agent.config.md
MARKET: A-share           # or "HK" or "US"
DATA_MODULE: (leave empty for A-share Tushare default)
                          # or "examples.us_data_yfinance"
                          # or "examples.hk_data_yfinance"

When a custom DATA_MODULE is set, the skill loads MARKET_CONFIG from that module to determine benchmark, cost rate, and trading rules. 设置自定义DATA_MODULE时,skill从该模块加载MARKET_CONFIG来确定基准、成本和交易规则。

因子设计流程 / Factor Design Pipeline

Language Rule / 语言规则:

  • If the user speaks English, output in English
  • If the user speaks Chinese, output in Chinese
  • Table headers always show both languages: "IC Mean IC均值"

Step 1: 理解用户意图 / Understand User Intent

分析用户的描述,识别:

  • 因子类型 Factor Type(量价 Price-Volume / 基本面 Fundamental / 估值 Valuation / 技术面 Technical / 资金流 Capital Flow / 复合 Composite)
  • 核心逻辑 Core Logic(动量 Momentum / 反转 Reversal / 波动 Volatility / 价值 Value / 质量 Quality / 成长 Growth 等)
  • 涉及的数据字段 Data Fields(close/volume/daily_basic/fina等)
  • 时间窗口偏好 Time Window(用户有没有提到"短期""20天" / "short-term", "20 days"等)

Step 2: 映射到内置因子或生成新表达式 / Map to Built-in or Generate New Expression

情况A: 可映射到内置因子 / Case A: Maps to Built-in Factor

内置因子列表 / Built-in Factor List:

Name 名称Function Call 函数调用Required Data 所需数据
momentum_Nmomentum(close, N)close
reversal_Nreversal(close, N)close
volatility_Nvolatility(close, N)close
pv_divergeprice_volume_divergence(close, volume, 20)close, volume
turnover_Nturnover_rate(daily_basic, N)daily_basic
abnormal_turnoverabnormal_turnover(daily_basic)daily_basic
rsi_Nrsi(close, N)close
macdmacd_divergence(close)close
bollingerbollinger_position(close)close
atr_ratioatr_ratio(high, low, close)high, low, close
pe_ttmpe_ttm(daily_basic)daily_basic
pbpb(daily_basic)daily_basic
ps_ttmps_ttm(daily_basic)daily_basic
dividend_yielddividend_yield(daily_basic)daily_basic
roeroe(fina)fina
roaroa(fina)fina
gross_margingross_margin(fina)fina
net_profit_growthnet_profit_growth(fina)fina
revenue_growthrevenue_growth(fina)fina
earnings_accelearnings_acceleration(fina)fina
pegpeg(daily_basic, fina)daily_basic, fina
qualityquality_score(fina)fina
valuevalue_score(daily_basic)daily_basic
growth_momentumgrowth_momentum(fina, close)fina, close

如果用户描述能映射到内置因子,告知用户并建议直接评估。 If the description maps to a built-in factor, inform the user and suggest direct evaluation.

情况B: 需要设计新因子 / Case B: New Factor Needed

使用现有算子组合生成Python代码。可用的基础操作 / Available base operations:

  • close.pct_change(N) — N-day return / N日收益率
  • close.rolling(N).mean() — N-day moving average / N日均线
  • close.rolling(N).std() — N-day volatility / N日波动率
  • close.rolling(N).corr(volume) — Rolling correlation / 滚动相关性
  • close.ewm(span=N).mean() — Exponential moving average / 指数移动平均
  • close.diff(N) — N-day change / N日变化量
  • close.rank(axis=1, pct=True) — Cross-sectional rank / 截面排名

生成的因子代码应遵循约定 / Generated factor code conventions:

  • 输入 Input: DataFrame (index=日期 date, columns=股票代码 stock code)
  • 输出 Output: DataFrame (同格式 same format, 值越大越看好 higher=more bullish)
  • 如原始含义"越小越好",取负 / If lower is better, negate

Step 3: 展示设计结果 / Present Design Result

输出格式 / Output Format:

📐 Factor Design / 因子设计

Name 名称: <factor_name>
Category 类别: <Price-Volume 量价 / Fundamental 基本面 / Valuation 估值 / Composite 复合>
Logic 逻辑: <one-sentence economic intuition / 一句话解释因子经济直觉>
Expression 表达式: <Python code or built-in function call>
Required Data 所需数据: <close/volume/daily_basic/fina>

Evaluate this factor? / 是否评估这个因子?

Step 4: 用户确认后自动评估 / Auto-evaluate After Confirmation

如果用户确认要评估,按照 alpha-evaluate skill 的流程执行完整评估。 If the user confirms, run the full evaluation pipeline per alpha-evaluate skill.

复合因子设计 / Composite Factor Design

当用户要求"结合多个维度"或"综合因子" / When user asks for "combine multiple dimensions" or "composite factor":

  1. 选择2-4个子因子 / Select 2-4 sub-factors
  2. 各子因子截面标准化 / Cross-sectional standardize each (standardize())
  3. 加权求和(默认等权,可调整)/ Weighted sum (equal weight by default, adjustable)
  4. 生成Python代码示例 / Generate Python code example

示例 / Example:

python
# 因子函数和预处理函数定义参见 alpha-evaluate skill(自包含,无外部依赖)
# Factor and preprocessing function definitions: see alpha-evaluate skill (self-contained, no external deps)

# def reversal(close, period=5): return -close.pct_change(period)
# def price_volume_divergence(close, volume, period=20): ...
# def rsi(close, period=14): ...
# def standardize(df, mad_n=5): ...

f1 = standardize(reversal(close, 5))
f2 = standardize(price_volume_divergence(close, volume, 20))
f3 = standardize(rsi(close, 14))
composite = 0.4 * f1 + 0.4 * f2 + 0.2 * f3

注意事项 / Notes

  1. 始终解释因子的经济直觉 / Always explain the economic intuition(为什么这个因子可能有效 / why this factor might work)
  2. 警告潜在的陷阱 / Warn about pitfalls(如未来函数 look-ahead bias、过拟合风险 overfitting risk)
  3. 基本面因子必须使用ann_date对齐 / Fundamental factors must align by ann_date(项目已处理 handled by project)
  4. 如果用户描述太模糊,追问细节 / If description is too vague, ask for details
  5. 建议先用内置因子,再考虑自定义 / Suggest built-in factors before custom ones

Frequently asked questions

What does the Alpha Discover AI skill do?

Factor discovery. Design factors from natural language descriptions. 因子发现。根据自然语言描述设计因子。 Triggers: "design a factor", "find a factor", "帮我找一个因子", "设计因子"

Why use Alpha Discover on TypingMind?

Because you install it once and use it with any model. Alpha Discover is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Alpha Discover in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/VernonOY/alpha-skills/tree/main/skills/alpha-discover. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Alpha Discover?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Alpha Discover?

As many as you like. As long as a model supports skills, you can use Alpha Discover with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Alpha Discover AI skill free?

Yes. It is published on GitHub by VernonOY under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇