Skip to content
Skills Library
Data & analytics · Building & coding

skill-quant-factor-skill-factory

/skill-quant-factor-skill-factory

Use when converting OHLCV alpha ideas into QuantSkills organization factor Skills, batch-generating non-duplicate framework-neutral quant factor Skill folders, validating them on cached real market data such as AkShare A-share and Yahoo US data, and writing factor evaluation reports.

Licence
GPL-3.0
Last repository change
16.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
11
Scripts
1
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 16.07.2026, without references to retired models or APIs.

Licence

GPL-3.0, otwarta.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/generate_factor_skill_batch.py

What it does and when to use it

Use when converting OHLCV alpha ideas into QuantSkills organization factor Skills, batch-generating non-duplicate framework-neutral quant factor Skill folders, validating them on cached real market data such as AkShare A-share and Yahoo US data, and writing factor evaluation reports.

Original author description

Use when converting OHLCV alpha ideas into QuantSkills organization factor Skills, batch-generating non-duplicate framework-neutral quant factor Skill folders, validating them on cached real market data such as AkShare A-share and Yahoo US data, and writing factor evaluation reports.

How it works

  1. Workflow
  2. Output Summary
  3. Important Guardrails
Original SKILL.md headings · 122 lines, 511 words
SKILL.md preview
---
name: skill-quant-factor-skill-factory
description: Use when converting OHLCV alpha ideas into QuantSkills organization factor
  Skills, batch-generating non-duplicate framework-neutral quant factor Skill folders,
  validating them on cached real market data such as AkShare A-share and Yahoo US
  data, and writing factor evaluation reports.
license: GPL-3.0-only
metadata:
  short-description: Generate and validate quant factor Skills
  organization: QuantSkills
  organization_url: https://github.com/quantskills
  repository: skill-quant-factor-skill-factory
  repository_url: https://github.com/quantskills/skill-quant-factor-skill-factory
  project_type: skill
  collection: skill-quant-factor-skill-factory
  creator: abgyjaguo
  maintainer: abgyjaguo
  license: GPL-3.0-only
  copyright: Copyright (C) 2026 QuantSkills
quantSkills:
  project_type: skill
  collection: skill-quant-factor-skill-factory
  creator: abgyjaguo
  maintainer: abgyjaguo
  category: tooling
  tags:
  - factor-factory
  - alpha
  - ohlcv
  - validation
  - skill-generation
  platforms:
  - claude-code
  - codex
  - hermes
  - openclaw
  - cursor
  status: stable
  validation_level: runnable
  maintainer_type: official
  summary_zh: 不是因子库本身,而是继续生产因子库的工具:批量生成、验证和打包框架中立的 OHLCV 量化因子 Skill。
  summary_en: Factory skill for turning OHLCV alpha ideas into QuantSkills factor
    skills with real-market validation and packaging.
  license: GPL-3.0
---

```json qsh-form
{
  "version": 1,
  "task": {
    "placeholder": "请说明要生成或维护的 OHLCV 因子技能主题、现有索引与输出要求",
    "required": true
  },
  "fields": [
    {
      "key": "count",
      "label": "生成数量",
      "type": "number",
      "default": "10",
      "required": true
    },
    {
      "key": "start_id",
      "label": "起始因子 ID",
      "type": "number",
      "placeholder": "例如:1001"
    },
    {
      "key": "market",
      "label": "验证市场",
      "type": "select",
      "default": "both",
      "options": [
        { "value": "both", "label": "A 股与美股" },
        { "value": "cn", "label": "A 股" },
        { "value": "us", "label": "美股" }
      ]
    }
  ],
  "prompt_template": "{{#task}}任务与材料:\n{{task}}\n\n{{/task}}{{#attachments}}用户上传的材料(已放入工作区):\n{{attachments}}\n\n{{/attachments}}使用量化因子技能工厂生成 {{count}} 个框架无关的 OHLCV 因子 Skill。{{#start_id}}从起始 ID {{start_id}} 起生成;{{/start_id}}未指定起始 ID 时按既有索引推断下一个可用编号。并在 {{market}} 真实缓存行情上验证;生成前检查既有索引避免重复,确保每个目录具备规定的技能说明、双语文档、因子与验证脚本、真实验证结果、公式参考和适配文件,核验通过数、数据供应商、市场覆盖、合并索引重复数及抽样验证结果,输出中文报告。"
}
```

# Skill Quant Factor Skill Factory

Use this QuantSkills organization Skill when the user wants to create, extend, or maintain a library of framework-neutral quant factor Skills from OHLCV data.

The standard contract is:

- Factors are framework-neutral Python Skills for the QuantSkills organization.
- Users bring their own market data; generated factor code only requires `open`, `high`, `low`, `close`, `volume`, plus optional `date`, `symbol`, and `market`.
- Validation must use cached real OHLCV data when available. Do not describe synthetic validation as real validation.
- For China data, prefer AkShare A-share cache. For US data, prefer Yahoo Finance cache.
- Every generated factor folder must include `SKILL.md`, bilingual `README.md`, `scripts/factor.py`, `scripts/validate.py`, `validation_real/result.json`, `validation_real/report.md`, `references/formula.md`, and `agents/openai.yaml`.
- Before delivery, verify uniqueness across all previous factor indexes and confirm the generated package is complete.

