▶ Full Post Text
**TLDR: Most portfolio trackers are "Black Boxes" that hide the math and sell your data. I used Claude (AI) to build a local, fully automated Python + Excel system that calculates institutional metrics like Value at Risk (VaR), Rolling Sharpe Ratio, and Correlation Matrices. Total cost: $0.**
We track our positions in brokerage apps designed with the same psychological hooks as slot machines. They don't want you to see your beta-weighted exposure. They want you to see green flashing lights and trade again.
I got tired of the "SaaS trap" (paying monthly fees for data I already own) and decided to build a **"Glass Box"** system. The goal was simple: Institutional-grade analytics, local privacy, and zero subscriptions.
I realized that with the new coding capabilities of LLMs (specifically Claude 3.5/Claude Code), you no longer need to be a developer to build this. You just need to know how to prompt.
Here is the architecture I built (and how you can too):
**1. The "Source of Truth" (The Database)** Stop relying on API connections that break. I created a simple Excel `Trade_Log` with columns for Date, Ticker, Action, Price, and Commission. This is the only place I manually enter data. It is immutable.
**2. The Engine (Python + Yahoo Finance)** I used a Python script (written 100% by AI) to read that log, fetch daily historical pricing from Yahoo Finance, and "replay" history.
* It doesn't just calculate today's value.
* It reconstructs the portfolio day-by-day to create a perfect equity curve.
* This allows for true "Time-Weighted Returns" rather than just the simple P&L your broker shows.
**3. The Risk Matrix (The Alpha)** This is where retail usually fails. I had the script calculate a **Correlation Matrix** of my holdings.
* *The realization:* I thought I was diversified. The matrix showed my "Safe" dividend stock was 85% correlated to my "Growth" stock during downturns. I wasn't diversified; I was just levered.
* I also added **Value at Risk (VaR)** calculation to quantify exactly how much I could lose on a 95th percentile bad day.
**4. The Dashboard (Bloomberg Style)** I had the script output everything into a dark-mode, formatted Excel dashboard. No gridlines. High contrast. It updates with a single double-click of a batch file on my desktop.
The Philosophy If you can't see the formula, you don't own the data. When you build it yourself, you can audit every calculation. If you want to change the volatility lookback from 30 to 90 days, you change one variable. You aren't waiting for a feature request.
I wrote a full guide on the exact prompts and code structure I used to build this. It’s a bit long for Reddit, but it walks through the "Prompt Engineering" to get the AI to act as a quant developer.
If you are interested in the code/prompts, you can see the source.
**Discussion:** For those who have built their own trackers, what is the one "custom metric" you track that standard apps don't offer? For me, it's "Liquidity Weighted Drawdown."
*Source:* [JCR Post](https://jarviscapitalresearch.substack.com/p/building-your-own-portfolio-tracker)
*Disclaimer: I used AI to help format the code, but the financial logic is standard quantitative finance*