All scenario calculations use transaction records from Fidelity activity CSVs. Four scenario modes are available:
- Undo Trades — removes selected buy/sell(s) and recomputes cost basis, value, and return as if they never happened.
- Modify Trades — lets you change the price or quantity of a transaction and see the dollar and return impact.
- Hypothetical Trade — simulates buying or selling a given dollar amount on any date and computes holding period return and CAGR.
- Frozen Portfolio — compares active trading (Time-Weighted Return) against a buy-and-hold baseline frozen at the start of the year.
Total Return
R = (End Value − Cost Basis) / Cost Basis × 100
End Value = current market value of remaining shares + total proceeds from any sales. Cost Basis = sum of all buy amounts. For undo/modify scenarios, both actual and what-if are computed independently using their respective transaction sets.
Replicate in Excel =(current_value + sell_proceeds - total_cost) / total_cost
CAGR
CAGR = (1 + R/100)1/years − 1
Compound Annual Growth Rate annualizes the total return over the holding period. Holding period = days from first buy to today (or last sell). Requires at least ~36 days to be meaningful.
Replicate in Excel =(1 + total_return)^(1 / (days/365.25)) - 1
Frozen Portfolio (TWR)
TWR = Π (1 + rt) − 1
The actual portfolio return uses Time-Weighted Return — daily price returns chained together using the previous day's holdings as weights. This strips out the effect of capital additions so the comparison reflects pure investment skill. The frozen portfolio uses a simple price return on holdings as they stood at the start of the year.
Replicate in Excel C[t] = C[t-1] × (1 + daily_return), then TWR = C[final] - 1.
Hypothetical Trade
Shares = $ Amount / Entry Price
Simulates buying a fixed dollar amount at the closing price on the selected date. If a sell date is chosen, it computes the exit P&L. If still holding, current market price is used. All prices from Polygon.io adjusted closing prices.
Replicate in Excel =(shares * current_price - shares * entry_price) / (shares * entry_price)
Data Sources
| Transaction Data | Fidelity activity CSVs (buys, sells, dividend reinvestments, transfers) |
| Price Data | Polygon.io daily closing prices (adjusted for splits and dividends) |
| CAGR Denominator | 365.25 days per year (accounts for leap years) |
| TWR Method | Snapshot-based: previous day's holdings used as weights each day |