计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
clarion-portfolio-monitor【效率与协作】Fetch live portfolio positions, balances, and daily transactions from TastyTrade. Outputs a structured JSON snapshot and a human-readable summary to ~/clarion/portfolio/. Use when the user asks for portfolio status, net liquidation value (NLV), position P/L, daily fills, or needs current holdings for the investor letter or thesis monitoring. Requires…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Fetches live portfolio data from TastyTrade (balances, positions, P/L, daily transactions) Stores every snapshot in DuckDB for auditable performance history (cost basis, mark price, NLV per position per day) Integration points: Portfolio Manager (live data + cost basis), LP Voice (performance claims for investor letter)
Runs as a on-demand script — no network exposure, no persistent MCP server. Reads credentials from Zo secrets, authenticates with a refresh token (never expires), and writes a timestamped snapshot.
| File | Format | Purpose |
|---|---|---|
~/clarion/portfolio/YYYY-MM-DD.json | JSON, full raw data | Machine-readable, ingested by investor letter tooling |
~/clarion/portfolio/YYYY-MM-DD.md | Markdown summary | Human-readable, surfaced in chat |
~/clarion/portfolio/latest.json | Symlink to today's JSON | Quick "what's current" access |
TASTYTRADE_CLIENT_SECRET — the OAuth app client secretTASTYTRADE_REFRESH_TOKEN — the generated refresh tokenRefresh tokens never expire. One-time setup.
python /home/workspace/Skills/clarion-portfolio-monitor/scripts/fetch.py
Options:
--json-only — skip markdown summary, produce only JSON--account N — specify account number (auto-detects if omitted)--no-history — skip NLV history fetch (faster)scripts/trade-ledger.py maintains a transactions table in
~/clarion/portfolio/portfolio.duckdb, backfilled from TastyTrade full account
history and upserted idempotently by transaction ID. It derives per-symbol cost
basis and realized P/L from fills via FIFO lot replay, and reconciles against
the broker snapshot and thesis YAML.
python trade-ledger.py sync [--days N] [--full] # fetch + upsert transactions
python trade-ledger.py positions # derived positions from ledger
python trade-ledger.py lots [--markdown] [--json] # open lots per position
python trade-ledger.py verify # ledger vs broker vs thesis YAML
python trade-ledger.py realized # realized P/L by symbol
--full) backfills from CLARION_LEDGER_INCEPTION
(env var, ISO date, default 2000-01-01 — set it to your account's
inception to keep backfills fast). Subsequent syncs default to the last 7 days.fetch.py automatically appends open-lot detail to the markdown summary
when the ledger is available; it degrades gracefully when it isn't.fetch.py. verify and positions
are offline (no API call).For daily snapshots, create a Zo Automation:
FREQ=DAILY;BYHOUR=17;BYMINUTE=30 (after market close Eastern)Run python /home/workspace/Skills/clarion-portfolio-monitor/scripts/fetch.py and report any positions with >5% daily move.clarion-living-letter-update): reads ~/clarion/portfolio/latest.json for the "What We Did" section and NLV contextclarion-thesis-monitor): compares live positions against active theses to detect thesis driftclarion-regime-check): not directly integrated — portfolio data is downstream of regime decisions