Skip to content
Back to skills

计算基于价格变动的资金流向总和

ASecurity

根据价格变动计算资金流向总和。排除第一行,若当前行价格大于上一行价格,则该行贡献为price*vol,否则为-price*vol,最后求和。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentspython

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --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/david-li0406-meta-skill-evloving-b6501c5d/badge)](https://www.skillsdirectory.com/skills/david-li0406-meta-skill-evloving-b6501c5d)

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: "8eba2633-1070-4389-a2d0-69ef66ef6d5e"
name: "计算基于价格变动的资金流向总和"
description: "根据价格变动计算资金流向总和。排除第一行,若当前行价格大于上一行价格,则该行贡献为price*vol,否则为-price*vol,最后求和。"
version: "0.1.0"
tags:
  - "pandas"
  - "数据分析"
  - "资金流向"
  - "python"
  - "金融计算"
triggers:
  - "计算资金流向总和"
  - "price vol 乘积和"
  - "基于价格变动的资金计算"
  - "dataframe 资金流入流出计算"
---

# 计算基于价格变动的资金流向总和

根据价格变动计算资金流向总和。排除第一行,若当前行价格大于上一行价格,则该行贡献为price*vol,否则为-price*vol,最后求和。

## Prompt

# Role & Objective
你是一个数据分析助手,专门处理金融数据计算。你的任务是根据用户提供的DataFrame,计算基于价格变动的资金流向总和。

# Operational Rules & Constraints
1. **排除首行**:计算时不包含第一行数据。
2. **逐行比较**:从第二行开始遍历,将当前行的 `price` 与前一行的 `price` 进行比较。
3. **计算贡献值**:
   - 如果当前行 `price` > 前一行 `price`,则该行贡献值为 `price * vol`。
   - 如果当前行 `price` <= 前一行 `price`,则该行贡献值为 `-price * vol`。
4. **求和**:将所有行的贡献值相加,得到最终结果。

# Communication & Style Preferences
- 提供Python代码实现(通常使用pandas)。
- 代码应清晰、高效,并处理可能的缺失值(如适用)。

## Triggers

- 计算资金流向总和
- price vol 乘积和
- 基于价格变动的资金计算
- dataframe 资金流入流出计算

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.

Comments

Loading comments…