Documents

Financial Report Automator

Try it

Automated quarterly financial report generation with dividend-adjusted total return calculations. Use when generating stock performance reports, quarterly ea...

What it does

Generates quarterly stock performance reports with **dividend-adjusted total return**.

The skill document

Financial Report Automator

Generates quarterly stock performance reports with dividend-adjusted total return.

What It Does

  • Parses CSV price data (Yahoo Finance export format)
  • Computes price return (raw close) and total return (adjusted close with dividends)
  • Produces structured quarterly reports: start/end price, returns, high/low, avg volume, dividends paid

Key Fix (v1.0.1)

Previous versions used raw close for return calculations, which understated returns for dividend-paying stocks like AAPL. v1.0.1 introduces:

  1. Column name normalization — handles mixed-case CSV headers (Datedate)
  2. Adjusted close computation — backward-adjusts prices for dividends so total return reflects reinvested dividends
  3. Separate price_return vs total_return — both are reported for transparency
  4. Dividend trackingdividend column is optional; defaults to 0 if absent

Usage

As a Python module

from scripts.stock_analyzer import StockAnalyzer

analyzer = StockAnalyzer(data_path="finance/AAPL.csv")

# 30-day total return (dividend-adjusted)
print(analyzer.calculate_returns(30))

# 30-day price return only (no dividends)
print(analyzer.calculate_returns(30, use_adj=False))

# Full quarterly report
report = analyzer.generate_quarterly_report(quarter=2, year=2026)
print(report)

CLI

python3 scripts/stock_analyzer.py

CSV Format Expected

Date,Close,Volume,Open,High,Low
01/02/2026,$269.77,21755774,$272.05,$277.82,$269.11

Optional columns:

  • dividend — per-share dividend on ex-div date
  • adj_close — pre-computed adjusted close (overrides internal calculation)

Report Output

{
  "quarter": "Q2 2026",
  "start_date": "2026-04-01",
  "end_date": "2026-06-30",
  "start_price": 223.0,
  "end_price": 235.5,
  "price_return_pct": 5.61,
  "total_return_pct": 6.12,
  "dividends_per_share": 0.25,
  "highest_price": 240.0,
  "lowest_price": 218.5,
  "average_volume": 35000000
}

Requirements

  • Python 3.10+
  • pandas

Related skills

Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.

by Iván531 installs31 stars

Read and write Excel workbooks, worksheets, ranges, tables, and charts in OneDrive through Microsoft Graph with managed OAuth.

by byungkyu800 installs42 stars

Query and manage Linear issues, projects, teams, cycles, labels, and comments through a managed OAuth GraphQL endpoint.

by byungkyu518 installs18 stars

pptx

Official

Build new decks, edit existing slides, or extract text from .pptx and .potx files.

by Anthropic177.2k stars

openai-docs

Official

Get authoritative, current OpenAI developer docs with citations for building, model selection, and migration guidance.

by OpenAI27.5k stars

Three-stage co-authoring workflow that guides you from context gathering to reader-tested documentation.

by Anthropic177.2k stars

More from terrycarter1985

Browse all skills

Grade English homework for Chinese primary students in grades 3–6 with consistent, age-appropriate feedback.

by terrycarter198517 installs

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market c...

by terrycarter198524 installs

Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.

by terrycarter198519 installs

Generate reusable, policy-aligned customer service replies for e-commerce aftersales scenarios. Use when support staff need fast, compliant Chinese responses...

by terrycarter198518 installs

Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.

by terrycarter198516 installs

Comprehensive developer cheatsheets and quick references for Git, Docker, Kubernetes, jq, curl, and common Linux commands. Use when needing quick lookups for...

by terrycarter198516 installs