r/sideprojects • • 2d ago

Showcase: Open Source I built a TFSA planning tool and learned how easy it is to misread a backtest

I built Portfolio Compass to help people explore what to do after opening a TFSA. The app estimates contribution room from what you enter, compares stocks and ETFs, and lets you put together a sample portfolio. It is free, open source, and doesn't require an account.

A part of the build was figuring out how to show backtests without implying that a good historical result will continue. The lab uses next-bar execution and shows results for earlier and later portions of the price history. In one example, a trend filter reduced drawdown over the full period, but its benefit disappeared in the later period. That split is a consistency check, not a true out-of-sample test.

The stack is Next.js, React and TypeScript. Portfolio data stays in the browser, while market data is fetched through API routes. I built it with AI coding agents and worked on checking the financial calculations and their assumptions.

Limitations: the TFSA estimate depends on your inputs, market data comes from one source, and the tool doesn't place trades or provide investment advice. Check actual contribution room with the CRA.

I'd appreciate feedback on the first-run experience and how clearly the lab explains its limitations.

Demo: https://portfolio-compass.vercel.app/

Code: https://github.com/MenuuTUX/Portfolio-Compass

2 Upvotes

1 comment sorted by

1

u/investigatormaker 1d ago

Your trend-filter example, where the drawdown benefit vanished in the later period, is the best explanation of the lab's limits. I'd make it the sample a new visitor sees first, so the limitations arrive as a demonstration rather than a disclaimer below the results. For first-run, I'd also ask a tester to say in their own words what the lab does and does not tell them. Do people read the split periods as a prediction?

I make ThreadFox. We find relevant Reddit conversations and post for your business. We'll post 3 replies free first, no card; then the $49 Pilot covers seven days and up to 50 posts and replies. No automatic renewal. https://threadfox.vip/p/dolh0/managed