track-equity-cumulative-return

track-equity-cumulative-return is a skill for Claude Code, Codex from fatfingererr/macro-skills. It costs 40 tokens per session (3,753 once invoked), scanned A, original, MIT.

A stock and index performance tracker that compares cumulative returns with the S&P 500, a broad measure of the US stock market. It can compare several tickers and rank index constituents.

In plain words
What is it for?
Calculate returns for a year or from a year to today, compare multiple stocks, rank the top index components, and visualize performance against the S&P 500.
Why use it?
It provides one consistent benchmark and a common starting point, making it easier to see whether an investment outperformed or lagged the wider US market.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Calculate returns for a year or from a year to today, compare multiple stocks, rank the top index components, and visualize performance against the S&P 500.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fatfingererr/macro-skills/track-equity-cumulative-return
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fatfingererr/macro-skills --skill track-equity-cumulative-return
Clone the repo
git clone --depth 1 https://github.com/fatfingererr/macro-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin track-equity-cumulative-return/plugin install track-equity-cumulative-return after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for track-equity-cumulative-return

README.md
[![agentmods](https://agentmods.dev/badge/skills/fatfingererr/macro-skills/track-equity-cumulative-return/github.svg)](https://agentmods.dev/skills/fatfingererr/macro-skills/track-equity-cumulative-return)
Your own site
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/track-equity-cumulative-return"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/track-equity-cumulative-return/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for track-equity-cumulative-return

Your own site · 80×15
<a href="https://agentmods.dev/skills/fatfingererr/macro-skills/track-equity-cumulative-return"><img src="https://agentmods.dev/badge/skills/fatfingererr/macro-skills/track-equity-cumulative-return.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,753 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.03753
Opus 5 $0.00020 $0.01877
Sonnet 5 $0.00008 $0.00751
Haiku 4.5 $0.00004 $0.00375

Measured 11d ago against content hash 3793743cde5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

track-equity-cumulative-return scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/cumulative_return_analyzer.py, scripts/fetch_price_data.py, scripts/index_component_analyzer.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/track-equity-cumulative-return/SKILL.md · 439 lines

How it starts

The opening of the file, as written. The whole thing — 439 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<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:

Scenario Mode Description Example
1.a Stock(s), Year Only Analyze specific tickers for a single full year NVDA, AMD in 2024 only
1.b Stock(s), Year to Today Analyze specific tickers from a year to today NVDA, AMD from 2022 to today
2.a Index Top N, Year Only Rank index components for a single full year Nasdaq 100 Top N in 2024 only
2.b Index Top N, Year to Today Rank index components from a year to today Nasdaq 100 Top N from 2022 to today

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

Index Code Name Components
nasdaq100 Nasdaq 100 Index ~100
sp100 S&P 100 Index 100
dow30 Dow Jones 30 Index 30
sox Philadelphia Semiconductor Index 30

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
  }
}

Read the full file on GitHub · 439 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 439 lines · 40 tokens per session scan A 3793743cde5a

Subscribe to this mod's changes

track-equity-cumulative-return is a skill published in the GitHub repository fatfingererr/macro-skills (3 stars, last pushed 7mo ago), licensed MIT. It adds 40 tokens to every session and 3,753 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens