portfolio-optimization

Optimize multi-asset allocations using mean-variance, Black-Litterman, and risk parity methods.

33|6|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill portfolio-optimization-xjtulyc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: portfolio-optimization
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/08-finance-academic/portfolio-optimization
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill portfolio-optimization-xjtulyc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyPortfolioOpt, cvxpy, pandas, numpy, matplotlib, scipy.

What problem does it solve?

Portfolio optimization helps you allocate capital across multiple assets to achieve better tradeoffs between expected return and risk, while incorporating constraints and subjective market views.

Core Features & Use Cases

  • Mean-variance optimization (efficient frontier, GMV, max Sharpe): Build the Markowitz frontier and select minimum-variance or tangency portfolios from estimated returns and covariance.
  • Black-Litterman (investor views): Blend equilibrium/implied returns with your views using a statistically grounded posterior.
  • Risk parity (equal risk contribution): Compute allocations where each asset contributes similarly to portfolio volatility, using covariance-driven optimization.
  • Backtesting support: Perform rolling, walk-forward rebalancing to evaluate strategies under periodic recalibration.

Quick Start

Use the portfolio-optimization skill to compute efficient frontier portfolios and produce minimum-variance, maximum-Sharpe, Black-Litterman, and risk-parity allocations from your asset return series.

Frequently Asked Questions about portfolio-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate the efficient frontier and maximum Sharpe portfolio in Python?

To calculate the efficient frontier and maximum Sharpe portfolio, you solve convex optimization problems using estimated returns and covariance matrices with PyPortfolioOpt and cvxpy. This yields minimum-variance and tangency portfolios from your asset return series.

How does Black-Litterman portfolio optimization incorporate investor views?

Black-Litterman portfolio optimization incorporates investor views by blending equilibrium or implied market returns with your subjective views to compute a statistically grounded posterior return estimate. This posterior is then used to solve for the optimized allocation.

What is risk parity allocation and how is it computed using covariance?

Risk parity allocation is an approach where each asset contributes similarly to total portfolio volatility. It is computed by running covariance-driven convex optimization to solve for equal risk contribution weights across the selected assets.

Can I backtest portfolio rebalancing strategies with walk-forward rolling windows?

Yes, you can backtest portfolio rebalancing strategies with walk-forward rolling windows. This performs periodic recalibration by re-estimating returns and covariance on rolling data to evaluate strategy performance under changing market scenarios.

Do I need cvxpy and PyPortfolioOpt for mean-variance optimization with constraints?

Yes, you need cvxpy and PyPortfolioOpt for mean-variance optimization with constraints. These libraries provide the convex optimization solvers and financial structures required to compute efficient frontiers from estimated returns and covariance matrices.