portfolio-backtest

Backtest fund portfolios from holdings Excel files using iChoice NAV data.

Updated Jan 25, 2026
One-click install
npx skills add https://github.com/xfs96192/claude-config --skill portfolio-backtest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: portfolio-backtest
Source: https://github.com/xfs96192/claude-config/tree/main/skills/portfolio-backtest
Command: npx skills add https://github.com/xfs96192/claude-config --skill portfolio-backtest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, matplotlib, openpyxl, and includes scripts (resource) components.

What problem does it solve?

This tool automates end-to-end backtesting of fund holding portfolios by reading user-provided Excel files, aggregating holdings across accounts, retrieving adjusted NAVs via iChoice, constructing a weighted portfolio, and generating charts, Excel reports, and Markdown analyses.

Core Features & Use Cases

  • Reads a standardized holdings Excel, merges holdings by fund code, and filters tiny positions.
  • Classifies assets into major categories (货币基金, 纯债, 固收+, 权益-A股, 权益-港股, 权益-美股) and outputs breakdowns for decision-making.
  • Fetches adjusted NAV data for each fund (fallback to UNITNAV when needed) and builds a historical NAV panel for backtesting across up to 10 years.
  • Produces comprehensive outputs: chart image, Excel report, and Markdown report, with consideration of inception dates and NAV delays.

Quick Start

Provide your latest holdings Excel file path and run the analysis to generate portfolio backtest outputs.

Frequently Asked Questions about portfolio-backtest

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

FAQPage Schema
How do I backtest a fund portfolio from an Excel holdings file?

Portfolio backtesting from Excel reads your holdings file, aggregates positions by fund code, fetches adjusted NAVs via iChoice, and outputs a performance chart, Excel report, and Markdown summary.

What is portfolio backtesting with adjusted NAVs and how does it work?

Portfolio backtesting with adjusted NAVs fetches historical fund data, constructs a weighted portfolio considering inception dates and NAV delays, and produces performance charts and reports.

Can I use this portfolio backtest for personal finance fund selection across multiple accounts?

Yes, portfolio backtesting supports personal finance research by merging holdings across multiple accounts from an Excel file, filtering tiny positions, and classifying assets into categories like equity and fixed income.

Does the portfolio backtest handle missing NAV data for certain funds?

Yes, the portfolio backtest provides robust handling for missing NAV data by falling back to UNITNAV when adjusted NAV is unavailable, ensuring continuous performance analysis.

Do I need Python data libraries and iChoice integration to run the portfolio backtest?

Yes, running the portfolio backtest requires Python data libraries including pandas, numpy, and matplotlib, plus the ichoice-data integration to fetch adjusted NAVs for analysis.

What asset categories does the portfolio backtest classify holdings into?

The portfolio backtest classifies holdings into major categories like money market funds, pure bonds, fixed income plus, and equity across A-shares, Hong Kong stocks, and US stocks for breakdown analysis.