Portfolio Optimizer

Portfolio Optimizer (Aka. Profit PI)

The Portfolio Optimizer is a web application that assists investors in constructing optimal investment portfolios using the Markowitz model from Modern Portfolio Theory. This model enables users to balance expected returns and risk by selecting assets and adjusting their risk tolerance. I build this application together with my friend Moritz Grundei

Features

  • Build custom portfolios by selecting multiple assets
  • Adjust risk tolerance using an intuitive slider interface
  • Save and manage multiple portfolio configurations
  • Simulate and analyze portfolio performance
  • Export portfolio configurations to the clipboard for easy sharing

Demo (40s)

Technical Details

The application is based on the Markowitz mean-variance optimization model, which computes the optimal asset allocation by considering:

  • Expected returns of selected assets
  • User-defined risk tolerance (represented by a tau parameter)
  • Historical volatility (variance) and correlation between assets

Tech Stack

  • Frontend: Built with Next.js for server-side rendering and dynamic client interactions
  • Backend Calculation Service: A Spring Boot microservice performs the portfolio optimization using numerical methods
  • In-Memory Stock Data Cache: A lightweight Express.js microservice caches frequently used stock data for faster access
  • Infrastructure: The application is containerized and deployed using Kubernetes (K8s) for scalability and resilience

This architecture ensures low-latency user experience, reliable financial computations, and a modular system for future extensibility.