## Workflow

1. Inspect the current project state:

   ```powershell
   Get-ChildItem
   Get-Content .\real_market_data\panels\panel_manifest.json
   ```

2. Confirm the real data panel contains market and vendor evidence:

   ```json
   {
     "markets": {"cn": 98, "us": 50},
     "sources": ["akshare", "yahoo"]
   }
   ```

   Exact counts can vary by project, but the report must state the actual counts.

3. Generate the next batch with the reusable script.

   If the project already has `tools/real_data_factor_pipeline.py`, copy only `scripts/generate_factor_skill_batch.py` from this skill into the project's `tools/` folder. If not, copy the validated pipeline scripts from a previous project first, then adapt data download paths.

   Example:

   ```powershell
   $env:PYTHONUTF8='1'
   python .\tools\generate_factor_skill_batch.py `
     --count 200 `
     --start-id 1001 `
     --existing-index .\real_data_factor_skills_all_1000_index.json `
     --output-root .\real_data_factor_skills_extra_200_next `
     --combined-index .\real_data_factor_skills_all_1200_index.json `
     --report-name extra_200_next_factor_evaluation_report.md
   ```

4. Run validation and acceptance checks:

   ```powershell
   python -m py_compile .\tools\generate_factor_skill_batch.py
   python .\tools\generate_factor_skill_batch.py --count <N> --start-id <ID> --existing-index <index.json> --output-root <folder> --combined-index <index.json> --report-name <report.md>
   ```

5. Audit the output:

   - Count generated factor directories equals the requested count.
   - `validation_summary_real.json` has the requested count.
   - All rows have `status == "pass"` unless the user explicitly accepts review rows.
   - All rows show the expected real-data market coverage.
   - Combined index has no duplicate `slug`.
   - Run `scripts/validate.py` for the first, middle, and last generated factor folders.

## Output Summary

Always finish with:

- output folder
- factor ID range
- pass count
- real data panel counts and market vendors
- combined index count and duplicate count
- report path
- sampled `scripts/validate.py` result

## Important Guardrails

- Do not claim Yahoo data is present unless `real_market_data/raw/yahoo_us/*.parquet` and the panel manifest prove it.
- Do not overwrite previous batches unless the user asks for regeneration.
- Use UTF-8 when reading or writing Chinese filenames and Markdown: set `PYTHONUTF8=1` in PowerShell.
Files in this package (11)
  • .gitattributes 1 KB
  • .gitignore 1 KB
  • LICENSE 34 KB
  • README.en.md 7 KB
  • README.md 7 KB
  • SKILL.md 6 KB
  • agents/cursor-rule.mdc 1 KB
  • agents/openai.yaml 1 KB
  • agents/portable-loader.md 1 KB
  • references/acceptance_checklist.md 1 KB
  • scripts/generate_factor_skill_batch.py 14 KB

Versions

The database has no other skills named skill-quant-factor-skill-factory.

Database snapshot: 13.11.2026 · package version d470fb6b411c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95quant-factor-directional-alpha
    Use when an agent needs a verified library of directional OHLCV alpha factor Skills for trend, breakout, reversal, channel-position, or price-direction research across A-share and US equity samples.
  • 95quant-factor-risk-pattern-alpha
    Use when an agent needs a verified library of OHLCV risk-state and chart-pattern alpha factor Skills for volatility, K-line shape, shock, drawdown, and pressure analysis.
  • 95factor-alpha191-alpha101
    Compute deterministic Alpha101, Alpha158, and Alpha191 factor-library values from long-form OHLCV CSV market data. Use when an agent needs selected or full classic factor columns, wide factor CSVs, and skipped-factor metadata without LLM evaluation, IC calculation, or backtesting.
  • 100quant-factor-tracker
    证券金融工程研究员因子跟踪与评估技能。当用户要求跟踪量化因子表现、更新因子库、计算因子IC/IR、分析分组超额收益、评估因子有效性、监控因子衰减或生成因子跟踪报告时触发。包括“因子跟踪”、“计算因子IC”、“因子失效分析”、“生成因子评估报告”、“因子库更新”、“看看这些因子最近表现怎么样”、“跑一下IC和分组收益”等表述。本技能自动获取或接收因子截面数据与下期收益率,计算Rank IC、IR、分组超额收益,执行单调性与衰减检验,标记因子强弱状态与失效预警,输出标准化Markdown格式因子跟踪报告。
  • 100factor-data
    Validate, resample, and ingest market data for factor mining. Schema-checks OHLCV files (CSV/Parquet/HDF5), resamples bar frequencies, and pulls live data from external MCP connectors (FactSet, Daloopa, Morningstar). Use before any mining run. Triggers on "validate data", "check…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.