← All projects

Portfolio analytics · Python · PySide6 · v3.0.0

Portfolio Analyzer icon

Portfolio Analyzer

A native desktop portfolio analytics app for Windows and macOS: backtest, optimize, measure risk, plan retirement and watch your holdings live, with a plain-English explanation for every result. Current version is v3.0.0 (Jul 2026), now in the Graphite design. Details ↓

Live demo

Try a sample portfolio

Illustrative demo with a sample ETF portfolio · not investment advice

A browser version of a few of the app's tabs, running on real daily adjusted prices (…). Move the weights. Everything is recalculated in your browser, with monthly rebalancing and the 13-week T-bill as the risk-free rate. SPY is the passive benchmark.

Sample weights

Weights are normalized to 100%. Long-only.

Growth of $10,000

Active (your weights)Passive (SPY)Max-Sharpe ORP

Performance summary

Drawdown from running peak

Efficient frontier & Capital Allocation Line

Dots: 2,500 random long-only mixes, colored by Sharpe ratio. Lines show annualized volatility (x) against annualized return (y).

Correlation of daily returns

Daily return distribution (Active)

Data: daily adjusted closes (dividends reinvested) from Yahoo Finance, saved Oct 14, 2026 and bundled with this page. Past performance doesn't predict future results. The desktop app adds attribution, factor models, tax-aware analysis, Monte Carlo forecasting and reports.

About the app

Why: Began on Nov 27, 2025 as my University of St. Thomas MS capstone: a simple optimizer where you enter stocks and get optimal weights. I kept extending it far beyond the optimizer.

110

commits

11

releases

~35.7k

lines of Python

316

pytest tests

  1. Nov 2025The capstone optimizer, built in Streamlit.
  2. Dec 2025Added Brinson-Fachler attribution, Black-Litterman, multi-factor regression, rolling risk and a hybrid data loader.
  3. ThenMoved to a native PySide6 desktop app, with GitHub Actions CI that builds the installers automatically.
  4. Graphite overhaulRebuilt in four phases: one canonical metrics module checked against reference libraries, the Graphite design, institutional risk and attribution analytics, and data-quality checks with fuller reports.

Features

18-step analysis pipelineInception-aware backtest engine with trading costsOptimization: Max-Sharpe, HRP and Black-Litterman, with cost-aware rebalance tradesVaR and expected shortfall by four methods, with a breach backtestHistorical stress tests and largest-drawdown tableBrinson-Fachler sector attributionFama-French factor loadings with t-statsCapture ratios, tracking error and rolling SharpeTax-aware analysisRetirement Monte CarloDCF fair valueComparison of up to 6 portfoliosLive Market Watch cockpit and price alertsData-quality checks with offline fallbackHTML, PDF and PPTX reportsPlain-English explanation for every chart

Skills learned: Portfolio optimization methods, factor models, performance attribution, desktop GUI development, automated testing and CI/CD.

Portfolio Analyzer Overview page in the Graphite theme

Overview

KPI strip with benchmark values, growth of $1M with drawdowns, period returns, risk snapshot and a sortable holdings table.

Portfolio Analyzer Risk page in the Graphite theme

Risk

VaR and expected shortfall by four methods with a breach backtest, the largest drawdowns and historical stress tests.

Portfolio Analyzer Attribution page in the Graphite theme

Attribution

Contribution to active return by holding plus Brinson-Fachler sector attribution against the benchmark.

Portfolio Analyzer Optimization page in the Graphite theme

Optimization

Efficient frontier with the capital allocation line, Max-Sharpe and HRP portfolios, and cost-aware rebalance trades.

Portfolio Analyzer Performance page in the Graphite theme

Performance

Capture ratios, tracking error, information ratio and rolling Sharpe over the full and common history.

Portfolio Analyzer Live Market Watch page in the Graphite theme

Live Market Watch

A snap-to-grid cockpit of delayed quotes, an intraday chart, movers, day P&L, a heatmap and allocation.