Skip to content

[ENH] Add EfficientMVSK optimizer (mean-variance-skewness-kurtosis)#730

Open
dthinkr wants to merge 1 commit into
PyPortfolio:mainfrom
dthinkr:feat/efficient-mvsk
Open

[ENH] Add EfficientMVSK optimizer (mean-variance-skewness-kurtosis)#730
dthinkr wants to merge 1 commit into
PyPortfolio:mainfrom
dthinkr:feat/efficient-mvsk

Conversation

@dthinkr
Copy link
Copy Markdown

@dthinkr dthinkr commented May 12, 2026

Summary

  • Add EfficientMVSK optimizer backed by yand-mvsk, which implements Yau's Affine-Normal Descent algorithm (arXiv:2604.25378)
  • Extends BaseOptimizer (like CLA — no cvxpy dependency); yand-mvsk is an optional dependency in all_extras
  • 18 new tests, all passing; zero regressions on existing test suite

Motivation

Classical mean-variance optimization ignores skewness (crash risk) and kurtosis (tail risk). MVSK optimization jointly considers all four moments, producing portfolios that are more robust to tail events.

Previous MVSK implementations were impractical because they required materializing O(n³) coskewness and O(n⁴) cokurtosis tensors. The YAND algorithm computes all moment operations via O(Tn) matrix-vector products, solving 800-asset problems in <100ms:

Assets YAND iters YAND time scipy SLSQP
20 5 0.006s 0.017s
200 8 0.025s 0.61s
800 7 0.052s 28.3s

Usage

from pypfopt import EfficientMVSK

mv = EfficientMVSK(returns, gamma=6.0)  # or EfficientMVSK.from_prices(prices)
weights = mv.min_mvsk()
mu, vol, sharpe, skew, kurt = mv.portfolio_performance()

Changes

  • pypfopt/efficient_frontier/efficient_mvsk.py — new EfficientMVSK class
  • pypfopt/efficient_frontier/__init__.py — register export
  • pypfopt/__init__.py — top-level export
  • pyproject.toml — add yand-mvsk>=0.2.0 to all_extras
  • tests/test_efficient_mvsk.py — 18 tests covering convergence, correctness (beats equal-weight), bounds, performance metrics, serialization

Test plan

  • All 18 new MVSK tests pass
  • All 87 existing tests pass (EfficientFrontier, CLA, CVaR)
  • yand-mvsk gracefully skipped when not installed (soft dependency)

… optimization

Add MVSK portfolio optimization via the yand-mvsk package, which implements
Yau's Affine-Normal Descent algorithm. This extends PyPortfolioOpt beyond
mean-variance by jointly optimizing over all four moments, penalizing crash
risk (skewness) and tail risk (kurtosis).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant