Comprehensive Leading-edge Portfolio Optimization Solutions Applied to AI Ranked Stocks Consistently Deliver Higher Returns While Minimizing Risk

SapienTrade’s proprietary AI Investment Solution generates ranked stock signals (strong buy and strong sell) creating a curated, preferentially ordered universe of investable stocks. This defines the role of AI. On the other hand, determining the optimal stock weights or allocations to achieve a specific investment objective is addressed through mathematical portfolio optimization, delivered by the SapienTrade Portfolio Optimization Solution.

Portfolio optimization

Portfolio optimization consists of using mathematical methods to allocate Capital or Total Portfolio Value across financial assets such as stocks and ETFs. Portfolios can be defined in terms of weights or holding in each asset:

Portfolio weights express how your total portfolio value or capital is allocated across assets, in percentage terms:
Wi = ( Position Value of Asset i ) / Total Portfolio Value

Holding Asset express the number of an asset in the portfolio:
Holding of Asset i = ( Position Value of Asset i ) / Price of Asset i = wi x Total Portfolio Value / Price of Asset i.

While academic treatments typically operate in weight space, SapienTrade optimization engine outputs both optimal weights and the corresponding tradable asset holdings.

Given a universe of assets, here, AI-ranked stocks or ETFs, portfolio optimization formulates and solves a constrained mathematical optimization problem to determine the optimal asset allocation. The decision variables may be expressed as portfolio weights, defined as fractional capital allocations summing to unity, or as asset holdings in absolute units. The optimization is performed subject to explicit constraints on risk, return, leverage, exposure, and other portfolio parameters.

Optimization algorithms rooted in Modern Portfolio Theory are based on the concept of the efficient frontier, which characterizes the set of portfolio allocations that optimally trade off expected return against risk. The choice of risk metric and corresponding optimization formulation varies by method. The optimization process begins by defining the investable universe, say AI-ranked stocks or ETFs, available capital, and a clear investment objective: either return maximization or risk minimization. The optimization engine then solves for the optimal asset weights or tradable holdings required to achieve the objective, subject to explicit portfolio constraints and parameters.

Example of a $ 1,000,000 capital allocated in a portfolio made of three assets A, B, C:

Asset weight Position Value Asset Price $ Holding Asset
A 40% 400,000 100 4,000
B 35% 350,000 50 7,000
C 25% 250,000 25 10,000
Efficient Frontier

SapienTrade Portfolio Optimization solutions implement numerous methods described below while explicitly enforcing diversification across stock sectors or market-cap segments. In addition, the SapienTrade Portfolio Backtesting toolbox enables systematic exploration and comparison of optimal asset allocations across multiple optimization algorithms, sector and market-cap universes, and rebalancing strategies over historical time horizons. Read more.

SapienTrade Portfolio Optimization Solution delivers a comprehensive suite of industry-recognized optimization methods within a no-code, visual environment, empowering investors to build and rigorously analyze optimal AI-generated portfolios that best align with their targeted risk–return objectives.

Mean–variance optimization

This portfolio optimization method is based on the Markowitz framework. Three risk-related optimization objectives are supported: volatility minimization, Sharpe ratio maximization, return maximization and quadratic utility maximization. All these objectives are volatility-based. To estimate portfolio volatility, seven different methods are provided: the sample covariance matrix, the semi-covariance matrix, the exponentially weighted covariance matrix, the Ledoit–Wolf shrinkage estimator, the Ledoit–Wolf shrinkage estimator with the Sharpe single-factor matrix as the shrinkage target, and the Ledoit–Wolf shrinkage estimator with the constant-correlation matrix as the shrinkage target.

Mean-Semivariance Optimization

  • Markowitz mean-variance method penalizes both upside gains and downside losses equally through volatility. In practice, however, investors are primarily concerned with downside risk while seeking to capture upside potential. Mean–semivariance portfolio optimization is better aligned with these investor preferences, as it treats only downside movements as risk. Optimal portfolios under this framework explicitly control downside risk while maximizing expected return. This approach is particularly well suited to assets with asymmetric or fat-tailed return distributions, where variance-based measures tend to overstate risk.
  • Unlike volatility, semivariance or downside risk is not derived from pairwise asset covariances. Instead, it is measured as the expected squared shortfall of the portfolio return below a target threshold, typically zero or a minimum acceptable return. As a result, semivariance is computed after portfolio aggregation, rather than on an asset-by-asset basis, providing a more realistic representation of downside exposure.
  • Three risk-related optimization objectives are supported: semivariance minimization, return maximization, and semivariance quadratic utility maximization.

Mean-CVaR Optimization

  • Mean–CVaR portfolio optimization is a portfolio construction framework that maximizes expected return while explicitly controlling downside tail risk, measured by Conditional Value-at-Risk (CVaR), also known as Expected Shortfall. Instead of penalizing total return variability like mean–variance optimization, it focuses on the average of the worst losses beyond a chosen confidence level (e.g., 95% or 99%), making it well suited for assets with asymmetric, fat-tailed return distributions. The optimization is typically formulated as a convex linear program using scenario-based returns, ensuring stable and tractable solutions even under stress scenarios and without assuming normality. As a coherent risk measure, CVaR properly rewards diversification and provides a clear trade-off between return and extreme downside risk, which is why mean–CVaR optimization is widely used by institutional investors, banks, and energy and commodity trading desks.
  • Two risk-related optimization objectives are supported: CVaR minimization and return maximization.

CDaR Optimization

Mean–CDaR (Conditional Drawdown at Risk) portfolio optimization is a portfolio construction framework that maximizes expected return while controlling downside risk measured by Conditional Drawdown at Risk , which captures the average of the worst portfolio drawdowns beyond a chosen confidence level.

  • Unlike variance or CVaR, CDaR is explicitly path-dependent and reflects the severity of sustained losses from peak to trough, making it particularly relevant for investors concerned with capital erosion over time. Despite its drawdown focus, CDaR admits a convex optimization formulation under linear portfolio returns, allowing stable and tractable optimization solutions while preserving diversification benefits.
  • Mean-CDaR optimization provides a practical compromise between CVaR tail-risk control and drawdown awareness and is commonly used in trend-following CTA style portfolio strategies experience risk as capital erosion and recovery time rather than achieving competitive returns.
  • Two risk-related optimization objectives are supported: CDaR minimization and return maximization.
Portfolio Optimization Methods