Token导航 LogoToken导航

Agent Skill · 开发

track-equity-cumulative-return(跟踪股权累计回报)

track-equity-cumulative-return 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

track-equity-cumulative-return 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 19,716。

总安装 259周安装 11GitHub Stars 3下载 91核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:track-equity-cumulative-return(跟踪股权累计回报)
来源仓库:https://github.com/fatfingererr/macro-skills
仓库路径:skills/track-equity-cumulative-return
安装命令:
npx skills add https://github.com/fatfingererr/macro-skills --skill track-equity-cumulative-return
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/fatfingererr/macro-skills --skill track-equity-cumulative-return

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。适合围绕代码变更或协作事项进行整理时使用。可结合来源仓库和原始 README 继续核验具体用法。

安装命令:npx skills add https://github.com/fatfingererr/macro-skills --skill track-equity-cumulative-return 建议确认权限范围和是否执行命令后再使用

来源仓库内路径:skills/track-equity-cumulative-return

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/fatfingererr/macro-skills --skill track-equity…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

track-equity-cumulative-return 怎么安装?

在终端执行 npx skills add https://github.com/fatfingererr/macro-skills --skill track-equity-cumulativ…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

track-equity-cumulative-return 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

track-equity-cumulative-return 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

track-equity-cumulative-return 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

track-equity-cumulative-return 用的人多吗?

公开数据是累计安装 259 次,近一周安装 11 次,下载 91 次,GitHub 3 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

track-equity-cumulative-return 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
track-equity-cumulative-return

跟踪股权累计回报 · 本页

2593需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

<essential_principles>

All cumulative return analyses use S&P 500 (^GSPC) as the fixed benchmark. This is a core methodology decision:

  • S&P 500 represents the broad US equity market
  • Provides consistent, comparable baseline across all analyses
  • "vs Benchmark" = Stock Return - S&P 500 Return
  • Positive vs Benchmark indicates outperformance (Alpha)

This is hardcoded and cannot be changed.

For cumulative return calculation, the base date is the last trading day of the previous year:

Cumulative Return = ((Final Price / Base Price) - 1) × 100%

Key methodology:

  • Analyzing 2024 → Base date is 2023-12-29 (last trading day of 2023)
  • This captures the true return from year-end investment to period end

All tickers are aligned to common trading days with data.

This skill supports 4 distinct scenarios:

ScenarioModeDescriptionExample
1.aStock(s), Year OnlyAnalyze specific tickers for a single full yearNVDA, AMD in 2024 only
1.bStock(s), Year to TodayAnalyze specific tickers from a year to todayNVDA, AMD from 2022 to today
2.aIndex Top N, Year OnlyRank index components for a single full yearNasdaq 100 Top N in 2024 only
2.bIndex Top N, Year to TodayRank index components from a year to todayNasdaq 100 Top N from 2022 to today

Use --year-only flag to switch between "Year Only" (a) and "Year to Today" (b) modes.

Index CodeNameComponents
nasdaq100Nasdaq 100 Index~100
sp100S&P 100 Index100
dow30Dow Jones 30 Index30
soxPhiladelphia Semiconductor Index30

Top N analysis fetches all component stocks and ranks by return.

</essential_principles>

  1. Fetch Data: Get historical prices from Yahoo Finance (with caching)
  2. Calculate Returns: Cumulative return
  3. Benchmark Comparison: Compare against S&P 500 (fixed)
  4. Rank Analysis: Index component Top N performance ranking
  5. Visualization: dark theme PNG charts

Output: Cumulative return time series chart, performance ranking table, JSON data, Markdown report.

<quick_start>

Quick Start: Analyze Stock Cumulative Returns

cd skills/track-equity-cumulative-return/scripts
pip install pandas numpy yfinance matplotlib  # First time only

# Scenario 1.a: Stock(s), 2024 Year Only
python cumulative_return_analyzer.py --ticker NVDA AMD --year 2024 --year-only

# Scenario 1.b: Stock(s), 2022 to Today
python cumulative_return_analyzer.py --ticker NVDA AMD GOOGL --year 2022

# Scenario 2.a: Nasdaq 100 Top 10, 2024 Year Only
python index_component_analyzer.py --index nasdaq100 --year 2024 --year-only --top 10

# Scenario 2.b: Nasdaq 100 Top 20, 2022 to Today
python index_component_analyzer.py --index nasdaq100 --year 2022 --top 20

# Visualization (with charts)
python visualize_cumulative.py --ticker NVDA AMD --year 2024 --year-only
python visualize_cumulative.py --mode top20 --index nasdaq100 --year 2022 --top 20

