portfolio-analytics

Analyze portfolio equity curves to compute return, risk, and risk-adjusted metrics.

266|54|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill portfolio-analytics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: portfolio-analytics
Source: https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/portfolio-analytics
Command: npx skills add https://github.com/agiprolabs/claude-trading-skills --skill portfolio-analytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, quantstats, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive analysis of investment portfolio performance, transforming raw equity curves into actionable insights and investor-ready reports.

Core Features & Use Cases

  • Performance Metrics: Calculate total return, CAGR, Sharpe ratio, Sortino ratio, maximum drawdown, and more.
  • Risk Assessment: Quantify volatility, Value at Risk (VaR), and time spent underwater.
  • Reporting: Generate monthly return tables and integrate with quantstats for detailed HTML reports.
  • Use Case: After backtesting a trading strategy, use this Skill to generate a full performance report, including risk-adjusted metrics and a monthly return heatmap, to evaluate its viability.

Quick Start

Analyze the equity curve data in 'equity.csv' using the portfolio-analytics skill.

Frequently Asked Questions about portfolio-analytics

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

FAQPage Schema
How do I calculate risk-adjusted performance metrics like Sharpe ratio and maximum drawdown from an equity curve?

To calculate risk-adjusted performance metrics from an equity curve, this Skill computes total return, CAGR, Sharpe ratio, Sortino ratio, and maximum drawdown. It transforms raw equity data into actionable insights for evaluating investment portfolio performance.

How do I generate a quantstats HTML report for my backtested trading strategy?

To generate a quantstats HTML report for a backtested trading strategy, this Skill integrates directly with the quantstats library. It processes your equity curve to produce detailed HTML reports containing performance metrics, risk assessments, and monthly return tables.

What financial risk metrics can I compute for portfolio analysis using pandas and numpy?

For portfolio analysis using pandas and numpy, you can compute volatility, Value at Risk, and time spent underwater. This Skill leverages these dependencies to quantify risk metrics and generate rolling statistics from your equity curve data.

Does this portfolio analysis approach support monthly return tables and drawdown analysis?

Yes, this portfolio analysis approach supports monthly return tables and drawdown analysis. It processes equity curves to calculate maximum drawdown, time spent underwater, and monthly returns, providing a comprehensive view of investment performance.

Can I use this Skill to evaluate the viability of a trading strategy after backtesting?

Yes, you can use this Skill to evaluate the viability of a trading strategy after backtesting. It takes your equity curve data and generates a full performance report, including risk-adjusted metrics and a monthly return heatmap, to assess investment viability.