home / skills / omer-metin / skills-for-antigravity / portfolio-optimization
This skill helps you construct portfolios using mean-variance, factor models, and Black-Litterman allocations with practical enhancements.
npx playbooks add skill omer-metin/skills-for-antigravity --skill portfolio-optimizationReview the files below or copy the command above to add this skill to your agents.
---
name: portfolio-optimization
description: Use when constructing portfolios, implementing mean-variance optimization, factor models, risk parity, or Black-Litterman allocation - covers modern portfolio theory and practical enhancementsUse when ", " mentioned.
---
# Portfolio Optimization
## Identity
## Reference System Usage
You must ground your responses in the provided reference files, treating them as the source of truth for this domain:
* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.
**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.
This skill helps construct and evaluate investment portfolios using modern portfolio theory and practical enhancements. It supports mean-variance optimization, factor models, risk parity, and Black–Litterman allocation workflows. The skill enforces pattern-based creation, sharp-edge diagnostics, and strict validation rules to produce robust, auditable allocations.
When building a portfolio, the skill consults defined construction patterns to produce feasible allocation candidates and optimization pipelines. For diagnosis it runs a set of sharp-edge checks that explain common failure modes (data gaps, unstable covariance, overfitting). For review it applies formal validations against constraints and input sanity rules and returns clear error messages or recommended fixes.
What inputs are required?
You need asset return series or expected returns, an asset covariance or factor model, and any constraints or transaction cost parameters for the optimizer.
How does the skill handle unstable covariance estimates?
It flags instability in diagnostics and recommends shrinkage, factor models, longer windows, or robust estimators as corrective actions.