Sample output:

{
  "skill": "track-equity-cumulative-return",
  "as_of": "2026-01-28",
  "mode": "year_to_today",
  "parameters": {
    "tickers": ["NVDA", "AMD"],
    "start_year": 2022,
    "year_only": false
  },
  "benchmark": {
    "ticker": "^GSPC",
    "name": "S&P 500",
    "cumulative_return_pct": 45.2
  },
  "summary": {
    "best_performer": "NVDA",
    "best_return": 542.2,
    "beat_benchmark_count": 2
  }
}

</quick_start>

Scenario Selection:

  1. Scenario 1.a - Analyze stock(s) for a specific year only (e.g., "NVDA in 2024 full year")
  2. Scenario 1.b - Analyze stock(s) from a year to today (e.g., "NVDA from 2022 to today")
  3. Scenario 2.a - Index Top N for a specific year only (e.g., "Nasdaq 100 Top N in 2024")
  4. Scenario 2.b - Index Top N from a year to today (e.g., "Nasdaq 100 Top N since 2022")
  5. Methodology - Learn about cumulative return calculation

Provide your analysis parameters or select a scenario.

Key flags:

  • --year-only: Analyze only the specified year (scenarios a)
  • Without --year-only: Analyze from year to today (scenarios b)
  • --top N: Select Top N for index analysis

All scripts use Yahoo Finance real data with caching. Benchmark is always S&P 500.

<reference_index> Reference Documents (references/)

FileContent
methodology.mdCumulative return calculation methodology
data-sources.mdYahoo Finance data source documentation
input-schema.mdComplete input parameter definitions
index-components.mdSupported index component lists
</reference_index>

<workflows_index>

WorkflowScenarioUse Case
quick-check.md1.a/1.bQuick check single ticker
compare.md1.a/1.bCompare multiple tickers
top20.md2.a/2.bIndex Top N analysis
</workflows_index>

<templates_index>

TemplatePurpose
output-json.mdJSON output structure definition
output-markdown.mdMarkdown report template
</templates_index>

<scripts_index>

ScriptCommand ExamplePurpose
fetch_price_data.py--ticker NVDA --start 2022-01-01Yahoo Finance data fetching
cumulative_return_analyzer.py--ticker NVDA AMD --year 2022Cumulative return calculation (1.a/1.b)
index_component_analyzer.py--index nasdaq100 --year 2022Index component analysis (2.a/2.b)
visualize_cumulative.py--ticker NVDA AMD --year 2022visualization
</scripts_index>

<input_schema_summary>

Required Parameters

ParameterTypeDescription
tickerstringStock ticker(s) - can be multiple
yearintStart year

Optional Parameters

ParameterTypeDefaultDescription
year-onlyflagfalseIf set, analyze only the specified year
indexstringnasdaq100Index type (for Top N mode)
topint20Top N to select
outputstringautoOutput file path
modestringcompareMode (compare/top20)

Note: Benchmark is hardcoded to S&P 500 (^GSPC) and cannot be changed.

See references/input-schema.md for complete parameter definitions.

</input_schema_summary>

Chart Specifications

Charts follow thoughts/shared/guide/bloomberg-style-chart-guide.md:

  • Background: #1a1a2e (dark blue-black)
  • Grid: #2d2d44 (dark gray-purple)
  • Primary lines: #ff6b35 (orange-red), #ffaa00 (orange-yellow)
  • Benchmark line: #004E89 (deep blue dashed)
  • Zero line: #666666 (gray dotted)

X-axis format:

  • January: Show year (e.g., "2024")
  • February-December: Show month number (e.g., "2", "3",... "12")

Output specs:

  • Size: 14×8 inches (compare) / 16×10 inches (top20)
  • Resolution: 150 dpi
  • Format: PNG

<output_schema_summary>

{
  "skill": "track-equity-cumulative-return",
  "as_of": "2026-01-28",
  "mode": "year_to_today",
  "parameters": {
    "tickers": ["NVDA", "AMD"],
    "start_year": 2022,
    "year_only": false
  },
  "period": {
    "start_date": "2021-12-31",
    "end_date": "2026-01-28",
    "years_held": 4.08
  },
  "benchmark": {
    "ticker": "^GSPC",
    "name": "S&P 500",
    "cumulative_return_pct": 45.2
  },
  "summary": {
    "best_performer": "NVDA",
    "best_return": 542.2,
    "benchmark_return": 45.2,
    "beat_benchmark_count": 2
  },
  "results": [
    {
      "ticker": "NVDA",
      "name": "NVIDIA (NVDA)",
      "cumulative_return_pct": 542.2,
      "vs_benchmark": 497.0
    }
  ],
  "chart_path": "output/cumulative_return_2026-01-28.png"
}

