Methodology
How we calculate returns and benchmark comparisons
Data Sources
All portfolio data is manually maintained in JSON files within this repository:
- entries.json - Weekly trading activity and contributions
- holdings.json - Current portfolio positions and market prices
- benchmarks.json - S&P 500 weekly closes and HISA rate
Return Calculations
Time-Weighted Return (TWR)
Measures portfolio performance independent of cash flows. Calculated by linking periodic returns, effectively showing how well the investment strategy performed.
Money-Weighted Return (IRR)
Internal Rate of Return considering the timing and size of cash flows. Calculated using Newton-Raphson method with bisection fallback.
Benchmark Calculations
HISA Benchmark (3% APY)
Each weekly deposit is treated as a cash flow into a High-Interest Savings Account earning 3% annually, compounded daily using a 365-day basis:
daily_rate = (1 + annual_rate)^(1/365) - 1
value = principal * (1 + daily_rate)^days
S&P 500 Dollar-Cost Averaging
Each weekly deposit is treated as purchasing S&P 500 index units at that week's closing level. The accumulated units are then marked to the latest index level.
Limitations
- Market prices may be delayed or approximated
- Historical price data may be incomplete
- Currency conversion not applied (CAD/USD mixed)
- No adjustment for dividends or distributions
- Benchmark data updated manually weekly
Reproducing Results
All calculations are implemented in /lib/math.ts
and can be independently verified. The complete data set and calculation logic are open source in this repository.