bama
BAMA: 모든 Mac 앱을 만들 수 있습니다
Research-desk tables, price charts and quarterly earnings reviews for your AI agent: Schwab, Morgan, Blackstone, IBKR and HSBC layouts (EN / Traditional Chinese). Claude Skills.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Research-desk tables, price charts, ETF holdings and quarterly earnings reviews for your AI agent.README 전문 보기 ↗Research-desk tables, price charts, ETF holdings and quarterly earnings reviews for your AI agent.
English · 繁體中文 · 日本語 · Français
Two agent skills in one repository, built for Claude Code and usable from Codex and other coding agents. schwab-performance-table turns a stock list, a brokerage holdings screenshot, price data or your own CSV into research-desk tables (Schwab, Morgan, Blackstone and IBKR layouts) , into price charts with drawdown and log scale, and into top-holdings charts for ETFs. quarterly-earnings-review checks a company's quarterly filing and produces an HSBC-style earnings table with source-backed commentary. Everything is rendered in English and Traditional Chinese, as PNG plus self-contained HTML.
The earnings examples use Apple's official filings and the ranking table a public Charles Schwab chart. Everything else uses fictional companies and synthetic data.
flowchart LR
A["📝 Tickers, screenshot, CSV<br/>or ticker + quarter"] --> B["🤖 Your AI agent + skills"]
B --> C["🏛 Prices: Nasdaq, SSE/SZSE,<br/>Yahoo (labelled), your CSV"]
B --> F["📑 Filings: Apple PDFs,<br/>SEC facts, your imports"]
C --> D["🖨 render_table<br/>render_chart<br/>render_holdings"]
F --> G["🖨 quarterly_earnings"]
D --> E["🖼 PNG + HTML<br/>EN · 繁體中文"]
G --> E
classDef n fill:#ACDCEC,stroke:#1B2A4A,color:#1B2A4A,stroke-width:1px;
class A,B,C,D,E,F,G n;
Works on macOS, Linux and Windows. You need Python 3.9+ (to render); git is optional. The installer registers both skills.
💡 Easiest way: paste the prompt below into your AI agent and it installs everything for you.
Paste this to Claude Code, Codex or any other coding agent:
Install the skills from https://github.com/imoneys10k/schwab-table for me.
Detect my operating system. On macOS or Linux, run:
curl -fsSL https://raw.githubusercontent.com/imoneys10k/schwab-table/main/install.sh | sh
On Windows, in PowerShell, run:
irm https://raw.githubusercontent.com/imoneys10k/schwab-table/main/install.ps1 | iex
If I use an agent other than Claude, install into that agent's skills folder instead
(macOS/Linux: add `--dir <path>` after `sh -s --`; Windows: save install.ps1 and run it with -Dir <path>).
When it finishes, confirm that "Render OK" was printed, then tell me to restart so the skills load.
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/imoneys10k/schwab-table/main/install.sh | sh
Windows (PowerShell):
irm https://raw.githubusercontent.com/imoneys10k/schwab-table/main/install.ps1 | iex
The installer puts the main skill in ~/.claude/skills/schwab-performance-table (%USERPROFILE%\.claude\skills\... on Windows), creates a private Python virtual environment inside it, installs the dependencies and Chromium (about 100 MB), registers quarterly-earnings-review beside it, and renders every table style, a chart and an earnings table as a smoke test. It prints Render OK when everything works. Restart your agent afterwards (Claude, Codex, ...) so the skills are picked up. To read a script before running it, open install.sh or install.ps1.
| Option (macOS / Linux) | Option (Windows) | Effect |
|---|---|---|
--dir PATH | -Dir PATH | Install somewhere else (for example another agent's skills folder). CLAUDE_SKILLS_DIR changes the default root. |
--ref TAG | -Ref TAG | Install a tag or branch instead of main, e.g. v0.6.1, to pin a version. Run the installer again without it to return to main. |
--skip-deps | -SkipDeps | Skip Python, Playwright and Chromium (only fetch and register the files). |
--uninstall | -Uninstall | Delete the installed skill folder and the earnings skill registered by it. |
When piping, pass options with sh -s --, for example curl -fsSL .../install.sh | sh -s -- --dir ~/my-skills/schwab. On Windows, save install.ps1 and run .\install.ps1 -Dir C:\path.
Update: run the same command again. Uninstall: run it with --uninstall (-Uninstall on Windows).
Troubleshooting: on Debian/Ubuntu install python3-venv first. On Linux, if Chromium fails to start, run sudo <install folder>/.venv/bin/python -m playwright install-deps chromium. On a minimal Linux server install a CJK font (sudo apt install fonts-noto-cjk), otherwise Chinese text renders as boxes.
Once installed, just ask in plain language, for example:
Four layouts, chosen with --style (or spec.style; the default is Schwab). They are independent templates, not reports issued by or affiliated with the named institutions.
| Style | What it shows | Example |
|---|---|---|
| Schwab · ranking | YTD plus rank in the S&P 500 and NASDAQ (mode A) | EN · 繁體中文 |
| Schwab · holdings | Open P/L %, today's P/L, average cost, shares, from a screenshot or export (mode B) | EN · 繁體中文 |
| Schwab · watchlist | Tickers only: YTD, 1-month, 1-year, last close (mode C) | EN · 繁體中文 |
| Morgan | Two periods × return, volatility and drawdown | EN · 繁體中文 |
| Blackstone | Industry or strategy groups, two return periods | EN · 繁體中文 |
| IBKR | Brokerage fields, market values, weights and supplied exposure | EN · 繁體中文 |
python3 render_table.py examples/watchlist_spec.json out/watchlist # Schwab (default)
python3 render_table.py examples/morgan_spec.json out/matrix # or --style morgan | blackstone | ibkr
python3 prices_to_table.py data/prices.json data/matrix.json --style morgan # build a matrix from fetched prices
python3 render_table.py data/matrix.json out/matrix
Each template has explicit column schemas; passing a five-column watchlist to a seven- or nine-column report does not invent missing facts. Schwab tables and charts keep light and dark modes; the other templates are calibrated for white paper. See the template guide for schemas, source samples and font substitutions. All four layouts can be animated with render_motion.py (rows fade in and numbers count up; GIF, MP4 or Live Photo).
Chart up to 9 symbols over any period (default: year to date) with a drawdown panel and a summary table.
| Layout | Content | Use for |
|---|---|---|
lines | Line chart, drawdown panel, summary table | 2–5 symbols |
multiples | One small chart per symbol on a shared scale, drawdown strip under each | 6–9 symbols |
layout: auto picks one by symbol count.
| Symbols | Source | Notes |
|---|---|---|
US stocks, ETFs, Nasdaq indexes (NVDA, BRK.B, SPY, COMP) | Nasdaq official closes | Split-adjusted price return, about 10 years of history |
Shanghai / Shenzhen (600519.SS, 000001.SZ) | Exchange websites | Unadjusted closes; Shenzhen history is limited |
Other exchanges and indexes (7203.T, 0700.HK, SAP.DE, ^N225) | Yahoo Finance | Clearly labelled as aggregated data; use the exchange suffix |
| Your own files | csv_to_prices.py | Any market; an adjusted-close CSV gives a labelled total-return chart |
--benchmark SPY,COMP), or --benchmark none.y_scale).--theme dark, --pdf, custom line colours, and hover tooltips in the HTML files.render_motion.py takes the same spec and draws the chart left to right, with the line-end labels, the table and the date counting along, as a GIF, a WebP (about a third smaller), an MP4 and an Apple Live Photo (a .jpg + .mov pair to AirDrop to an iPhone). The finished frame is the static chart; --canvas 3:4 or 9:16 fits it to Xiaohongshu, Instagram or Reels. Needs ffmpeg.python3 fetch_prices.py NVDA MU AAPL --start 2026-01-01 -o data/watch.json
python3 fetch_prices.py 7203.T 0700.HK SAP.DE 600519.SS --start 2026-08-01 --benchmark none -o data/global.json
python3 render_chart.py examples/chart_lines_spec.json out/chart
Chart an ETF's largest holdings (13 by default, --top N changes it) with weight, cumulative weight, sector and the total of everything else. The source is each fund's own issuer file, and the as-of date is always printed on the chart.
| Issuer | Funds | How it is fetched |
|---|---|---|
| State Street SPDR | SPY, XLK and other SPDR funds | Daily xlsx file |
| iShares | IVV, IWM, AGG and 12 more (verified product-id list) | latest-holdings.csv |
| Vanguard | VOO, VTI and other equity ETFs | JSON behind the fund page (published monthly, so it can be weeks old) |
| NEOS | QQQI | CSV behind the fund page |
| Roundhill | NCLD, DRAM | Daily CSV covering all Roundhill funds |
| Tema | DISK | Daily CSV linked from the fund page |
| Invesco, Destiny | QQQ, QQQM, DXYZ | Not fetched: their terms of use forbid automated access. Download from the fund page and import with --csv |
| Any other fund | a file you download | --csv with name, ticker and weight columns |
--mode lines ranks every line exactly as listed instead.--merge-classes.--csv). Terms were checked for Invesco, Destiny and SSGA only, so read the others' terms before commercial use.--top N, --by sector|name (for funds with thousands of lines, such as bond ETFs), --names names.json for local-language names, --theme dark, --pdf, --langs.render_motion.py takes the same holdings file and grows the bars one after another, with the weights and the cumulative column counting up, as a GIF, an MP4 or a Live Photo; the last frame is the static chart.python3 fetch_holdings.py QQQ NCLD -o data/ # data/QQQ_holdings.json, data/NCLD_holdings.json
python3 render_holdings.py data/QQQ_holdings.json out/qqq # top 13 by default
python3 render_holdings.py data/NCLD_holdings.json out/ncld --top 10 --merge-classes
python3 fetch_holdings.py MYETF --csv my_holdings.csv --name "My ETF" # any other fund
Ask “Review AAPL FY2025Q3 in an HSBC-style table.” The quarterly-earnings-review skill verifies the fiscal dates and the primary filing, computes single-quarter, year-over-year and quarter-over-quarter values, and adds commentary that cites its sources. Output is an English and Traditional Chinese PNG + HTML, plus the raw facts and an audit ledger.
--facts.python3 quarterly_earnings.py AAPL --period FY2025Q3 -o out/aapl_q3
Try the two-quarter demo · [Usage and source coverage](EARNINGS.md, in Traditional Chinese) · Skill
null is not zero. Missing data renders as NA; nothing is filled from memory or guessed.0700.HK); bare numeric codes are ambiguous and rejected.--csv). The tool never works around a block with browser automation.SKILL.md, SKILL.en.md: The skill Claude loads (Traditional Chinese) and its English translationskills/quarterly-earnings-review/: The earnings skill, registered beside the main skill by the installersinstall.sh, install.ps1, install_earnings_skill.py: One-click installers for macOS / Linux and Windows, and the earnings skill registrationrender_table.py, institutional_tables.py, prices_to_table.py: Table renderer and its four styles; builds Morgan / Blackstone specs from fetched pricesfetch_prices.py, csv_to_prices.py: Daily closes from Nasdaq, Shanghai/Shenzhen and Yahoo; conversion of your own CSV filesrender_chart.py, render_common.py: Chart renderer; shared themes and PNG / PDF outputrender_motion.py: Animated charts, tables and ETF holdings: GIF, WebP, MP4 and Apple Live Photo (needs ffmpeg; WebP also Pillow)fetch_holdings.py, render_holdings.py: ETF holdings from the issuer's own file (SPDR, iShares, Vanguard, NEOS, Roundhill, Tema, or your CSV) and the top-N rendererquarterly_earnings.py, earnings_core.py, earnings_sources.py, render_earnings.py: Earnings command, audited arithmetic, source adapters and the HSBC-style rendererlocalization.py, fonts.py, fonts/: Traditional Chinese conversion; bundled fonts embedded in the HTML (licences included)references/, EARNINGS.md: Template guide; earnings usage and source coverage (Traditional Chinese)examples/, docs/: Specs and rendered examples (sample_prices.json is synthetic); the GitHub Pages sitetests/, evals/: Unit tests; realistic agent requests, a trigger-test set and resultstools/build_docs.py: Generates these READMEs and the website from one content tablerequirements.txt, CHANGELOG.md, CONTRIBUTING.md, assets/: Dependencies, history, contribution rules, banner and social cardIf you used the installer, the scripts switch to the private virtual environment automatically, so plain python3 render_table.py ... works. Otherwise Python 3.9+ is required:
pip install -r requirements.txt && playwright install chromium
python3 render_table.py examples/neural9_spec.json out/neural9
python3 render_table.py examples/morgan_spec.json out/matrix
python3 fetch_prices.py NVDA MU AAPL --start 2026-01-01 -o data/watch.json
python3 render_chart.py examples/chart_lines_spec.json out/chart --theme dark --pdf
python3 fetch_holdings.py QQQ -o data/ && python3 render_holdings.py data/QQQ_holdings.json out/qqq
python3 csv_to_prices.py 0700.HK=tencent.csv --benchmark HSI=hsi.csv -o data/hk.json
python3 quarterly_earnings.py AAPL --period FY2025Q3 -o out/aapl_q3
Options for both renderers: --langs en renders only the listed languages (comma-separated, zh is Traditional Chinese and the _zh file names are kept), --no-png writes HTML only and needs no browser, --scale 3 raises the PNG resolution (default 2, which gives 1520 px wide), --theme dark and --pdf. Missing output folders are created.
fetch_prices.py caches responses for up to 12 hours (--refresh bypasses the cache) and reuses a cache only if it already has the newest expected close. If the network fails it falls back to the last cache with a warning. index:COMP / etf:SPY force the asset class when a code is ambiguous. Charts take two steps: fetch, then render; pass --start / --end for a period.
Fonts: Inter, Source Sans 3 and Droid Sans are bundled and embedded for Latin text; Chinese text uses the system Traditional Chinese font. Source-font substitutions are documented in the template guide. Proprietary fonts from reference PDFs or macOS are not distributed.
python3 -m unittest discover -s tests -v runs known-answer tests for returns, drawdown, volatility, symbol routing, cache freshness, CSV import, ETF holdings parsers and ranking rules, table styles and earnings arithmetic. CI runs them on Ubuntu, macOS and Windows (Python 3.9 and 3.13), regenerates the examples to check they are unchanged, runs a live Nasdaq smoke test, and installs the skills on all three systems. A weekly workflow fetches one real fund per ETF issuer and checks the result, so a changed issuer page is noticed early. evals/ holds realistic agent requests and the first results. The READMEs and the website are generated by python3 tools/build_docs.py, and a test fails if they are out of date.
This project formats data and does not provide investment advice. Examples use fictional companies and synthetic values unless the gallery note says otherwise. The report layouts are independent templates, not reports issued by the named institutions.