Agent skill

Alpha Signal

by VernonOY in VernonOY/alpha-skills

Daily trading signal generator. An agent skill from VernonOY/alpha-skills.

Apache-2.0Auto-check passedBusiness, Finance & HR

Install Alpha Signal

skills CLI
$ npx skills add VernonOY/alpha-skills --skill alpha-signal -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install VernonOY/alpha-skills alpha-signal --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/VernonOY/alpha-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/alpha-signal .claude/skills/alpha-signal && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
alpha-signal
GitHub stars
117
Token cost
~2.5k tokens
SKILL.md length
335 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Daily trading signal generator. An agent skill from VernonOY/alpha-skills.

  • Works in 7 steps: Read Factor Library / 读取因子库 → Load Latest Data / 加载最新数据 → Compute Factor Scores / 计算因子得分 → …
  • Tasks that involve Trading and backtesting
  • SKILL.md covers Bilingual Terms / 双语术语, Project Context / 项目定位, Execution Pipeline / 执行流程 and Signal History Format / 信号历史格式, plus 2 more sections
  • Calls claude

What it does

Alpha Signal is an agent skill from VernonOY/alpha-skills. Daily trading signal generator. Compute factor scores on latest data and output target portfolio. 每日交易信号生成器。基于最新数据计算因子得分,输出目标持仓。 Triggers: "generate signals", "today's trades", "生成信号", "今日信号", "alpha-signal"

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Business, Finance & HR, covering Trading and backtesting. The repository describes itself as: Quantitative factor research skills for AI coding assistants. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Trading and backtesting

Example prompts

  • “generate signals”
  • “s trades”
  • “alpha-signal”
  • “/alpha-signal”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Read Factor Library / 读取因子库
  2. Load Latest Data / 加载最新数据
  3. Compute Factor Scores / 计算因子得分
  4. Composite Score & Stock Selection / 复合得分与选股
  5. Compare with Previous Holdings / 与前日持仓对比
  6. Save Signal & Output / 保存信号并输出
  7. Performance Tracking (if history exists) / 绩效追踪

What it can do on your machine

Read from SKILL.md and the folder at commit f58f80a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • claude

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Alpha Signal loads about 2.5k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 335 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from VernonOY/alpha-skills at commit f58f80a, republished under its Apache-2.0 licence (© VernonOY). 335 words, ~2,498 tokens.

