zer0quant/zer0factor/factor-research
Claude Code and agent skill by zer0quant/zer0factor
- community
Checking that the SKILL.md file is still in the repository.
Use when extracting, reviewing, implementing, or validating stock factors from quant research reports, formulas, or natural-language investment ideas for zer0factor.
Install
npx vskill@latest install zer0quant/zer0factor/factor-researchSKILL.md
Factor Research
Overview
Use this skill to turn a PDF/text report or research direction into reviewable, standard zer0factor factors. The workflow is file-driven: every intermediate artifact must be written to disk so the user can inspect, edit, and resume.
The implementation target is always zer0factor native code: FactorSpec + FactorFrame + compute(). Do not generate Qlib executable expressions.
Quick Start
- Create or reuse a work directory. If starting fresh, run:
- Collect inputs in
<work_dir>/inputs/reports/or accept a natural-language
research direction from the user.
- Produce or update
<work_dir>/factors.jsonthrough the workflow below. - Before generating code, validate contracts:
- Generate factor code under
<work_dir>/code/, then run syntax/import/small
fixture checks before archiving.
Workflow
Step 0: Initialize
Create:
Record target extraction settings if the user specifies them: target_factor_count, selection_mode, and priority rules.
Step 1: Classify Report
Use QuantaAlpha loader prompts only as source material. Prefer classify_system_chinese for Chinese sell-side quant reports. If a document is not a stock factor report, mark it skipped unless the user explicitly wants to continue.
Step 2: Extract Candidate Factors
Extract candidate factors into factors.json. If the user specifies a count, return at most that many factors and prioritize explicit formulas, report-tested factors, available data, and diverse logic.
Supported selection modes:
alltop_representativeformula_onlybacktested_onlyuser_named
Step 3: Deduplicate And Screen
Mark semantic duplicates without deleting them. Then classify each candidate:
relevant: mathematically computable daily per-stock factorviable: computable from current zer0factor standard fields
Step 4: Extract Formula And Variables
Add formulation and variables. Preserve factors with missing formulas, but mark formulation_missing: true.
Step 5: Generate Investment Hypothesis
For each kept candidate, add:
investment_logichypothesisexpected_relationhorizon- concise knowledge/observation/justification/specification when useful
Step 6: Generate FactorSpec And Implementation Plan
Generate a zer0factor-standard spec, logic_expression, and implementation_plan. logic_expression is metadata for review and duplicate checking only.
Read references/zer0factor-standard.md before this step.
Step 7: Apply Quality Gates
Run these checks and write results back to factors.json:
- relevance and viability
- hypothesis/formula/logic/spec consistency
- data contract
- window contract
- complexity
- duplicate logic
Run scripts/validate_factors_json.py after automated or manual edits.
Checkpoint 1: User Review
Pause before code generation. Summarize totals and ask the user to review factors.json. Generate approved.json from factors where:
Do not silently discard user-edited fields.
Step 8: Generate Code
Generate Python factor code only. Rules:
- define a
FactorSpec - implement
compute(self, data: FactorFrame)orcompute(data: FactorFrame) - access data only through fields listed in
spec.inputs - do not read parquet, DuckDB, paths, or zer0share APIs inside the factor
- do not use future data or negative shifts
- use vectorized pandas
- return
trade_date, ts_code, valueviato_factor_output
Read references/code-template.py when writing factor code.
Step 9: Verify Code
For each factor:
ast.parse- import/dry-run
- small fixture execution
- contract validation against the
FactorSpec - final decision
After three failed attempts, pause and ask whether to skip, retry, or return to FactorSpec generation.
Step 10: Archive Feedback
Write implementation results to results/factor_library.json and summarize lessons in feedback/round_feedback.md. If backtest results exist, include whether the hypothesis was supported.
References
references/zer0factor-standard.md: factor interface and data contractreferences/workflow-schema.md: expected JSON artifactsreferences/prompt-map.md: QuantaAlpha prompt sources and when to use themreferences/code-template.py: canonical generated factor shape
Security
- Security scanPassed, 95 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 repositoryCheckingdocs/skills/factor-research/SKILL.md
Popularity
- Repository stars
- 87
- Repository forks
- 13
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. 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/zer0quant/zer0factor/factor-research)