multi-factor-model

multi-factor-model is a skill for Claude Code, Codex from FeiCoder/Skill-Factory. It costs 65 tokens per session (2,925 once invoked), scanned A, original, MIT.

A guide to building a stock-picking model that combines several measurable signals, called factors, such as valuation, growth, profitability, size, momentum, and volatility. It explains how to test those signals and combine them into a score or statistical model.

In plain words
What is it for?
Use it to select candidate factors, test whether they relate to later returns, remove overlapping factors, and build a systematic stock-ranking strategy.
Why use it?
It gives investors a structured way to compare stocks instead of relying on one measure or an unsupported hunch.

Skill for Claude CodeCodex

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

Good fit Use it to select candidate factors, test whether they relate to later returns, remove overlapping factors, and build a systematic stock-ranking strategy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/feicoder/skill-factory/multi-factor-model
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.

Any agent
npx skills add FeiCoder/Skill-Factory --skill multi-factor-model
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 multi-factor-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/feicoder/skill-factory/multi-factor-model/github.svg)](https://agentmods.dev/skills/feicoder/skill-factory/multi-factor-model)
Your own site
<a href="https://agentmods.dev/skills/feicoder/skill-factory/multi-factor-model"><img src="https://agentmods.dev/badge/skills/feicoder/skill-factory/multi-factor-model/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for multi-factor-model

Your own site · 80×15
<a href="https://agentmods.dev/skills/feicoder/skill-factory/multi-factor-model"><img src="https://agentmods.dev/badge/skills/feicoder/skill-factory/multi-factor-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,925 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00065 $0.02925
Opus 5.5 $0.00026 $0.01170
Sonnet 5.5 $0.00013 $0.00585
Haiku 4.5 $0.00006 $0.00293

Measured 1mo ago against content hash f3d1e17027c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

multi-factor-model 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 1mo 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/stock-selection/multi-factor-model/SKILL.md · 296 lines

How it starts

The opening of the file, as written. The whole thing — 296 lines — stays where its author put it; the contents beside it link to each section on GitHub.

多因子选股模型

概述

多因子模型是应用最广泛的选股模型之一。其核心思想是:采用一系列因子作为选股标准,满足这些因子的股票则被买入,不满足的则卖出。

多因子模型相对来说比较稳定,因为在不同市场条件下,总有一些因子会发挥作用。

何时使用此技能:

  • 当需要构建系统化的选股策略时
  • 当需要综合多个指标进行选股时
  • 当需要构建长期稳健的Alpha收益时

理论基础

有效市场假说与因子

市场上的投资者(价值投资者、投机者、短线交易者)都会根据某些因子来判断股票的涨跌。当有一群交易者同时采用某个因子时,就会造成该因子有效。

例如:当很多投资者认为低PE的价值型股票是好的投资标时,他们纷纷买入低PE股票,会使得该股票出现上涨或超越大市。这样就使得低PE因子的有效性得到体现。

两种判断方法

方法 原理 优点 缺点
打分法 根据各个因子大小对股票打分,按权重加权得到总分 相对稳健,不易受极端值影响 不能及时调整敏感性
回归法 用过去收益率对因子回归,预测未来收益 能及时调整敏感性,不同股票敏感性可不同 易受极端值影响

推荐:初学者使用打分法,熟练后可尝试回归法


模型构建五步法

第一步:候选因子选取

候选因子类型及示例:

类别 因子 说明
估值因子 PE、PB、PS 市盈率、市净率、市销率
成长因子 净利润增长率、营收增长率、EPS增长率 盈利增长速度
盈利因子 ROE、ROA、毛利率、净利率 盈利能力
规模因子 总市值、流通市值 公司大小
动量因子 20日涨跌幅、60日涨跌幅 过去价格表现
波动因子 日收益率标准差 价格波动程度
预期因子 分析师一致预期、盈利预测 市场预期
宏观因子 GDP增速、M2 经济环境

选取原则:

  • 因子必须有经济意义
  • 因子必须具备显著的预测能力
  • 更多和更有效的因子能增强信息捕获能力

第二步:因子有效性检验

检验方法:排序法

Step 1: 在每个月初计算每只个股的各因子指标
Step 2: 按因子大小从小到大排序,平均分为n个组合(建议5个)
Step 3: 持有至月末,下月初重新构建组合
Step 4: 重复到模型形成期末

有效性判断标准(三个条件):

  1. 排序关系:组合因子大小与收益应具有较大相关性

    • 因子越小收益越高:x₁ < x₂ < ... < xₙ 应导致 r₁ > r₂ > ... > rₙ
    • 或因子越大收益越高:反向关系
  2. 超额收益:极端组合应有显著超额收益

    • max(Ri - Rb) > 最小超额收益阈值
    • min(Ri - Rb) < 最大负超额收益阈值
  3. 胜率:不同市场环境下高收益组合跑赢基准概率高

关键指标:

指标 含义 合格标准
年化复合收益 组合的实际收益 最高组合 > 最低组合
超额收益 相对于基准的收益 > 5%
跑赢概率 跑赢基准的月份占比 > 60%

第三步:冗余因子剔除

问题:不同因子可能由于内在驱动因素相同,所选出的组合高度一致,需要剔除冗余因子。

剔除步骤:

Step 1: 对不同因子下的n个组合打分(收益越大分值越高)
Step 2: 按月计算个股因子得分间的相关性矩阵
Step 3: 计算整个样本期内相关性矩阵的平均值
Step 4: 设定阈值(通常0.5),超过阈值的因子只保留有效性最强的

案例:盈利收益率与PEG相关性0.89 → 只保留盈利收益率


第四步:综合评分模型

构建方法:

Step 1: 选取去除冗余后的有效因子
Step 2: 每月初计算每只股票的各因子得分
Step 3: 按权重加权求平均分
Step 4: 按总分排序,选取排名靠前的股票

可选参数:

  • 选取得分最高的前20%股票
  • 或选取得分最高的50~100只股票

注意:

  • ST/PT股票应剔除
  • 如因子无法取值,该因子不参与平均

Read the full file on GitHub · 296 lines

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. 1mo ago First seen · 296 lines · 65 tokens per session scan A f3d1e17027c8

Subscribe to this mod's changes

multi-factor-model is a skill published in the GitHub repository FeiCoder/Skill-Factory (11 stars, last pushed 7mo ago), licensed MIT. It adds 65 tokens to every session and 2,925 once invoked, about $0.0003 per session on Opus 5.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.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

twitter-reader

Read Twitter/X for financial research through opencli: the user's home timeline, tweet search, trending topics, bookmarks, a user's recent tweets, threads, articles, profiles, followers and following, and notifications. Use this skill whenever the user wants to know what people are saying on Twitter/X or fintwit about…

himself65/finance-skills · 110 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

energy-procurement

Codified expertise for electricity and gas procurement, tariff optimization, demand charge management, renewable PPA evaluation, and multi-facility energy cost management. Informed by energy procurement managers with 15+ years experience at large commercial and industrial consumers. Includes market structure analysis…

hashgraph-online/awesome-codex-plugins · 93 tokens

china-portfolio-monitoring

A monitoring framework for tracking the financial results, operating measures, strategic milestones, and risks of companies held by China-focused private-equity funds. It uses measures such as revenue growth, margins, debt, cash flow, and return on equity.

jwangkun/claude-for-financial-services-cn · 86 tokens

airdrop-hunting-guide

Guide to finding and qualifying for crypto airdrops — eligibility criteria, farming strategies, on-chain activity requirements, Sybil detection avoidance, and tracking tools. Use when helping users understand airdrops, check eligibility, or plan participation strategies.

nirholas/three.ws · 54 tokens