Optimizing Portfolio Performance through Clustering and Sharpe Ratio-Based Optimization: A Comparative Backtesting Approach
Keon Vin Park
TL;DR
The paper tackles portfolio optimization by marrying K-Means clustering of historical log-returns with cluster-specific Sharpe ratio-based optimization to improve risk-adjusted performance. It employs SLSQP to solve the constrained optimization problem, ensuring full investment and no short selling, with a backtest framework spanning 2010–2024 on ten S&P 500 stocks. Results show a clearly superior cluster-based portfolio (notably Cluster 2) achieving higher Total and Annualized returns and a higher Sharpe ratio than an equal-weighted benchmark, despite accepting similar or modestly higher volatility. This approach demonstrates a practical pathway to exploit inter-asset return structure via segmentation and risk-aware optimization for dynamic market conditions.
Abstract
Optimizing portfolio performance is a fundamental challenge in financial modeling, requiring the integration of advanced clustering techniques and data-driven optimization strategies. This paper introduces a comparative backtesting approach that combines clustering-based portfolio segmentation and Sharpe ratio-based optimization to enhance investment decision-making. First, we segment a diverse set of financial assets into clusters based on their historical log-returns using K-Means clustering. This segmentation enables the grouping of assets with similar return characteristics, facilitating targeted portfolio construction. Next, for each cluster, we apply a Sharpe ratio-based optimization model to derive optimal weights that maximize risk-adjusted returns. Unlike traditional mean-variance optimization, this approach directly incorporates the trade-off between returns and volatility, resulting in a more balanced allocation of resources within each cluster. The proposed framework is evaluated through a backtesting study using historical data spanning multiple asset classes. Optimized portfolios for each cluster are constructed and their cumulative returns are compared over time against a traditional equal-weighted benchmark portfolio.
