Agent skill

portfolio-optimization-guide

Portfolio theory, optimization algorithms, and asset allocation methods

brycew6m4,252★ · +31/wk · 3 repos on radarProfile →
claude-codeNOASSERTION
Install
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill portfolio-optimization-guide --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/43-wentorai-research-plugins/skills/domains/finance/portfolio-optimization-guide/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 3,244
Language: Stata
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Portfolio Optimization Guide A skill for implementing and researching portfolio optimization methods, from classical mean-variance optimization to modern robust and factor-based approaches. Covers Markowitz theory, Black-Litterman, risk parity, and machine learning-enhanced portfolio construction. ## Mean-Variance Optimization ### Classical Markowitz Portfolio ```python import numpy as np from scipy.optimize import minimize def mean_variance_optimize(expected_returns: np.ndarray, cov_matrix: np.ndarray, target_return: float = None, risk_free_rate: float = 0.02) -> dict: """ Markowitz mean-variance optimization. expected_returns: array of expected returns for each asset cov_matrix: covariance matrix of asset returns target_return: target portfolio return (None for max Sharpe) """ n_assets = len(expected_returns) def portfolio_volatility(weights): return np.sqrt(weights @ cov_matrix @ weights) def neg_sharpe(weights): ret = weights @ expected_returns vol = portfolio_volatility(weights) return -(ret - risk_free_rate) / vol # Constraints constraints = [ {"type": "eq", "fun": lambda w: np.sum(w) - 1}, # weights sum to 1 ] if target_return is not None: constraints.append( {"type": "eq"

What's inside
Steps it walks through
  1. Mean-Variance Optimization
  2. Classical Markowitz Portfolio
  3. Efficient Frontier
  4. Black-Litterman Model
  5. Incorporating Investor Views
  6. Risk Parity
  7. Equal Risk Contribution Portfolio
  8. Factor-Based Portfolio Construction
  9. Fama-French Factor Exposures
  10. Rebalancing and Transaction Costs
  11. Optimal Rebalancing with Costs
  12. Key Academic References
  13. Tools and Libraries
More from Auto-Empirical-Research-Skills
All skills →
About this skill
What does the portfolio-optimization-guide skill do?

Portfolio theory, optimization algorithms, and asset allocation methods

How do I install it?

Run `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill portfolio-optimization-guide --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From brycewang-stanford/Auto-Empirical-Research-Skills, a repository with 3,244 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going