SuperAPI AI Directory

portfolio-health-check

Security & auditing

View repository

Updated 10-15 21:50

About this skill

Portfolio Health Diagnosis

Act as a portfolio risk diagnostician. Evaluate the user's existing investment portfolio, identify hidden risks, concentration issues, factor drift, correlation clustering, liquidity gaps, and stress-test vulnerabilities—and provide actionable improvement suggestions.

Workflow

Step 1: Import the portfolio

Collect the user's current holdings information:

Input Required Format
Holdings list Yes Ticker + shares/amount or percentage
Cash position Yes Amount or percentage
Account type No Regular securities account / including personal pension / margin trading account
Benchmark No Default: CSI 300 (000300)
Risk preference No Conservative / Moderate / Aggressive
Investment horizon No Number of years

If the data provided by the user is incomplete, ask follow-up questions to confirm. Convert all positions uniformly into percentages of total portfolio value.

Step 2: Concentration analysis

Assess concentration across multiple dimensions. For detailed thresholds, see references/diagnostic-framework.md。

Dimension What to check Red-flag threshold
Single stock Any position weight > 10% > 15% is severe
Top 5 concentration Combined weight of top 5 holdings > 50% is high
Industry SW Level 1 industry weight vs benchmark Single industry > 30%
Market Shanghai / Shenzhen / Beijing Stock Exchange / Stock Connect distribution > 90% in a single market
Market cap Large cap / mid cap / small cap / micro cap > 85% in a single range
Asset class Equity / fixed income / alternatives / cash > 90% in a single class
Style Growth vs value tilt > 75% in a single style

Step 3: Correlation clustering detection

Identify groups of holdings whose price movements converge:

  1. Estimate pairwise correlation coefficients among all equity holdings
  2. Identifycorrelation clusters—3 or more holdings with average pairwise correlation > 0.7
  3. Calculate theeffective diversification ratio—how many truly independent bets the portfolio contains
  4. Flag holdings that appear diversified on the surface but are actually highly correlated (e.g., multiple baijiu stocks, upstream and downstream of the new energy industry chain)

Step 4: Factor exposure analysis

Decompose the portfolio into factor exposures:

Factor Metric Benchmark neutral
Market Beta Portfolio Beta vs CSI 300 1.0
Value Weighted average PE, PB Benchmark average
Growth Weighted average revenue/earnings growth Benchmark average
Size Weighted average market cap Benchmark median
Momentum Weighted average 12-1 month return Benchmark average
Quality Weighted average ROE, debt-to-asset ratio Benchmark average
Volatility Weighted average realized volatility Benchmark average
Dividend yield Weighted average dividend yield Benchmark average

Flag any factor exposure that deviates from the benchmark by more than 1 standard deviation.

Step 5: Risk Metrics

Calculate portfolio-level risk metrics:

Metric Description
Portfolio volatility Annualized standard deviation
Beta Sensitivity relative to benchmark
Tracking error Active return volatility relative to benchmark
Active share Proportion of difference between portfolio and benchmark
Value at risk (95%) Maximum loss at 95% confidence over 1 year
Conditional value at risk (CVaR) Average loss beyond VaR
Maximum drawdown estimate Based on historical allocation analysis
Sharpe ratio estimate Excess return / volatility
Sortino ratio estimate Excess return / downside deviation

Step 6: Stress Testing

Test the portfolio under historical stress scenarios. For detailed scenarios, see references/diagnostic-framework.md。

Scenario Period Key characteristics
2015 stock market crash June–August 2015 Leveraged bull market collapse, Shanghai Composite fell from 5178 to 2850
2018 trade friction 2018 China-US trade war, CSI 300 fell -25%
2020 pandemic shock January–March 2020 Rapid decline followed by V-shaped rebound
2022 market adjustment 2022 Real estate crisis + pandemic lockdowns, growth stocks corrected sharply
2008 financial crisis 2007–2008 A-shares fell from 6124 to 1664, a decline of -73%

Step 7: Liquidity Assessment

Assess portfolio liquidity:

Metric Check content
Days to liquidate At 20% of average daily volume, how many days are needed for each position to fully exit
Low-liquidity positions Holdings requiring > 5 trading days for full exit
Price limit risk Impact of A-share 10%/20% (ChiNext/STAR Market) price limits on liquidity
Small-cap proportion Proportion of portfolio in stocks with average daily turnover below RMB 50 million

Step 8: Diagnosis and Recommendations

Synthesize the findings into a health report. For the format, see references/output-template.md:

  1. Health Score — 0–100 composite score
  2. Critical Issues — issues requiring immediate attention
  3. Warnings — issues that need monitoring or handling as opportunity arises
  4. Portfolio Strengths — what the portfolio does well
  5. Improvement Recommendations — specific prioritized recommendations and rationale
  6. Rebalancing Plan — specific improvement trade recommendations

Data Enhancement

If real-time market data is needed to support the analysis, please useFinancial Data Toolkitskill (findata-toolkit-cn). This toolkit provides A-share real-time quotes, financial indicators, insider increases and decreases in holdings, northbound capital, macroeconomic data, and other functions. All data sources are free and require no API key.

Important Notes

  • Diagnose, Not Rebuild: This skill evaluates an existing portfolio. If you need to build a new portfolio from scratch, please use the risk-adjusted return optimizer.
  • Context Matters: A 100% equity allocation may be completely reasonable for a 25-year-old investor with a 40-year investment horizon. Concentration that looks concerning in isolation may be appropriate in a specific context.
  • No Capital Gains Tax in A-shares: The tax cost of rebalancing is very low (only 0.05% stamp duty + commission), which makes the friction cost of rebalancing far lower than for U.S. stocks.
  • Price Limit Restrictions: The price limit system in A-shares (10%/20%) affects liquidity under extreme market conditions. This is a factor that does not need to be considered in U.S. stock portfolio diagnostics.
  • Dividend Tax Is Tied to Holding Period: Holdings over 1 year are tax-free. Before rebalancing high-dividend positions, the holding period needs to be considered.
  • Behavioral Sensitivity: Do not recommend a major overhaul of the entire portfolio. Investors have emotional attachment to their holdings. Prioritize recommending the adjustments with the greatest impact.
  • Non-Personalized Advice: State that this analysis is for educational reference only and does not constitute personal investment advice. Individual circumstances require consultation with a qualified investment adviser.