# Portfolio Construction

> This skill should be used when the user asks to "compare portfolio construction methods", "run risk parity", "build a minimum-variance portfolio", or generate IPS-constrained SAA candidates.

- **Type:** Skill
- **Install:** `agentstack add skill-nutdnuy-self-driving-portfolio-skill-portfolio-construction`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [nutdnuy](https://agentstack.voostack.com/s/nutdnuy)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [nutdnuy](https://github.com/nutdnuy)
- **Source:** https://github.com/nutdnuy/self-driving-portfolio-skill/tree/main/skills/portfolio-construction

## Install

```sh
agentstack add skill-nutdnuy-self-driving-portfolio-skill-portfolio-construction
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# portfolio-construction

Ten portfolio-construction methods, each producing one proposal that
respects IPS hard constraints (long-only, sum-to-one, per-ticker box).

## Methods

| ID                    | Description                                              |
| --------------------- | -------------------------------------------------------- |
| `equal_weight`        | 1/N                                                      |
| `inverse_vol`         | weights ∝ 1/σ                                            |
| `min_variance`        | argmin wᵀΣw                                              |
| `max_sharpe`          | argmax (wᵀμ − r_f) / √(wᵀΣw)                             |
| `risk_parity`         | equal risk contribution                                  |
| `hrp`                 | Hierarchical Risk Parity (Lopez de Prado)                |
| `max_diversification` | argmax (wᵀσ) / √(wᵀΣw)                                   |
| `black_litterman`     | BL with regime-implied views                             |
| `mvo_constrained`     | MVO with explicit IPS box constraints + risk-aversion λ  |
| `tpa`                 | Total Portfolio Allocation: regime-tilted risk parity    |

## Constraint projection

After every optimiser, weights are projected onto the IPS feasible set
with the exact Euclidean bounded-simplex projection
(`utils.project_to_box`). Solve the Lagrange multiplier by monotone bisection.
Reject the IPS before optimization when `sum(min_w) > 1` or
`sum(max_w) < 1`; never return an almost-feasible vector.

## CLI

```bash
python skills/portfolio-construction/scripts/run_all.py \
       --cmas outputs/demo01/cmas.json \
       --cov  outputs/demo01/covariance.json \
       --ips  ips/ips_template.md \
       --out  outputs/demo01/pc_proposals.json
```

Run through `pipeline/orchestrator.py` for schema gating and governed output.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [nutdnuy](https://github.com/nutdnuy)
- **Source:** [nutdnuy/self-driving-portfolio-skill](https://github.com/nutdnuy/self-driving-portfolio-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-nutdnuy-self-driving-portfolio-skill-portfolio-construction
- Seller: https://agentstack.voostack.com/s/nutdnuy
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
