SuperAPI AI Directory

portfolio-review

General & other

View repository

Updated 10-16 01:05

About this skill

Codex adapter note

This skill is generated from skills/portfolio-review.md so Claude Code and Codex users share one canonical workflow.

  • Treat $ARGUMENTS as the user's request in the current Codex thread.
  • When the source mentions Claude-only surfaces such as Task, Agent, WebSearch, Bash, Read, or Write, use the closest Codex capability available in this session: subagents when available, web search when needed, shell commands for local tools, and normal file edits for workspace files.
  • Use shared project tools from tools/ in this repository. Prefer running commands from the repository root with paths like python3 tools/financial_rigor.py ...; if the current thread starts outside the repo, locate the actual checkout path first instead of assuming a fixed home-directory path.
  • Before starting research, run the date command to confirm today's date; treat it as the baseline for "latest" data and state the data cutoff date in the report header. Never assume the current date from training data.
  • Preserve the research quality rules from AGENTS.md: cross-check financial data, use exact arithmetic tools for valuation/math, and clearly label uncertainty and source gaps.
Portfolio management: from "researching companies" to "managing a portfolio"

Perform a portfolio review and optimization for $ARGUMENTS.

Supported input formats:

  • Holdings list, for example:腾讯30%, 美团20%, 茅台20%, 英伟达15%, 现金15%
  • Or:腾讯 500股 @480港元, 美团 1000股 @130港元, ...
  • Or:我的持仓(If there is already a saved portfolio file reports/portfolio-latest.md)

"Diversification is protection against ignorance. It makes little sense if you know what you are doing." — Buffett

"The truly good investment opportunities I've seen in my life can be counted on ten fingers." — Li Lu

Design philosophy

Researching companies is only half of investing. The other half isportfolio-level decisions:

  • How much to buy? (position size)
  • With what money to buy? (source of funds—new money or switching positions)
  • Does it conflict with existing holdings? (correlation)
  • What does the optimal portfolio look like? (opportunity cost)

Buffett never looks at a single stock in isolation—he is always thinking, "Is this the best thing I can do?"

Execution process

Step 1: Parse holdings

Parse the current holdings from the input, standardizing them into the following format:

Security Ticker Position size Cost price Current price Market value Weight P&L

If the input only has percentages and no amounts, just analyze by percentage.

Also check whether an existing portfolio file exists (reports/portfolio-latest.md), and if so, read and update it.

Step 2: Obtain the latest data

Use the Task tool to launch a background Agent, and via WebSearch obtain in parallel for each holding:

  1. Current stock price and valuation metrics (PE, PB, dividend yield)
  2. Key financial changes in the most recent quarter
  3. Recent major events
  4. Analyst consensus expectations (forward PE, target price)

For each holding use tools/financial_rigor.py verify-valuation to validate valuation data. Label each holding's information richness (Grade A/B/C), and mark the analysis conclusions for Grade C holdings as low confidence.

Step 3: Single-position checkup

Perform a quick health check on each holding:

Security Current PE Has the buy thesis changed Thesis health Position recommendation
Tencent 18x Unchanged 8/10 Reasonable
Meituan 25x Intensified competition 6/10 Too high, consider trimming

For each holding answer:

  • If you had no position today, would you still buy at the current price?
  • If you could not trade tomorrow, would you be comfortable holding for 5 years?
  • Is the buy thesis still intact?

Duan Yongping: "If you don't want to hold a stock for 10 years, then don't hold it for even one day."

Step 4: Portfolio-level analysis

4.1 Concentration analysis

Metric Current value Recommended range Judgment
Largest holding weight <40%
Top three holdings proportion 50-80%
Total number of holdings 5-15
Cash proportion 10-30% (depending on market conditions)

Li Lu's standard: 3-5 core holdings, top 3 account for 80%+.But this requires thorough research on each one.

Buffett's standard: No more than 10 core holdings, but more satellite positions are allowed.

4.2 Correlation Check

Identify hidden connections between holdings:

