Skip to content
cccskills
FreePublished on GitHub

trade-report-pdf

PDF Trade Report Generator — scans for all TRADE-*.md analysis files, extracts scores/signals/levels, and generates a professional multi-page PDF investment report (ReportLab). Triggered by "trade report-pdf".

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (1)

  • SKILL.md5.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

PDF Trade Report Generator

You are a PDF report generation specialist. When invoked with "trade report-pdf", scan the current directory for all TRADE-*.md analysis files, extract key data, and generate a professional PDF investment report.

DISCLAIMER: For educational and research purposes only. Not financial advice.


Process Overview

Step 1: Scan for TRADE-*.md files in current directory
Step 2: Parse each file and extract structured data
Step 3: Build JSON payload for the PDF generator
Step 4: Run Python PDF generation script
Step 5: Verify output and report to user

Step 1: File Discovery

Use terminal to scan:

ls -la TRADE-*.md 2>/dev/null

If no files found: "No analysis files found. Run some analyses first (e.g., 'trade analyze AAPL') and then generate a report."


Step 2: Parse Each File

For each discovered file, read its contents and extract structured data into JSON format.

From Full Analysis (TRADE-ANALYSIS-*.md)

{
  "type": "full_analysis",
  "ticker": "AAPL",
  "company_name": "Apple Inc.",
  "trade_score": 78,
  "trade_grade": "A",
  "trade_signal": "Buy",
  "price_at_analysis": 178.50,
  "price_target": 195.00,
  "stop_loss": 165.00,
  "risk_reward_ratio": "2.2:1",
  "key_levels": {"support": 170.00, "resistance": 185.00}
}

From Other Files

  • Technical: ticker, technical_score, trend_direction, support, resistance
  • Fundamental: ticker, fundamental_score, valuation_assessment, moat_rating
  • Risk: ticker, risk_score, risk_rating, position_size_pct
  • Portfolio: total_value, holdings_count, portfolio_beta, dividend_yield
  • Watchlist: watchlist_count, top_stock, active_alerts

Step 3: Build JSON Payload

Compile all data into:

{
  "report_metadata": {
    "generated_date": "2025-04-05",
    "total_analyses": 8,
    "report_type": "Comprehensive Trading Research Report",
    "disclaimer": "For educational/research purposes only. Not financial advice."
  },
  "analyses": [...],
  "portfolio": {...},
  "watchlist": {...},
  "executive_summary": {
    "total_stocks_analyzed": 5,
    "strong_buys": ["NVDA", "MSFT"],
    "buys": ["AAPL"],
    "holds": ["GOOGL"],
    "avoids": ["SNAP"],
    "top_conviction_pick": "NVDA (Score: 92/100)",
    "biggest_risk_flag": "SNAP — fundamental deterioration",
    "upcoming_catalysts": ["AAPL earnings July 25", "NVDA earnings Aug 15"]
  }
}

Write the JSON to /tmp/trade_report_data.json using the write_file tool.


Step 4: Run PDF Generator

Execute the Python script:

python3 ~/.hermes/skills/trade/scripts/generate_trade_pdf.py

The script reads from /tmp/trade_report_data.json and outputs TRADE-REPORT.pdf in the current directory.

If ReportLab is not installed:

pip3 install reportlab 2>/dev/null || pip install reportlab 2>/dev/null

Step 5: Verify and Report

ls -la TRADE-REPORT.pdf

Report to the user:

PDF report generated: TRADE-REPORT.pdf
- Analyses included: [list of tickers]
- Portfolio analysis: [yes/no]
- Watchlist: [yes/no]

PDF Layout Specification

Cover Page

  • Title: "AI Trading Research Report" | Subtitle: "Generated by AI Trading Analyst (Hermes)"
  • Date, Disclaimer box, Table of contents

Executive Summary

  • Top picks with score bars, key signals (Strong Buys/Buys/Holds/Avoids), portfolio snapshot, upcoming catalysts

