Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计通过

multi-factor-strategy多因素策略

Agent Skill

multi-factor-strategy 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

134,459

周安装

5,547

GitHub Stars

3

下载量

43,932
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:multi-factor-strategy(多因素策略)
来源仓库:https://github.com/wumu2013/multi-factor-strategy
安装命令:
openclaw skills install multi-factor-strategy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install multi-factor-strategy

简介

multi-factor-strategy 指导创建多因素选股策略并生成 YAML 配置文件。

  • 适用于量化投资、股票筛选或金融建模类开发任务。
  • 通过 OpenClaw 安装后,Agent 可解析因子权重与回测参数。
  • 使用前需验证因子有效性,避免过拟合历史数据。
  • 建议结合实盘数据持续优化策略,适应市场变化。

SKILL.md

name
multi-factor-strategy
description
Guide users to create multi-factor stock selection strategies and generate independent YAML configuration files

{"homepage":"https://gitcode.com/datavoid/quantcli","user-invocable":true}

Multi-Factor Strategy Assistant

Guide you to create multi-factor stock selection strategies and generate independent YAML configuration files.

Install quantcli

# Install from PyPI (recommended)
pip install quantcli

# Or install from source
git clone https://gitcode.com/datavoid/quantcli.git
cd quantcli
pip install -e .

Verify installation:

quantcli --help

Quick Start

A complete multi-factor stock selection strategy YAML example:

name: Value-Growth Hybrid Strategy
version: 1.0.0
description: ROE + Momentum factor stock selection

screening:
  fundamental_conditions:    # Stage 1: Financial condition screening
    - "roe > 0.10"           # ROE > 10%
    - "pe_ttm < 30"          # P/E < 30
    - "pe_ttm > 0"           # Exclude losses
  daily_conditions:          # Stage 2: Price condition screening
    - "close > ma10"         # Above 10-day MA
  limit: 100                 # Keep at most 100 stocks

# Factor configuration (supports two methods, factors at top level)
factors:
  # Method 1: Inline factor definition
  - name: ma10_deviation
    expr: "(close - ma(close, 10)) / ma(close, 10)"
    direction: negative
    description: "10-day MA deviation"

  # Method 2: External reference (reference factor files in factors/ directory, include .yaml suffix)
  - factors/alpha_001.yaml
  - factors/alpha_008.yaml

ranking:
  weights:                   # Weight fusion
    ma10_deviation: 0.20     # Inline factor
    factors/alpha_001.yaml: 0.40  # External reference factor
    factors/alpha_008.yaml: 0.40
  normalize: zscore          # Normalization method

output:
  limit: 30                  # Output top 30 stocks
  columns: [symbol, name, score, roe, pe_ttm, close, ma10_deviation]

Factor Configuration Methods

Factor configuration supports two methods (can be mixed):

MethodTypeExampleDescription
Inlinedict{name: xxx, expr: "..."}Define expression directly in YAML
Externalstrfactors/alpha_001.yamlLoad factor file from factors/ directory

Example: Mixed usage

factors:
  # Inline: Custom factor
  - name: custom_momentum
    expr: "close / delay(close, 20) - 1"
    direction: positive

  # External: Alpha101 factor library (include .yaml suffix)
  - factors/alpha_001.yaml
  - factors/alpha_005.yaml
  - factors/alpha_009.yaml

ranking:
  weights:
    custom_momentum: 0.3
    factors/alpha_001.yaml: 0.3
    factors/alpha_005.yaml: 0.2
    factors/alpha_009.yaml: 0.2

Run strategy:

quantcli filter run -f your_strategy.yaml

Invocation

/multi-factor-strategy

Available Expression Functions

Data Processing Functions

FunctionUsageDescription
delaydelay(x, n)Lag n periods
mama(x, n)Simple moving average
emaema(x, n)Exponential moving average
rolling_sumrolling_sum(x, n)Rolling sum
rolling_stdrolling_std(x, n)Rolling standard deviation

Technical Indicator Functions

FunctionUsageDescription
rsirsi(x, n=14)Relative strength index
correlationcorrelation(x, y, n)Correlation coefficient
cross_upcross_up(a, b)Golden cross (a crosses above b)
cross_downcross_down(a, b)Death cross (a crosses below b)

Ranking & Normalization Functions

FunctionUsageDescription
rankrank(x)Cross-sectional ranking (0-1)
zscorezscore(x)Standardization
signsign(x)Sign function
clampclamp(x, min, max)Clipping function

Conditional Functions

FunctionUsageDescription
wherewhere(cond, t, f)Conditional selection
ifif(cond, t, f)Conditional selection (alias)