Download SKILL.mdSave it as .claude/skills/alpha-signal/SKILL.md (or your agent's skills folder).
name
alpha-signal
description
Daily trading signal generator. Compute factor scores on latest data and output target portfolio. 每日交易信号生成器。基于最新数据计算因子得分,输出目标持仓。 Triggers: "generate signals", "today's trades", "生成信号", "今日信号", "alpha-signal"

alpha-signal — Daily Signal Generator / 每日信号生成

You are a portfolio signal generator. Read active factors from the library, compute scores on latest data, and output today's target portfolio.

你是一个组合信号生成器。从因子库读取活跃因子,在最新数据上计算得分,输出今日目标持仓。

Bilingual Terms / 双语术语

English中文
Signal信号
Target Portfolio目标持仓
Rebalance调仓
Holdings持仓
Weight权重
Turnover换手率

Project Context / 项目定位

  • Factor Registry: alpha_skills.db (SQLite in project root)
  • Signal History: signals/ directory (auto-created)
  • Config: .claude/alpha-agent.config.md

Language Rule / 语言规则:

  • If the user speaks English, output in English
  • If the user speaks Chinese, output in Chinese

Execution Pipeline / 执行流程

Step 1: Read Factor Library / 读取因子库
python
import sqlite3, json, os
from datetime import datetime

PROJECT_DIR = "<current working directory>"
db_path = os.path.join(PROJECT_DIR, "alpha_skills.db")

with sqlite3.connect(db_path) as conn:
    conn.row_factory = sqlite3.Row
    active_factors = conn.execute(
        "SELECT * FROM factors WHERE status='active' ORDER BY icir DESC"
    ).fetchall()
    active_factors = [dict(r) for r in active_factors]

if not active_factors:
    print("No active factors in library. Run alpha-evaluate and alpha-library first.")
    # Stop here

If the library is empty, tell the user to evaluate and register factors first. 如果因子库为空,提示用户先评估并注册因子。

Step 2: Load Latest Data / 加载最新数据

Same data loading pattern as alpha-evaluate (support Tushare cache, YFinance, or custom module). 数据加载方式同 alpha-evaluate。

Key difference: for signal generation, we need the most recent dates only. 关键区别:信号生成只需要最近的日期数据。

python
# After loading and preprocessing close, volume, daily_basic, etc.
# Filter to recent data for efficiency
recent_start = close.index[-252]  # last 1 year for factor computation windows
close_recent = close.loc[recent_start:]
volume_recent = volume.loc[recent_start:]
# ... same for other data
Step 3: Compute Factor Scores / 计算因子得分

For each active factor, compute its value on the latest date:

对每个活跃因子,计算其在最新日期上的值:

python
import pandas as pd
import numpy as np

# Factor computation functions (self-contained, same as alpha-evaluate)
def momentum(close, period=20):
    return close.pct_change(period)

def reversal(close, period=5):
    return -close.pct_change(period)

def volatility(close, period=20):
    return -(close.pct_change().rolling(period).std() * np.sqrt(252))

def price_volume_divergence(close, volume, period=20):
    price_ret = close.pct_change()
    vol_ret = volume.pct_change()
    result = pd.DataFrame(index=close.index, columns=close.columns, dtype=float)
    for col in close.columns:
        if col in volume.columns:
            result[col] = price_ret[col].rolling(period).corr(vol_ret[col])
    return -result

def turnover_rate(daily_basic_df, period=20):
    df = daily_basic_df[["ts_code","trade_date","turnover_rate_f"]].copy()
    df["trade_date"] = pd.to_datetime(df["trade_date"], format="%Y%m%d")
    pivot = df.pivot_table(index="trade_date", columns="ts_code", values="turnover_rate_f")
    return -pivot.rolling(period).mean()

# ... other factor functions as needed (see alpha-evaluate for full list)

def winsorize_mad(df, n=5):
    median = df.median(axis=1)
    mad = df.sub(median, axis=0).abs().median(axis=1)
    return df.clip(median - n*1.4826*mad, median + n*1.4826*mad, axis=0)

def standardize(df):
    df = winsorize_mad(df)
    return df.sub(df.mean(axis=1), axis=0).div(df.std(axis=1), axis=0)

# Map factor names to computation functions
FACTOR_MAP = {
    "momentum_20": lambda: momentum(close_recent, 20),
    "reversal_5": lambda: reversal(close_recent, 5),
    "reversal_10": lambda: reversal(close_recent, 10),
    "volatility_20": lambda: volatility(close_recent, 20),
    "pv_diverge": lambda: price_volume_divergence(close_recent, volume_recent, 20),
    "turnover_20": lambda: turnover_rate(daily_basic_recent, 20),
    # ... AI should map factor names from registry to computation functions
    # ... using the expression field from the registry record
}

# Compute all active factors
factor_scores = {}
for f in active_factors:
    name = f["name"]
    if name in FACTOR_MAP:
        try:
            vals = standardize(FACTOR_MAP[name]())
            factor_scores[name] = vals
        except Exception as e:
            print(f"Warning: failed to compute {name}: {e}")
Step 4: Composite Score & Stock Selection / 复合得分与选股
python
# Weight by ICIR (from registry)
weights = {}
total_icir = sum(abs(f["icir"] or 0) for f in active_factors if f["name"] in factor_scores)
for f in active_factors:
    name = f["name"]
    if name in factor_scores and total_icir > 0:
        weights[name] = abs(f["icir"] or 0) / total_icir

# Composite score on latest date
latest_date = close_recent.index[-1]
composite = None
for name, w in weights.items():
    if latest_date not in factor_scores[name].index:
        continue
    row = factor_scores[name].loc[latest_date].rank(pct=True).fillna(0.5)
    if composite is None:
        composite = row * w
    else:
        common = composite.index.intersection(row.index)
        composite = composite.reindex(common) * (1 - w) + row.reindex(common) * w

if composite is None:
    print("Error: no factor scores available for latest date")
    # Stop here

# Read config for stock count, filters
n_stocks = 15  # default, read from config if available

# Filter: remove NaN, suspended stocks
composite = composite.dropna()

# Filter: market cap and liquidity (if daily_basic available)
# ... apply MIN_MARKET_CAP, MIN_DAILY_AMOUNT from config

# Filter: limit-up stocks cannot be bought (A-share)
# Check market config for price_limit
daily_ret = close_recent.pct_change()
if latest_date in daily_ret.index:
    market_config = {}  # load from DATA_MODULE if available
    price_limit = market_config.get("price_limit", 0.1)
    if price_limit is not None:
        limit_up = daily_ret.loc[latest_date] > price_limit * 0.95
        composite = composite[~composite.index.isin(limit_up[limit_up].index)]

# Select top N
top_stocks = composite.nlargest(n_stocks)

# Normalize weights (ICIR-weighted based on factor scores)
target_weights = top_stocks / top_stocks.sum()
Step 5: Compare with Previous Holdings / 与前日持仓对比
python
signals_dir = os.path.join(PROJECT_DIR, "signals")
os.makedirs(signals_dir, exist_ok=True)

# Load yesterday's signal (if exists)
import glob
prev_files = sorted(glob.glob(os.path.join(signals_dir, "*.csv")))
prev_holdings = {}
if prev_files:
    prev_df = pd.read_csv(prev_files[-1])
    prev_holdings = dict(zip(prev_df["stock"], prev_df["weight"]))

# Calculate turnover
all_stocks = set(target_weights.index) | set(prev_holdings.keys())
turnover = sum(abs(target_weights.get(s, 0) - prev_holdings.get(s, 0)) for s in all_stocks)

# Identify buys and sells
new_buys = set(target_weights.index) - set(prev_holdings.keys())
sells = set(prev_holdings.keys()) - set(target_weights.index)
holds = set(target_weights.index) & set(prev_holdings.keys())
Step 6: Save Signal & Output / 保存信号并输出
python
# Save to CSV
date_str = latest_date.strftime("%Y-%m-%d")
signal_df = pd.DataFrame({
    "stock": target_weights.index,
    "weight": target_weights.values,
    "score": top_stocks.values,
})
signal_path = os.path.join(signals_dir, f"{date_str}.csv")
signal_df.to_csv(signal_path, index=False)

Output format:

📡 Daily Signal / 每日信号 — {date}

Active Factors 活跃因子 ({n} total):
  pv_diverge (ICIR=0.70, weight=40%)
  turnover_20 (ICIR=0.52, weight=30%)
  volatility_20 (ICIR=0.43, weight=30%)

Target Portfolio 目标持仓 ({n_stocks} stocks):

  Stock 股票     Weight 权重    Score 得分    Action 操作
  000001.SZ      8.2%          0.92        HOLD 持有
  600519.SH      7.5%          0.89        NEW BUY 新买入
  300750.SZ      7.1%          0.87        NEW BUY 新买入
  ...

Summary 摘要:
  New Buys 新买入: {n} stocks
  Sells 卖出: {n} stocks
  Holds 持有: {n} stocks
  Turnover 换手率: {turnover:.1%}
  Estimated Cost 预估成本: {turnover * cost_rate / 2:.2%}

Signal saved 信号已保存: signals/{date}.csv
Step 7: Performance Tracking (if history exists) / 绩效追踪

If there are previous signals, compute realized performance:

如果有历史信号,计算已实现绩效:

python
if len(prev_files) >= 5:
    # Load last 5 signals, compute daily return of each signal's portfolio
    # Compare with benchmark
    # Output: "Last 5 signals: avg return X%, benchmark Y%, excess Z%"
    ...

Signal History Format / 信号历史格式

Each daily signal is saved as signals/YYYY-MM-DD.csv:

csv
stock,weight,score
000001.SZ,0.082,0.92
600519.SH,0.075,0.89
300750.SZ,0.071,0.87
...
Show full SKILL.md (146 more words)Show less

Integration Options / 集成选项

The signal output is a standard CSV. Users can: 信号输出为标准CSV,用户可以:

  1. Manual execution 手动执行: Read the signal, place orders yourself
  2. Script execution 脚本执行: Write a script to read CSV and call broker API
  3. Webhook 推送: Add a webhook call at the end to push signal to Slack/WeChat/email
  4. Scheduled 定时运行: Use cron or Claude Code's schedule skill:
    bash
    # Run daily at 8:30 AM before market open
    30 8 * * 1-5 cd /project && claude -p "generate today's signals"

Notes / 注意事项

  1. Signal generation should run BEFORE market open (before 9:30 AM for A-share) 信号生成应在开盘前运行
  2. If factor library is empty, prompt user to evaluate and register factors first 因子库为空时提示用户先评估注册因子
  3. If no new data available (weekend/holiday), skip and notify 无新数据时(周末/假日)跳过并通知
  4. Always show turnover and estimated cost — high turnover = high cost 始终显示换手率和预估成本
  5. Save every signal to signals/ for future performance tracking 保存每个信号用于未来绩效追踪

© VernonOY, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/alpha-signal of VernonOY/alpha-skills.

Open the folder on GitHubat commit f58f80a

Compare with similar skills

Alpha Signal next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Alpha Signal compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Alpha Signal this skillVernonOY/alpha-skills117—~2.5kAutomated safety check: PassApache-2.0
Tushare Datazillionare/zillionare3222 repos~2.3kAutomated safety check: PassNone
Tradingview MCPatilaahmettaner/tradingview-mcp5k—~1.3kAutomated safety check: PassMIT
Digital Oraclekomako-workshop/digital-oracle878—~5.9kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Markdownfacioquo/stock-indicators-dotnet1.2k—~812Automated safety check: PassApache-2.0

Similar skills

  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    322 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed
  • Tradingview MCP

    atilaahmettaner/tradingview-mcp

    AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…

    5k GitHub stars~1.3k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Digital Oracle

    komako-workshop/digital-oracle

    Answer prediction questions using market trading data, not opinions.

    878 GitHub stars~5.9k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Markdown

    facioquo/stock-indicators-dotnet

    Format and lint Markdown in this repository against GitHub Flavored Markdown and its markdownlint-cli2 configuration — headers, lists, code fences, callouts (VitePress containers on docs-site pages…

    1.2k GitHub stars~812 tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Openmobius Skill

    MobiusQuant/OpenMobius-skill

    Provides multi-school trading Q&A, chart/OHLCV analysis, annotation, and fresh-market workflows covering ICT/SMC, ChanLun, Wyckoff, Price Action, Order Flow, VSA, and Elliott Wave.

    697 GitHub stars~7.2k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed

More from VernonOY/alpha-skills

All 9 skills in this repo
  • Alpha Autopilot

    VernonOY/alpha-skills

    Autonomous factor research loop. An agent skill from VernonOY/alpha-skills.

    117 GitHub stars~2.8k tokensUpdated 6 mo ago
    Auto-check passed
  • Alpha Backtest

    VernonOY/alpha-skills

    Strategy backtest. An agent skill from VernonOY/alpha-skills.

    117 GitHub stars~3.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Alpha Discover

    VernonOY/alpha-skills

    Factor discovery. An agent skill from VernonOY/alpha-skills.

    117 GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • Alpha Library

    VernonOY/alpha-skills

    Factor library management. An agent skill from VernonOY/alpha-skills.

    117 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • Alpha Mine

    VernonOY/alpha-skills

    Automated factor mining. An agent skill from VernonOY/alpha-skills.

    117 GitHub stars~3.5k tokensUpdated 6 mo ago
    Auto-check passed
  • Alpha Monitor

    VernonOY/alpha-skills

    Factor monitoring. An agent skill from VernonOY/alpha-skills.

    117 GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed

Questions about Alpha Signal

What does Alpha Signal do?

Daily trading signal generator. An agent skill from VernonOY/alpha-skills. Alpha Signal is an agent skill from VernonOY/alpha-skills. Daily trading signal generator.

When should I use Alpha Signal?

Alpha Signal fits situations like: tasks that involve Trading and backtesting.

How do I install Alpha Signal in Claude Code?

Run `npx skills add VernonOY/alpha-skills --skill alpha-signal -a claude-code`. Or copy the skill folder (skills/alpha-signal in VernonOY/alpha-skills) into .claude/skills/alpha-signal in your project. Claude Code loads it when a task matches its description.

How do I install Alpha Signal in Codex?

Run `npx skills add VernonOY/alpha-skills --skill alpha-signal -a codex`. Or copy the skill folder (skills/alpha-signal in VernonOY/alpha-skills) into .agents/skills/alpha-signal in your project. Codex loads it when a task matches its description.

Can I use Alpha Signal in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add VernonOY/alpha-skills --skill alpha-signal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/alpha-signal, .gemini/skills/alpha-signal, .github/skills/alpha-signal and .opencode/skills/alpha-signal in your project.

What does Alpha Signal need to run?

Going by SKILL.md and its folder, Alpha Signal needs the command-line tools its instructions call (claude). Our summary lists: Python 3.

Does Alpha Signal access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Alpha Signal safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Alpha Signal use?

Alpha Signal is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Alpha Signal use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Alpha Signal?

Skills that share tags, products or a category with Alpha Signal: Tushare Data (zillionare/zillionare, 322 stars), Tradingview MCP (atilaahmettaner/tradingview-mcp, 5k stars), Digital Oracle (komako-workshop/digital-oracle, 878 stars) and Polyclaw (chainstacklabs/polyclaw, 359 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Alpha Signal?

VernonOY (a GitHub user) maintains it in VernonOY/alpha-skills, which has 117 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on April 14, 2026.

Source: VernonOY/alpha-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.