Portfolio Pro: Investment Portfolio & Trading Analysis Tool
· Apps
Track stock positions with real-time prices, detailed trade metadata, equity curves, AI-powered insights via Gemini, CSV import/export, and LIFO cost basis accounting.
A comprehensive investment portfolio management platform for tracking stock positions with real-time prices, detailed trade history, equity curves, AI-powered insights, and professional cost basis accounting.
Core Features
- Position Tracking — Track long and short positions with full metadata
- Real-Time Prices — Live price updates from market data
- Trade History — Detailed buy/sell log with fees and taxes
- Equity Curves — Visual performance over time
- AI Insights — Gemini-powered analysis
- CSV Import/Export — Compatible with brokerage exports
- LIFO Accounting — Last-in-first-out cost basis
How to Use
- Create positions manually or import from CSV
- Add trades with dates, prices, quantities, fees
- View real-time portfolio value
- Analyze equity curves and performance
- Get AI-powered insights
- Export reports for tax season
Cost Basis Methods
- LIFO — Last in, first out (default)
- FIFO — First in, first out
- Specific Lot — Identify specific shares
- Average Cost — Weighted average
AI Features
Powered by Gemini, the AI provides:
- Portfolio health analysis
- Risk diversification suggestions
- Sector concentration warnings
- Performance attribution
- Tax-loss harvesting opportunities
Technology Stack
- React + TypeScript frontend
- Gemini API for AI insights
- Polygon.io for market data
Why Build Another Portfolio Tracker
Broker statements tell you what you hold. They rarely tell you how you got there, what each decision cost, or whether the strategy is working. Portfolio Pro was built around the trade rather than the position: every buy and sell is a record with its own date, price, quantity, commission, and note, and the position is simply the derived result of those trades. That inversion is what makes proper cost basis accounting, realised-versus-unrealised splits, and honest performance attribution possible.
Cost Basis Accounting in Practice
Cost basis is not a cosmetic setting; it changes reported gains materially. Under LIFO, a sale is matched against the most recently acquired lots, which in a rising market typically realises a smaller gain than FIFO because the newest shares cost the most. FIFO matches the oldest lots first and tends to surface long-held, low-basis shares — often a larger taxable gain, but potentially at long-term rates. Specific lot identification gives the most control and is what most tax-loss harvesting depends on, while average cost simplifies reporting at the price of losing lot-level detail.
The app maintains a full lot ledger per symbol, so switching methods recalculates every closed trade from the underlying lots rather than adjusting a summary figure. Fees are capitalised into basis on purchase and deducted from proceeds on sale, which is what makes the realised gain figure match a broker year-end statement instead of drifting from it.
Equity Curves and Performance Measurement
The equity curve is rebuilt each day from holdings valued at close plus cash, and deposits and withdrawals are handled as external flows so they do not appear as performance. Time-weighted return measures how the strategy performed independent of when money was added, while money-weighted return reflects the actual investor experience. Both are shown, because they diverge sharply for anyone who adds capital during a drawdown, and only reporting one of them tells half the story.
How the AI Layer Is Used
The Gemini integration is deliberately narrow. It receives an anonymised summary — sector weights, concentration ratios, realised and unrealised positions, drawdown statistics — and returns commentary on diversification, concentration risk, and candidate tax-loss harvesting pairs. It does not receive account identifiers, and it is not asked to predict prices or issue buy and sell calls. Treat its output as a structured second read on the portfolio, not as advice.
Data Sources and Caveats
A worked lot-accounting example
Suppose you buy 10 shares at $100 and later buy another 10 at $120, with no fees in this simplified example. You then sell 10 shares at $130. Total proceeds are $1,300, but the realised gain depends on which lot is matched.
| Analytical method | Matched cost | Realised gain | Remaining lot cost |
|---|---|---|---|
| FIFO | $1,000 | $300 | $1,200 |
| LIFO | $1,200 | $100 | $1,000 |
The combined economic position has not changed just because the method changed. At a remaining share price of $130, FIFO leaves a $100 unrealised gain and LIFO leaves $300; realised plus unrealised gain is $400 either way. Fees, currency movements and corporate actions add further reconciliation requirements in real portfolios.
Tax treatment is jurisdiction-specific. The app's analytical method is not a free choice of tax method for every investor. Local rules may require pooling, matching rules or timely lot identification. Confirm the permitted treatment with a qualified local adviser and your broker before using an export in a tax return. The discussion of longer holding periods and tax-loss harvesting is not universally applicable.
Reconcile an import before relying on performance
Start with one account and a small date range. Match opening cash, holdings and a handful of trades to broker records. Check whether commissions are already included in exported trade amounts so they are not deducted again. Preserve trade IDs where available to identify repeated imports and duplicates.
Check splits, dividends, transfers and cash deposits separately from ordinary purchases and sales. A two-for-one split doubles shares and halves per-share basis without creating a trading gain by itself. A deposit increases account value without being investment profit. If those events are missing, both the equity curve and the gain report can look plausible while being wrong.
Price freshness also matters. A stale quote may understate a volatile position's current risk. Check the timestamp and whether the price is delayed, then distinguish traded positions from securities without a usable current quote.
Turn AI commentary into questions, not trading instructions
Treat a concentration warning as a prompt to inspect your exposures, investment mandate and liquidity needs. Correlated funds can create overlapping risk even when their names differ. A proposed tax-loss pairing also needs local tax-rule checks, instrument eligibility and consideration of transaction costs; an automated suggestion is not clearance to trade.
Keep an independent copy of broker statements and compare year-end outputs with those records. If reconciliation differences remain unexplained, do not submit the app's numbers as authoritative tax figures. For reporting focused on auditability rather than market predictions, see financial analytics services.
- Prices come from Polygon.io; delayed data applies on lower tiers
- Corporate actions such as splits and spin-offs need a manual adjustment entry
- Multi-currency holdings are tracked in the account base currency at trade-date rates
- Nothing here is investment or tax advice — confirm realised gain figures with your accountant before filing
Related: Basecamp Task Manager, SaaS financial model template and 13-week cash flow forecast template. Need a custom investment or finance tool? Get in touch.