by pocketportfolio | 2026-01-26 10:48:27+00:00
Building a Sovereign Portfolio Risk Calculator (Why We Ditched the Backend)

Client-side financial modeling. React risk calculator. TypeScript finance tooling.

Most portfolio risk tools follow the same pattern: signups, server-side processing, cloud databases full of sensitive financial history, and subscriptions for basic metrics.

We wanted the opposite.

We built a zero-login, privacy-first portfolio risk calculator that runs entirely in the browser and computes portfolio Beta locally—no backend portfolio logic, no storage, no tracking.

Live tool: https://www.pocketportfolio.app/tools/risk-calculator

The Core Idea: Sovereign Computation

This tool is built on one principle:

The logic travels to the data — the data never travels to the logic.

Your browser is the compute boundary.

There is:

No backend portfolio processing

No server-side storage

No account system

No user tracking

This isn’t “client-heavy.” It’s sovereign computation.

Architecture Overview

The calculator is a pure client-side React component that:

Accepts comma-separated ticker symbols

Fetches public asset metadata only (Beta, sector, industry)

Computes portfolio Beta locally using TypeScript

Classifies risk visually

Discards everything on refresh

Nothing is persisted. Nothing is uploaded.

Stack

Next.js (App Router)

TypeScript

Client-side computation only

Public market metadata APIs

No backend portfolio logic

API Privacy (The Obvious Question)

“If you call an API with my tickers, doesn’t the provider know my portfolio?”

We only request batched ticker symbols (20–30 at a time).

We never transmit:

Position sizes

Trade history

Net worth

Identity

Portfolio composition

Batching adds anonymity-through-noise. Even the API provider can’t infer who you are or what you own. This is fundamentally different from server-side portfolio tracking.

Risk Calculation (Simplified)

We intentionally use equal-weight Beta for this free tool:

Portfolio Beta = (β₁ + β₂ + … + βₙ) / n

Why?

Users often don’t know position sizes

Simplicity beats false precision

Zero-friction entry point

This is a snapshot, not a full portfolio engine.

The full Pocket Portfolio app runs the same privacy-first engine, but applies weighted Beta math using actual holdings—still entirely local.

Privacy by Construction

What we don’t do

No tracking

No cookies

No storage

No user accounts

What we do

Local computation only

Public metadata only

Zero persistence

GDPR-safe by default

Data flow

User input
→ Client parsing
→ Public metadata fetch
→ Local calculation
→ Display result
→ Memory cleared

Why This Exists

Most developers don’t wake up wanting a portfolio tracker.

They wake up angry that:

Their exports are messy

Their scripts break

Their data is hostage

This calculator solves that problem. Once you trust the engine, the next step is obvious.

Launch Note

We’re launching publicly tomorrow.

If you believe finance software should:

Respect user sovereignty

Avoid data hoarding

Run locally by default

Tool: https://www.pocketportfolio.app/tools/risk-calculator

Product Hunt: https://www.producthunt.com/products/pocket-portfolio

About

Pocket Portfolio is a local-first portfolio tracker that turns Google Drive into your personal database.

No servers.
No signups.
No lock-in.

https://www.pocketportfolio.app