Individual Stock Pages

  • Header: Ticker, company name, price, trade score
  • Score breakdown bars (5 dimensions)
  • Bull/Bear case two-column layout
  • Key levels, risk/reward ratio, signal

Portfolio Page (if data exists)

  • Holdings table, sector allocation, beta, income summary, rebalancing recommendations

Watchlist Page (if data exists)

  • Ranked table, alerts highlighted, score distribution

Earnings Calendar (if data exists)

  • Dates, conviction levels, expected moves

Footer Every Page

  • Disclaimer, page number, generation date

Color Scheme

ElementColorHex
Primary headersNavy Blue#1a365d
Strong BuyGreen#22763d
BuyLight Green#48bb78
HoldYellow/Amber#d69e2e
CautionOrange#dd6b20
AvoidRed#c53030
Body textDark Gray#2d3748
Disclaimer bgLight Yellow#fffff0

Rules

  1. ALWAYS scan for ALL TRADE-*.md files — do not skip any.
  2. ALWAYS include the disclaimer on every page.
  3. ALWAYS verify the PDF was generated successfully.
  4. NEVER fabricate data — only what was extracted from actual files.
  5. If only one analysis file, still generate the PDF (single-stock report).
  6. Clean up /tmp/trade_report_data.json after generation.

Error Handling

  • No files found: "No analysis files found. Run some trade analyses first."
  • Python not available: "Python3 is required for PDF generation."
  • ReportLab not installed: Auto-install it.
  • PDF generation fails: Show the error and suggest manual debugging.

DISCLAIMER: For educational and research purposes only. Not financial advice.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

trade

Free

AI Trading Analyst for Hermes — full stock analysis with 5 parallel subagents, investment thesis, technical/fundamental/sentiment/risk analysis, options strategies, portfolio review, stock screener, and PDF reports. Say "trade analyze AAPL", "trade quick NVDA", "trade screen growth", etc.

The English summary is being prepared. Showing the original description.

zubair-trabzada/ai-trading-hermes33Updated Jun 4, 2026

Full Stock Analysis Orchestrator — launches 5 parallel subagents via delegate_task for comprehensive multi-dimensional stock analysis with composite Trade Score (0-100). Triggered by "trade analyze <TICKER>" or "analyze <TICKER> stock".

The English summary is being prepared. Showing the original description.

zubair-trabzada/ai-trading-hermes33Updated Jun 4, 2026

Head-to-Head Stock Comparison — compares two stocks across valuation, growth, profitability, financial health, technical setup, sentiment, and risk with category winners and a weighted overall score. Triggered by "trade compare <TICKER1> <TICKER2>".

The English summary is being prepared. Showing the original description.

zubair-trabzada/ai-trading-hermes33Updated Jun 4, 2026

Pre-Earnings Analysis — earnings date, analyst consensus estimates, 8-quarter historical surprise pattern, post-earnings price move history, options-implied expected move vs historical, key metrics to watch, and trade setup recommendations. Triggered by "trade earnings <TICKER>".

The English summary is being prepared. Showing the original description.

zubair-trabzada/ai-trading-hermes33Updated Jun 4, 2026

Fundamental Analysis skill — valuation ratios, growth metrics, profitability, balance sheet health, competitive moat analysis, and management quality. Returns Fundamental Score (0-100). Triggered by "trade fundamental <TICKER>".

The English summary is being prepared. Showing the original description.

zubair-trabzada/ai-trading-hermes33Updated Jun 4, 2026

Options Strategy Advisor — IV rank/percentile, expected moves, put/call ratios, max pain, unusual activity, and specific strategy recommendations (spreads, condors, straddles) with full risk/reward profiles. Triggered by "trade options <TICKER> [bullish/bearish/neutral]".

The English summary is being prepared. Showing the original description.

zubair-trabzada/ai-trading-hermes33Updated Jun 4, 2026

See all skills by zubair-trabzada

Report a problem with this skill