The HW-Frontier is a full-stack quantitative finance application. It leverages Modern Portfolio Theory (MPT) and Convex Optimization to solve for the efficient frontier, helping users allocate capital across volatile assets based on historical risk-adjusted returns.
As math-focused developers, we moved away from simple heuristics and implemented a rigorous Mean-Variance Optimization engine.
To maintain statistical integrity, we transform raw price data into Log Returns. This ensures time-additivity and better handles the compounding nature of financial assets:
We then calculate the Annualized Expected Return Vector (
The engine solves a Convex Optimization problem using the CVXPY library. Given a risk-aversion parameter
To ensure the solver always finds a global minimum, we implemented Tychonov Regularization. By adding a small
- React (Vite + TypeScript): For a type-safe, high-performance user interface.
- Tailwind CSS: Modern, responsive design with a financial "Glassmorphism" aesthetic.
- Recharts: Dynamic SVG-based Donut charts for asset weight visualization.
- Axios: Asynchronous API communication with the Python backend.
- FastAPI: High-speed ASGI web framework for serving the optimization logic.
- CVXPY: A specialized library for formulating and solving convex optimization problems.
- Pandas & NumPy: For heavy-duty data manipulation and linear algebra operations.
- Uvicorn: Lightning-fast ASGI server implementation.
git clone https://github.com/Arya125-droid/Fin_opt.git
cd Fin_opt