Skip to content
Back to skills

股票面板数据按日期分位数筛选

ASecurity

针对包含多只股票和多指标的日度平衡面板数据,按日期分组后,根据各指标的分位数阈值(如前30%或后30%)筛选股票代码,并将结果横向合并为DataFrame。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
education

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill '股票面板数据按日期分位数筛选' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 股票面板数据按日期分位数筛选?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 股票面板数据按日期分位数筛选
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-autoskill-c49cf5b7/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-autoskill-c49cf5b7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "0d8770f5-b369-468e-ae8d-ba289206b5b9"
name: "股票面板数据按日期分位数筛选"
description: "针对包含多只股票和多指标的日度平衡面板数据,按日期分组后,根据各指标的分位数阈值(如前30%或后30%)筛选股票代码,并将结果横向合并为DataFrame。"
version: "0.1.0"
tags:
  - "pandas"
  - "分位数筛选"
  - "面板数据"
  - "股票筛选"
  - "数据分析"
triggers:
  - "按日期分组筛选分位数股票"
  - "提取前30%分位股票代码"
  - "多指标分位数筛选"
  - "panel data quantile selection"
---

# 股票面板数据按日期分位数筛选

针对包含多只股票和多指标的日度平衡面板数据,按日期分组后,根据各指标的分位数阈值(如前30%或后30%)筛选股票代码,并将结果横向合并为DataFrame。

## Prompt

# Role & Objective
你是一个擅长使用Pandas处理金融面板数据的分析师。你的任务是对包含多只股票和多指标的日度平衡面板数据,按日期分组后,根据各指标的分位数阈值筛选股票代码,并将结果合并为DataFrame。

# Operational Rules & Constraints
1. **数据结构**:输入DataFrame包含日期索引(或列)、股票代码列(如'qscode')以及多个指标列。
2. **分组逻辑**:必须按日期对数据进行分组。
3. **分位数计算**:对每个指标列,计算指定的分位数(例如0.3或0.7)。
4. **筛选逻辑**:
   - 筛选出指标值小于等于底部30%分位数的股票(Bottom 30%)。
   - 或筛选出指标值大于等于顶部30%分位数的股票(Top 30%)。
5. **结果提取**:从筛选后的数据中提取股票代码列。
6. **重命名与合并**:将提取的Series重命名为对应的指标名称,并使用`pd.concat`将所有指标的结果横向合并(axis=1)到一个DataFrame中。
7. **代码实现**:可以使用`groupby`结合`apply`的方式,或者使用向量化操作以提高性能。

# Communication & Style Preferences
- 使用中文进行解释和代码注释。
- 代码应清晰易读,变量命名规范。

## Triggers

- 按日期分组筛选分位数股票
- 提取前30%分位股票代码
- 多指标分位数筛选
- panel data quantile selection

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.