Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

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

Conversation

@dthinkr

@dthinkr dthinkr commented May 12, 2026

Copy link
Copy Markdown

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(n3) coskewness and O(n4) 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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /