portopt

Analyze and optimize investment portfolios with risk metrics and asset allocation strategies.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/radrhm/portopt --skill portopt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: portopt
Source: https://github.com/radrhm/portopt/tree/main
Command: npx skills add https://github.com/radrhm/portopt --skill portopt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires yfinance, PyPortfolioOpt, reportlab, scipy, pandas, numpy, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps users analyze, optimize, and manage investment portfolios by providing detailed risk metrics, asset allocation strategies, and scenario simulations.

Core Features & Use Cases

  • Portfolio Analysis: Assess expected returns, volatility, and risk-adjusted performance metrics of a given asset mix.
  • Optimization Strategies: Generate optimized asset weights based on methods like maximum Sharpe ratio, minimum volatility, and risk parity.
  • Scenario & Stress Testing: Simulate portfolio performance in historical crises and future projections through Monte Carlo analysis.
  • Use Case: An investor wants to rebalance their holdings using AI-guided weightings and explore potential outcomes and risks across different market scenarios.

Quick Start

Use the portopt skill to input your current asset list, specify risk preferences, and generate a recommended portfolio allocation.

Frequently Asked Questions about portopt

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

FAQPage Schema
How do I optimize investment portfolios for maximum Sharpe ratio and minimum volatility?

Portfolio optimization for maximum Sharpe ratio and minimum volatility is achieved by fetching market data via yfinance and calculating optimized asset weights using the PyPortfolioOpt library.

What is risk parity allocation and how does scenario analysis work for financial modeling?

Risk parity allocation and scenario analysis are financial modeling techniques that simulate portfolio performance during historical crises and future projections using Monte Carlo analysis for comprehensive risk management.

Can I use this skill for portfolio stress testing with real market data from yfinance?

Yes, portfolio stress testing is supported by fetching real market data through yfinance, allowing you to simulate performance across historical crises and future projections for detailed risk assessment.

Do I need PyPortfolioOpt and reportlab to generate detailed portfolio analysis reports?

Yes, you need PyPortfolioOpt for calculating optimized asset weights and reportlab to produce detailed reports, alongside yfinance for fetching the required market data.

What's the best way to rebalance holdings using AI-guided asset allocation strategies?

The best way to rebalance holdings using AI-guided asset allocation is to input your current asset list, specify risk preferences, and generate recommended weightings based on risk-adjusted performance metrics.

Are there limitations when running Monte Carlo simulations for investment portfolio optimization?

Limitations of Monte Carlo simulations for investment portfolio optimization depend on the historical data fetched via yfinance and the mathematical constraints applied within PyPortfolioOpt for risk management projections.