Headline Summary

Owned the factor calculation and optimization logic for a constraint-driven portfolio construction system serving retail banking customers at a major Korean bank — generating ~150 model portfolios daily across multiple investor profiles, asset classes, and sales channels, with 12+ months of zero constraint violations in production.


What I Built

The core quantitative engine behind a production portfolio recommendation system for a bank client. The system constructs Model Portfolios (MPs) tailored to each customer's risk profile, asset preferences, and regulatory constraints — selecting from a dynamic universe of domestic/international stocks, ETFs, and funds.

My focus was the factor-based scoring pipeline and the constrained optimization layer: computing investment factors (momentum, low-volatility, value, quality) across ~350 securities daily, then solving for optimal allocations under strict regulatory and suitability constraints using tangency portfolio optimization.

Tech stack: Python · SciPy (optimize) · Pandas · NumPy · Statsmodels


🖼️ System Architecture

https://sh1319.github.io/diagrams/portfolio_architecture_diagram.html


Technical Deep Dive

1. Factor Calculation Pipeline

Built the daily factor scoring engine that evaluates securities across multiple investment dimensions:

Factor What it measures Key signals
Momentum Price trend strength ROC, SMA, price-relative SMA, SMA slope (12-month lookback)
Low Volatility Downside risk Rolling 3-month return standard deviation, bottom 1% exclusion
Value Fundamental cheapness PBR/total capital ratio
Quality Earnings efficiency ROE

Factors are computed separately for domestic equities (KOSPI top 200, KOSDAQ top 150 by 3-month avg market cap) and international equities (top 500 by market cap). These factor scores are combined in ~150 different weighting configurations to produce diverse portfolio "viewpoints" — each emphasizing different investment philosophies.

2. Constrained Portfolio Optimization

The core allocation engine uses tangency portfolio optimization via SciPy, solving for the portfolio that maximizes risk-adjusted return subject to hard constraints:

Constraint categories: