智能体工作流

tax-loss-harvesting

joellewis/finance_skills

Execute a complete tax-loss harvesting workflow from candidate identification through post-harvest monitoring. Use when the user asks about finding TLH candidates, gain/loss budgeting, replacement security selection, wash-sale compliance, or harvest execution planning. Also trigger when users mention 'unrealized losses in my portfolio', 'swap ETFs for tax purposes', 'harvest losses before year-end', 'substantially identical security', 'wash-sale window', 'NIIT offset', 'loss carryforward', or ask how much tax they can save by harvesting.

  • 691 次安装
  • 218 星标
  • 收录于

安装命令

npx skills add https://github.com/joellewis/finance_skills --skill tax-loss-harvesting

SKILL.md

Tax-Loss Harvesting

Core Concepts

Candidate Identification

Scan the portfolio for positions with unrealized losses that meet all three filters:

  • Materiality threshold: Minimum absolute loss (e.g., $2,000) or minimum loss-to-value ratio (e.g., loss exceeds 5% of position market value). Harvesting a $200 loss on a $50,000 portfolio is not worth the operational cost.
  • Holding period filter: Positions held less than 31 days may not have meaningful losses and create short-term wash-sale complexity. Positions approaching the one-year mark (days 335-365) may benefit from waiting to convert a short-term loss into a long-term loss only if the position is expected to continue declining.
  • Loss magnitude ranking: Rank candidates by Tax Benefit = Unrealized Loss * Applicable Tax Rate. Prioritize short-term losses (taxed at ordinary rates up to 37%) over long-term losses (taxed at capital gains rates of 15-20%) when gain/loss budget allows.

Gain/Loss Budgeting

Before harvesting, build the year-to-date tax budget:

  1. Realized gains YTD: Sum all short-term and long-term capital gains already realized (including fund distributions).
  2. Planned gain exposure: Estimate gains from pending rebalancing trades, planned liquidations, or expected fund capital gain distributions.
  3. Loss carryforward balance: Check prior-year unused capital loss carryforwards (these offset gains before new harvests do).
  4. Target harvest amount: Target Harvest = (Realized Gains YTD + Planned Gains) - Loss Carryforward + $3,000 ordinary income offset. Harvesting this amount offsets all expected gains AND captures the full $3,000 annual deduction against ordinary income; harvest more to build carryforward for future years.