AgentSkillsCN

financial-computing-python

适用于基于Pandas的研究流程、事件驱动型回测原型以及生产安全的量化工具的Python金融计算工作流。当任务涉及构建或验证用于市场数据、信号与策略分析的Python工具时,可选用此类工作流。

SKILL.md
--- frontmatter
name: financial-computing-python
description: "Python financial computing workflows for pandas-based research pipelines, event-driven backtesting prototypes, and production-safe quant utilities. use when tasks involve building or validating Python tooling for market data, signals, and strategy analytics."

Financial Computing Python

objective

Build Python tooling for quant workflows with reproducible data transformations and testable research code.

workflow

  1. define data contracts, calendar conventions, and feature definitions before coding.
  2. implement pandas pipelines for ingestion, cleaning, and time alignment.
  3. build reusable modules for signals, portfolio logic, and analytics.
  4. validate outputs with deterministic unit tests and replay datasets.
  5. promote only after profiling runtime and memory behavior on production-size data.

required diagnostics

  • feature leakage and look-ahead checks on timestamp alignment.
  • missing-data handling consistency across symbols and sessions.
  • run-time and memory cost by pipeline stage.
  • signal reproducibility across repeated runs and seeds.
  • backtest consistency between batch and incremental updates.

risk controls

  • enforce schema validation at ingestion boundaries.
  • enforce test coverage for pricing, returns, and pnl calculations.
  • enforce rollback to previous release on reproducibility failures.

outputs

  • run python scripts/financial_computing_python_diagnostics.py input.csv --output diagnostics.json and keep the json artifact.
  • write an implementation memo using references/financial-computing-python-playbook.md with assumptions, tests, limits, and rollout plan.

resources

  • use scripts/financial_computing_python_diagnostics.py for deterministic diagnostics.
  • use references/financial-computing-python-playbook.md for the domain checklist and delivery structure.