Originally published on medium.com
Most retail investors track their portfolio in a spreadsheet.
Some upgrade to a free app that shows total value and daily change. That’s it.
Neither tells you the numbers that actually matter: your annualized volatility, your Sharpe ratio, your beta against the market, your maximum drawdown, how correlated your positions really are with each other.
Institutional investors have had this for decades. Retail investors get a pie chart.
If you’re:
this matters.
Excel is where most portfolios go to die.
You start with a clean sheet. One column per position, one row per transaction. It works — for about three months.
Then you add a new broker account. Then you start tracking dividends separately. Then a formula breaks because you inserted a row in the wrong place, and you don’t notice until your total is off by 4%.
Spreadsheets don’t calculate volatility, beta, or drawdown by default. You’d have to build those formulas yourself, pull historical prices manually, and keep them updated — forever, by hand.
Most people don’t. So they end up managing a portfolio without knowing its actual risk profile.
The other option is a paid portfolio tracker or a Bloomberg-style terminal.
These solve the calculation problem. They don’t solve the trust problem.
Sharpe ratio, beta, drawdown, correlation — these aren’t proprietary black-box models. They’re well-defined formulas. Paying $30/month to have someone else run them on your data, on their servers, is a trade-off a lot of people make without questioning it.
The real problem isn’t a lack of financial data. It’s a lack of a tool that computes real risk metrics, locally, without asking you to hand your portfolio to a third party.
I built Vault, an open source portfolio tracker with React 19 and Vite that uses the EODHD API to pull real market data and calculate six metrics that any serious investor should be tracking:
No backend. No account. No server storing your positions.
Everything runs in the browser, and your portfolio is saved in localStorage — on your machine, not on mine.
I’ve used EODHD across several projects before this one, mainly because of three things:
If you want to follow along or fork Vault, you’ll need a key — get one free here.
All the math lives in a single file: [src/utils/finance.js](https://github.com/Kevinelectronics/portafoliotracker/blob/main/src/utils/finance.js). No external statistics libraries — every formula is implemented from scratch.
Time-weighted returns
Each day is weighted by the previous day’s closing value. This matters more than it sounds: without it, adding a new position mid-month distorts your daily portfolio return.
Volatility and Sharpe ratio
Standard deviation of daily returns, annualized with √252, then converted to a Sharpe ratio against a configurable risk-free rate.
Here’s the core of it, simplified to Python for clarity:
import numpy as np
def annualized_volatility(daily_returns):
return np.std(daily_returns) * np.sqrt(252)def sharpe_ratio(daily_returns, risk_free_rate=0.02):
excess_returns = np.array(daily_returns) - (risk_free_rate / 252)
return (np.mean(excess_returns) / np.std(daily_returns)) * np.sqrt(252)
Beta
Covariance of portfolio returns against the S&P 500 (GSPC.INDX on EODHD), divided by the benchmark's variance.
Drawdown
Percentage drop from the running peak of a growth-indexed curve (base 100). This is the number that tells you what it would have actually felt like to hold this portfolio through its worst stretch.
Correlation matrix
Pairwise Pearson coefficient between assets, aligned by date. This is the metric most retail portfolios get wrong without knowing it — five stocks can feel diversified and still move together 90% of the time.
Concentration (HHI)
Herfindahl-Hirschman Index applied to position weights. One number that tells you how concentrated you actually are, beyond “I have 12 positions so I’m diversified.”
From here, the same building blocks extend into:
You add a position, EODHD’s Search + EOD endpoints autocomplete the ticker and the closing price on your purchase date.
From there, Vault renders your returns curve against the S&P 500, your correlation heatmap, and your sector exposure pulled straight from fundamentals data.
No manual formula-building. No re-entering prices when a position updates.
git clone https://github.com/Kevinelectronics/portafoliotracker.git
cd portafoliotracker
npm install
Add your EODHD key to .env, run npm run dev, and add your first position.
Get your free EODHD API key
Vault runs entirely on EODHD’s Search, EOD, and Fundamentals endpoints — no backend, no paywall on the metrics.
→ Get your EODHD API key
If you’re a software or API company looking to explain your product through high-quality educational content — not marketing fluff — feel free to connect with me on LinkedIn.
Need technical content like this for your product?
→ kevinmeneses.com
Looking for technical content for your company? I can help — LinkedIn · kevinmenesesgonzalez@gmail.com