See templates/output-json.md for complete output structure. </output_schema_summary>

<success_criteria> Successful execution should produce:

  • Cumulative return time series data
  • Cumulative return for each ticker
  • Comparison against S&P 500 benchmark (vs benchmark)
  • Performance ranking (sorted by return descending)
  • Beat benchmark statistics
  • visualization chart (output/*.png)
  • JSON result output (optional)

Chart X-axis: Year shown in January, month numbers (2-12) for other months. </success_criteria>

<extended_examples>

Example 1: Single Stock Full Year Analysis (Scenario 1.a)

Analyze NVIDIA's performance in 2024:

cd skills/track-equity-cumulative-return/scripts
python cumulative_return_analyzer.py --ticker NVDA --year 2024 --year-only

Expected output:

==========================================================================================
Cumulative Return Analysis Report
==========================================================================================
Period: 2024 Full Year (2023-12-29 ~ 2024-12-31)
Benchmark: S&P 500
==========================================================================================

Rank  Ticker  Name                 Cum. Return   vs Bench
----------------------------------------------------------------------
1     NVDA    NVIDIA (NVDA)          +185.52%  +160.97% ✓
----------------------------------------------------------------------
Bench ^GSPC   S&P 500                 +24.54%
==========================================================================================

Statistics:
  - Best performer: NVDA (+185.52%)
  - Beat benchmark: 1 / 1

Example 2: Multi-Stock Long-Term Comparison (Scenario 1.b)

Compare FAANG stocks from 2020 to today:

python cumulative_return_analyzer.py --ticker META AAPL AMZN NFLX GOOGL --year 2020
python visualize_cumulative.py --ticker META AAPL AMZN NFLX GOOGL --year 2020

Example 3: Semiconductor Index Top 10 (Scenario 2.a)

Find top 10 semiconductor performers in 2024:

python index_component_analyzer.py --index sox --year 2024 --year-only --top 10
python visualize_cumulative.py --mode top20 --index sox --year 2024 --year-only --top 10

Example 4: Dow 30 Long-Term Analysis (Scenario 2.b)

Analyze Dow 30 components from 2020:

python index_component_analyzer.py --index dow30 --year 2020 --top 30

</extended_examples>

<error_handling>

Input Validation

The skill includes comprehensive input validation:

  • Ticker validation: Checks format, applies corrections (e.g., BRK.B → BRK-B, FB → META)
  • Year validation: Must be between 1970 and current year
  • Index validation: Must be one of: nasdaq100, sp100, dow30, sox
  • Top N validation: Must be positive integer ≤ 100

Network Retry Logic

Yahoo Finance API calls include automatic retry:

  • Up to 3 retry attempts
  • Exponential backoff (2s, 3s, 4.5s delays)
  • Clear error messages on failure

Data Quality Checks

  • Minimum data points required (5 rows)
  • NaN percentage threshold (max 10%)
  • Invalid price detection (non-positive values)
  • Automatic data cleaning with warnings

</error_handling>

Running Tests

cd skills/track-equity-cumulative-return/scripts/tests
python test_calculations.py

Test Coverage:

  1. Cumulative return formula - Validates calculation accuracy
  2. Cumulative return series - Validates time series generation
  3. Validators - Tests all input validation functions
  4. Golden cases - Structure validation of expected results

Golden Cases

Located in scripts/tests/golden_cases.json:

  • NVDA 2024 full year (expected: 170-190% return)
  • AMD 2024 full year (expected: -20% to -10% return)
  • S&P 500 2024 benchmark (expected: 20-28% return)

<data_governance>

Data Sources

SourceTypeCachingNotes
Yahoo FinancePrimary12-hour cacheFree, public API

Caching

  • Cache directory: scripts/cache/
  • Cache format: Parquet (efficient storage)
  • Cache validity: 12 hours
  • Clear cache: python fetch_price_data.py --clear-cache

Known Limitations

  1. Survivorship bias: Index components are current, not historical
  2. Price-only returns: Does not include dividends
  3. Yahoo Finance rate limits: Heavy usage may be throttled

</data_governance>

平台分布

Codex

36.59%
按下载量换算33

Claude

30.72%
按下载量换算28

Cursor

20.47%
按下载量换算19

Gemini CLI

9.06%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills