liangwei-zhang/six-stock/multi-factor
Claude Code and agent skill by liangwei-zhang/six-stock
- community
Checking that the SKILL.md file is still in the repository.
Multi-factor cross-sectional stock ranking. Combines factor standardization, equal-weight or IC-weighted scoring, and TopN portfolio construction. Suitable for multi-instrument portfolio strategies.
Install
npx vskill@latest install liangwei-zhang/six-stock/multi-factorSKILL.md
The same SKILL.md was published earlier as jacobhsu/vibe-trading-agent/multi-factor.
Multi-Factor Cross-Sectional Stock Ranking
Purpose
On the same time cross-section, compute multiple factor values for many stocks, standardize them, combine them into a composite score, and select the top-ranked stocks to build a portfolio.
Signal Logic
- Factor calculation: calculate N factors for each stock (such as momentum, value, and quality)
- Cross-sectional standardization: standardize each factor on the cross-section with Z-score normalization (subtract mean, divide by standard deviation)
- Composite scoring: sum the factors with equal weights (or custom weights) to obtain a composite score
- Rank and select: go long the TopN names, with weight = 1/N for each
Built-In Factors
| Factor Name | Calculation Method | Direction | |
|---|---|---|---|
| momentum | Return over the past N days | Positive (higher is better) | |
| reversal | Return over the past 5 days | Negative (lower is better) | |
| volatility | Standard deviation of returns over the past N days | Negative (lower is better) | |
| volume_ratio | Today's volume / N-day average volume | Positive |
If extra_fields are available (China A-shares), you can also add:
pe_factor: 1/PE (the larger, the cheaper)pb_factor: 1/PBroe_factor: ROE (the larger, the better)
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| momentum_window | 20 | Momentum lookback window | |
| vol_window | 20 | Volatility lookback window | |
| top_n | 3 | Number of selected stocks | |
| rebalance_freq | 20 | Rebalancing frequency (trading days) |
Common Pitfalls
- Cross-sectional standardization requires at least 3 stocks, otherwise Z-scores are meaningless
- Keep the previous signal unchanged between rebalance dates (do not rerank every day)
- Factors have different directions: momentum is positively sorted, volatility is negatively sorted, so directions must be aligned before standardization
- Portfolio weights must be normalized: each TopN stock gets 1/N, all others get 0
Dependencies
Signal Convention
1/N= selected into TopN (equal-weight long),0= not selected
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingVibe-Trading/agent/src/skills/multi-factor/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/liangwei-zhang/six-stock/multi-factor)