Stock Analysis Report Generator
Generates professional reports with comprehensive stock analysis including trend analysis, PMCC viability, and fundamental metrics. Supports both PDF and markdown output formats.
Instructions
Step 1: Gather Data
Run the report script for each symbol:
uv run python scripts/report.py SYMBOL
The script returns detailed JSON with:
recommendation - Overall recommendation with strengths/risks
company - Company info (name, sector, industry, market cap)
trend_analysis - Bullish scanner results (score, RSI, MACD, ADX, SMAs)
pmcc_analysis - PMCC viability (score, LEAPS/short details, metrics)
fundamentals - Valuation, profitability, dividend, balance sheet, earnings history
piotroski - F-Score breakdown with all 9 criteria
spread_strategies - Option spread analysis (vertical spreads, straddle, strangle, iron condor)
Step 2: Generate Report
Step 2a — Write markdown
Read templates/markdown-template.md for formatting instructions. Generate a markdown report from the JSON data and save to sandbox/ as:
sandbox/{SYMBOL}_Analysis_Report_{YYYY-MM-DD}_{HHmm}.md
Step 2b — Convert to PDF (if requested)
Invoke the markdown-to-pdf skill on the markdown file just created:
uv run python .claude/skills/markdown-to-pdf/scripts/markdown_to_pdf.py sandbox/{SYMBOL}_Analysis_Report_{YYYY-MM-DD}_{HHmm}.md
The PDF is written alongside the markdown file with the same basename.
Step 3: Report Results
After generating the report, tell the user:
- The recommendation (BUY/HOLD/AVOID)
- Key strengths and risks
- The report file path
Example
# Single symbol
uv run python scripts/report.py AAPL
# Multiple symbols - run separately
uv run python scripts/report.py AAPL
uv run python scripts/report.py MSFT
Report Contents
All sections defined in templates/markdown-template.md:
- Header — symbol, company name, generated timestamp
- Recommendation — BUY/HOLD/AVOID with strengths and risks
- Company Overview — sector, industry, market cap, beta
- Trend Analysis — bullish score, RSI, MACD, ADX, SMA distances, earnings date, signals list
- Fundamental Analysis — valuation (P/E, P/B, EPS), profitability (margins, ROE, ROA, growth), dividend & balance sheet, earnings history (up to 8 quarters)
- Piotroski F-Score — all 9 criteria with PASS/FAIL
- Insider Trading — net sentiment, buy/sell counts, recent transactions (omitted if no data)
- PMCC Viability — score, IV, LEAPS/short leg details, trade metrics (yield, capital required)
- Option Spread Strategies — bull call, bear put, straddle, strangle, iron condor
- Investment Summary — strengths and risk factors
- Disclaimer footer
Dependencies
This skill aggregates data from:
scanner-bullish for trend analysis
scanner-pmcc for PMCC viability
fundamentals for financial data and Piotroski score
Timezone
All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.
1---2name: report-stock3description: Generate comprehensive stock analysis report (PDF or markdown) with trend, PMCC, and fundamental analysis4---56# Stock Analysis Report Generator78Generates professional reports with comprehensive stock analysis including trend analysis, PMCC viability, and fundamental metrics. Supports both PDF and markdown output formats.910## Instructions1112### Step 1: Gather Data1314Run the report script for each symbol:1516```bash17uv run python scripts/report.py SYMBOL18```1920The script returns detailed JSON with:21- `recommendation` - Overall recommendation with strengths/risks22- `company` - Company info (name, sector, industry, market cap)23- `trend_analysis` - Bullish scanner results (score, RSI, MACD, ADX, SMAs)24- `pmcc_analysis` - PMCC viability (score, LEAPS/short details, metrics)25- `fundamentals` - Valuation, profitability, dividend, balance sheet, earnings history26- `piotroski` - F-Score breakdown with all 9 criteria27- `spread_strategies` - Option spread analysis (vertical spreads, straddle, strangle, iron condor)2829### Step 2: Generate Report3031**Step 2a — Write markdown**3233Read `templates/markdown-template.md` for formatting instructions. Generate a markdown report from the JSON data and save to `sandbox/` as:34```35sandbox/{SYMBOL}_Analysis_Report_{YYYY-MM-DD}_{HHmm}.md36```3738**Step 2b — Convert to PDF (if requested)**3940Invoke the `markdown-to-pdf` skill on the markdown file just created:41```bash42uv run python .claude/skills/markdown-to-pdf/scripts/markdown_to_pdf.py sandbox/{SYMBOL}_Analysis_Report_{YYYY-MM-DD}_{HHmm}.md43```44The PDF is written alongside the markdown file with the same basename.4546### Step 3: Report Results4748After generating the report, tell the user:491. The recommendation (BUY/HOLD/AVOID)502. Key strengths and risks513. The report file path5253## Example5455```bash56# Single symbol57uv run python scripts/report.py AAPL5859# Multiple symbols - run separately60uv run python scripts/report.py AAPL61uv run python scripts/report.py MSFT62```6364## Report Contents6566All sections defined in `templates/markdown-template.md`:67681. **Header** — symbol, company name, generated timestamp692. **Recommendation** — BUY/HOLD/AVOID with strengths and risks703. **Company Overview** — sector, industry, market cap, beta714. **Trend Analysis** — bullish score, RSI, MACD, ADX, SMA distances, earnings date, signals list725. **Fundamental Analysis** — valuation (P/E, P/B, EPS), profitability (margins, ROE, ROA, growth), dividend & balance sheet, earnings history (up to 8 quarters)736. **Piotroski F-Score** — all 9 criteria with PASS/FAIL747. **Insider Trading** — net sentiment, buy/sell counts, recent transactions (omitted if no data)758. **PMCC Viability** — score, IV, LEAPS/short leg details, trade metrics (yield, capital required)769. **Option Spread Strategies** — bull call, bear put, straddle, strangle, iron condor7710. **Investment Summary** — strengths and risk factors7811. **Disclaimer footer**7980## Dependencies8182This skill aggregates data from:83- `scanner-bullish` for trend analysis84- `scanner-pmcc` for PMCC viability85- `fundamentals` for financial data and Piotroski score868788## Timezone8990All timestamps and time-based calculations must use the `America/New_York` timezone. All JSON output must include `generated_at` (NY time string) and `data_delay` fields.