Holding A Holding B Correlation type Risk
Tencent Kuaishou Both belong to China internet Regulatory risk resonance
NVIDIA TSMC Upstream and downstream of the AI supply chain AI Capex fluctuates in the same direction
Meituan Pinduoduo Both belong to Chinese consumption Macro consumption fluctuates in the same direction

Checklist:

  • Is more than 50% of the position exposed to the same theme/industry?
  • Is more than 50% of the position exposed to the same country/currency?
  • If China-US relations deteriorate, how much will the portfolio lose?
  • If the global economy enters recession, how much will the portfolio lose?

4.3 Opportunity Cost Analysis

This is Buffett's most core way of thinking—every dollar should be placed where the return is highest。

Rank all holdings by "expected annualized return":

Rank Security Current proportion Expected annualized return Certainty Expected return × certainty
1
2
...

Expected return estimation method (calculated using tools/financial_rigor.py three-scenario ):

  • Simplified formula: Expected annualized ≈ FCF Yield + expected growth rate (main method)
  • Value-type verification: margin of safety reversion + profit growth + dividend yield
  • Growth-type verification: profit growth × change in reasonable PE

Key question: Is the expected return of the lowest-ranked holding higher than cash (risk-free rate ~4%)? If not, it should be sold and converted to cash.

4.4 Stress Testing

Scenario Assumption Estimated portfolio impact Maximum drawdown
Global recession Corporate earnings decline 20-30%
China-US conflict escalates China concept stocks discount 50%
Interest rates soar 10-year Treasury → 6%
Tech bubble bursts Tech stock PE compresses 40%

Conduct qualitative + rough estimate assessment for each scenario (based on the industry attributes and historical valuation fluctuation range of each holding):

  • Which holdings are hit the hardest? Approximate direction and magnitude range of impact
  • Can the portfolio as a whole withstand it?
  • Is hedging needed?

Step Five: Optimization Recommendations

5.1 Position Adjustment Recommendations

Based on the above analysis, give specific position adjustment recommendations:

Action Security Current allocation Suggested allocation Reason
Increase position
Reduce position
Close position
Open new position
Hold

5.2 Finding substitute targets

If the portfolio contains positions that are "worse than cash," or if the cash allocation is too high, it is recommended to use /industry-research or /investment-checklist to systematically screen industries/companies of interest, rather than directly recommending individual stocks within this Skill.

5.3 Cash management

Current cash allocation Suggested cash allocation Reason

Buffett: Currently holds $382 billion in cash, more than 25% of total assets — when no good opportunities can be found, cash is the best position.

Step 6: Output the portfolio report

Report structure

一、组合概览(持仓表格+饼图描述)
二、单仓位体检(每个持仓的健康状态)
三、组合分析
   - 集中度:是否过度分散/集中?
   - 相关性:隐性关联和风险共振
   - 机会成本:排名最低的仓位是否值得持有?
   - 压力测试:极端情景下的回撤预估
四、调仓建议(具体操作+理由)
五、下次审视时间和关注重点

The conclusion must clearly answer

  1. Overall portfolio health: Excellent / Good / Needs adjustment / Serious problems
  2. What is the single most important thing to do?(Increase position in X / Reduce position in Y / Hold)
  3. What is the biggest current risk?

Step 7: Save the portfolio file

Write the portfolio information into reports/portfolio-latest.md, including:

  • Latest holdings table
  • Date and conclusion of this review
  • Adjustment records (append)
  • Next review reminder

Key principles

  • Every dollar has an opportunity cost — Holding a mediocre stock costs you missing out on an excellent one
  • Concentration is not risk, ignorance is — Holding 3 stocks you deeply understand is safer than holding 30 you only half understand
  • Cash is a position — When you can't find good opportunities, holding cash is nothing to be ashamed of
  • Portfolio level > individual stock level — A good stock in the wrong position can still drag you down
  • Review regularly, but do not overtrade — Reviewing once a quarter is enough; do not watch the market and adjust positions every day