The seed script was incorrectly using the latest snapshot's market price as avg_price, resulting in inflated average costs. Now computes avg_price from actual total invested amounts per ticker. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Derive buy/sell transactions by comparing consecutive snapshots and replace existing portfolio on re-run instead of skipping.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>