Case study
SMIF Portfolio Construction Lab
A portfolio-construction workspace for building, reviewing, decomposing, and reporting equity portfolios.
SMIF Lab turns portfolio theory into an interactive workflow: holdings, daily opens, covariance, risk contribution, tracking error, rebalancing, stock-selection evidence, GAM simulation, and exportable reports.
Snapshot
- Role
- Builder
- Stack / tools
- Next.js / React / TypeScript / Tailwind / Recharts / PapaParse
- Timeline / status
- Current / Live
- Core users
- Student investment teams, analysts, and finance learners.
- Problem class
- Portfolio construction, covariance, active risk, and rebalance review.
- Location
- New York, New York
Problem
Stock selection alone does not prove portfolio quality. A portfolio can bury analyst views under unintended risk, sector concentration, covariance, turnover, and benchmark-relative exposure.
It matters because the user is making an operational decision with incomplete context: Student investment teams, analysts, and finance learners who need to connect portfolio theory to an actual review workflow.
Product decision
The main judgment was to make portfolio construction reviewable. The app does not stop at a final weight. It exposes the covariance path, risk contribution, tracking error, turnover, and trade reasons so an analyst can defend the portfolio.
- Kept calculations client-side so the lab remains no-cost, inspectable, and usable without accounts or API keys.
- Made trade reasons and risk contributions explicit so rebalancing is reviewable, not just a black-box target-weight output.
- Included reporting/export flows so the work can leave the app as Markdown and CSV artifacts.
What I did not build or claim
- Not investment advice, trading advice, a fund product, or a solicitation.
- Not a broker or portfolio execution tool.
- Not an opaque optimizer that hides risk, turnover, or benchmark-relative exposure.
System / workflow
- 01
Build
Analysts enter tickers, value, risk tolerance, holdings, and optional CSV overrides.
- 02
Decompose
The lab estimates returns, covariance, contribution to variance, beta_iP, marginal risk, and sector risk.
- 03
Rebalance
Proposed weights are tested against turnover, position limits, tracking error, and stated trade reasons.
- 04
Report
Outputs leave the app as analyst-ready Markdown and CSV artifacts.
- Holdings
- Covariance
- Risk contribution
- Rebalance
- Reports
- Inputtickers / holdings / CSV overrides
- Decomposevariance / beta_iP / sector risk
- Reporttrade reasons / Markdown / CSV
What shipped / what exists
- A portfolio builder with tickers, portfolio value, risk tolerance, holdings, and optional CSV overrides.
- Returns and covariance workflows with portfolio variance, percent contribution to variance, beta_iP, marginal contribution to risk, and sector contribution.
- A rebalance studio with turnover, position limits, proposed weights, trade reasons, benchmark analysis, tracking error, and exportable reports.
- A Guaranteed Active Management simulator for capital-structure-style active management analysis.
Architecture notes
- Next.js App Router with React, TypeScript, Tailwind CSS, Recharts, PapaParse, lucide-react, and Vercel Web Analytics.
- Client-side portfolio analytics with uploaded holdings, price, and benchmark CSV handling.
- Daily-open route that can fetch no-key Yahoo Finance chart data and fall back to bundled deterministic rows; calculations still run in the browser.
Evidence / proof
- Live app at smif.dylanwlim.com.
- Public GitHub repository at github.com/dylanwlim/smif.
- Implements covariance, risk decomposition, rebalance, benchmark/tracking-error, stock-selection evidence, GAM simulation, and Markdown/CSV reporting flows.
Visual artifact
No real project screenshots are tracked in this repository. The interface map is used as an honest structural proof panel, not as a screenshot or invented metric.
Next steps
- Add stronger scenario comparison between proposed portfolios.
- Improve report formatting for direct committee review.
- Make data freshness and provider fallback states even more explicit.
Interested in similar product work?
Reach out for internships, product work, or focused collaborations.