multi-factor

Compute cross-sectional Z-score factors and select TopN equal-weight long portfolios.

Updated May 5, 2026
One-click install
npx skills add https://github.com/wudye/traderAssistHK --skill multi-factor-wudye
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: multi-factor
Source: https://github.com/wudye/traderAssistHK/tree/main/backend/src/skills/multi-factor
Command: npx skills add https://github.com/wudye/traderAssistHK --skill multi-factor-wudye

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces manual stock selection by automatically computing multiple factor signals across many instruments, standardizing them on the same cross-section, and constructing a TopN equal-weight long portfolio.

Core Features & Use Cases

  • Multi-factor computation: calculates momentum, reversal, volatility, and volume_ratio per stock from OHLCV time series.
  • Cross-sectional standardization: applies Z-score normalization per factor across the available universe at each evaluation date.
  • Composite scoring and TopN selection: combines standardized factor scores (equal-weight across factors by default) and selects the top-ranked names to assign weight 1/N.
  • Rebalancing schedule: keeps the selected portfolio until the next rebalance date, avoiding unnecessary daily reranking.
  • Use Case: build a systematic multi-instrument strategy that goes long the top-ranked stocks based on standardized factor strength, suitable for backtesting and research workflows.

Quick Start

Use the multi-factor skill to generate TopN equal-weight long signals from a mapping of ticker symbols to OHLCV DataFrames containing close and volume columns.

Frequently Asked Questions about multi-factor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a TopN equal-weight long portfolio from multiple stock factors?

To build a TopN equal-weight long portfolio, compute multiple factor signals from OHLCV time series, standardize them cross-sectionally using Z-scores, combine into a composite score, and assign 1/N inclusion weights to the top-ranked stocks.

How does cross-sectional Z-score standardization work for multi-factor stock ranking?

Cross-sectional Z-score standardization normalizes each factor value across the entire stock universe at a specific evaluation date, ensuring different factors are comparable before being combined into a composite ranking score.

Can I use pandas DataFrames to compute momentum and reversal factors for backtesting?

Yes, you can use pandas DataFrames containing close and volume columns to compute momentum, reversal, volatility, and volume ratio factors for systematic backtesting and research workflows.

What is the rebalancing schedule for a multi-factor stock selection strategy?

The rebalancing schedule maintains the selected TopN portfolio until the next rebalance date, avoiding unnecessary daily reranking while keeping deterministic selection outputs aligned to the input date indexes.

How do I enforce consistent factor directions before standardizing stock rankings?

Enforcing consistent factor directions ensures that higher values uniformly indicate better rankings before Z-score standardization, preventing conflicting signals from distorting the composite score during portfolio construction.

Does multi-factor portfolio construction support daily reranking of stock universes?

Multi-factor portfolio construction avoids daily reranking by keeping the selected TopN equal-weight portfolio until the scheduled rebalance date, reducing turnover and maintaining deterministic selection outputs.