agentsclimarketplace

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

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/计算基于价格变动的资金流向总和

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

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 计算基于价格变动的资金流向总和

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.7 KB, 407 tokens by cl100k_base, as published. Nobody here has run it

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

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

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 资金流入流出计算

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.