Base Fields

FieldDescription
open, high, low, closeOHLC prices
volumeTrading volume
pe, pbP/E ratio, P/B ratio
roeReturn on equity
netprofitmarginNet profit margin

Guided Workflow

Step 1: Strategy Goal定位

I will first understand your strategy needs:

  • Strategy Type: Value, Growth, Momentum, Volatility, Hybrid
  • Selection Count: Concentrated(10-30), Medium(50-100), Diversified(200+)
  • Holding Period: Intraday, Short-term(week), Medium-term(month), Long-term(quarter)

Step 2: Factor Selection

Based on your strategy goals, recommend suitable factor combinations:

Common Fundamental Factors:

FactorExpressionDirectionDescription
roeroepositiveReturn on equity
pepenegativeLower P/E is better
pbpbnegativePrice-to-book ratio
netprofitmarginnetprofitmarginpositiveNet profit margin
revenue_growthrevenue_yoypositiveRevenue growth rate

Common Technical Factors:

FactorExpressionDirectionDescription
momentum(close/delay(close,20))-1positiveN-day momentum
ma_deviation(close-ma(close,10))/ma(close,10)negativeMA deviation
ma_slope(ma(close,10)-delay(ma(close,10),5))/delay(ma(close,10),5)positiveMA slope
volume_ratiovolume/ma(volume,5)negativeVolume ratio

Alpha101 Built-in Factors (can reference {baseDir}/alpha101/alpha_XXX):

QuantCLI includes 40 WorldQuant Alpha101 factors that can be directly referenced:

FactorCategoryDescription
alpha101/alpha_001Reversal20-day new high then decline
alpha101/alpha_002ReversalDown volume bottom
alpha101/alpha_003VolatilityLow volatility stability
alpha101/alpha_004Capital FlowNet capital inflow
alpha101/alpha_005TrendUptrend
alpha101/alpha_008Capital FlowCapital inflow
alpha101/alpha_009MomentumLong-term momentum
alpha101/alpha_010ReversalMA deviation reversal
alpha101/alpha_011 ~ alpha_020ExtendedVolatility, momentum, price-volume factors
alpha101/alpha_021 ~ alpha_030ExtendedPrice-volume, trend, strength factors
alpha101/alpha_031 ~ alpha_040ExtendedPosition, volatility, capital factors

View all built-in factors:

quantcli factors list

Usage Example:

factors:
  - alpha101/alpha_001   # Reversal factor
  - alpha101/alpha_008   # Capital inflow
  - alpha101/alpha_029   # 5-day momentum
ranking:
  weights:
    alpha101/alpha_001: 0.4
    alpha101/alpha_008: 0.3
    alpha101/alpha_029: 0.3

Screening Conditions Example:

screening:
  conditions:
    - "roe > 0.10"              # ROE > 10%
    - "netprofitmargin > 0.05"  # Net profit margin > 5%

Step 3: Weight Configuration

Allocate weights based on factor importance, 0 means only for screening, not scoring:

ranking:
  weights:
    # Fundamental factors
    roe: 0.30
    pe: 0.20
    # Technical factors
    ma_deviation: 0.30
    momentum: 0.20
  normalize: zscore

Step 4: Generate Strategy File

I will generate a complete strategy YAML file for you:

name: Your Strategy Name
version: 1.0.0
description: Strategy description

# Stage 1: Fundamental screening
screening:
  conditions:
    - "roe > 0.10"
    - "pe < 30"
  limit: 200

# Stage 2: Technical ranking
ranking:
  weights:
    roe: 0.30
    pe: 0.20
    ma_deviation: 0.30
    momentum: 0.20
  normalize: zscore

output:
  columns: [symbol, score, rank, roe, pe, momentum]
  limit: 30

Step 5: Run & Evaluate

Run strategy:

quantcli filter run -f your_strategy.yaml --top 30

Evaluation points:

  1. Selected stock count: Check if screening conditions are reasonable
  2. Factor distribution: Distribution of factor scores
  3. Industry diversification: Avoid over-concentration

FAQ

Q: How to allocate factor weights? A: Core factors 0.3-0.4, auxiliary factors 0.1-0.2, ensure weights sum close to 1

Q: Screening conditions too strict resulting in empty results? A: Gradually relax conditions, first see how many stocks meet each condition

Q: What expression syntax is supported? A: Supports 40+ built-in functions: ma(), ema(), delay(), rolling_sum(), rsi(), rank(), zscore(), etc.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

79.56%
按下载量换算34,952

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills