Portfolio analytics
Net worth, allocation, returns, drawdowns, benchmark comparison and risk metrics.
Selected project · WealthWise
A hands-on prototype for Swiss and European investors that combines wealth tracking, portfolio analytics, projections and decision support. This page documents the implementation supplied with the project.
Independent prototype · TypeScript · Python · PostgreSQLProduct question
The prototype makes assumptions visible, separates analysis from decisions and keeps user data local. It is designed as an exploration of the product and technical questions—not as a live advisory service.
Net worth, allocation, returns, drawdowns, benchmark comparison and risk metrics.
Deterministic scenarios, Monte Carlo percentile bands and target-achievement analysis.
Manual entries, CSV exports and an Interactive Brokers import preview with duplicate detection.
A PostgreSQL-backed local prototype with API routes and a separate FastAPI contract scaffold.
Implementation map
The current local build uses Next.js API routes for persistence. The Python service remains a scaffold for a future backend split.
components/WealthApp.tsxlib/finance.tsapp/api/* · db/schema.sqlbackend/app/main.pySelected code
Short excerpts from the supplied project code. They are included to make the work inspectable without publishing the full private repository.
lib/finance.tsexport function calculateRiskMetrics(history, benchmark, baseCurrency) {
const portfolioReturns = calculateReturns(
mapHistoryToCurrency(history, baseCurrency)
.map((point) => point.portfolio)
);
const annualizedVolatility =
standardDeviation(portfolioReturns) * Math.sqrt(12);
const sharpe =
annualizedVolatility === 0
? 0
: (annualizedReturn - riskFreeRate) / annualizedVolatility;
return { annualizedReturn, annualizedVolatility, sharpe, maxDrawdown };
}backend/app/main.py@app.post("/projections/run")
def run_projection(request: ProjectionRequest) -> dict[str, object]:
return {
"scenario_id": request.scenario_id,
"points": deterministic_projection(request),
}What the build exposed
This project is for informational and educational purposes only. It does not provide financial, investment, tax or legal advice.