skills/portfolio-cashflow-modeling/SKILL.md
Use when 需要计算/解释投资组合的年化收益率、月度现金流与长期(如30年)资产路径,且包含固定支出与不确定收入(自由职业波动、随机收入、回款集中)并需要给出耗尽概率与分位数(P10/P50/P90)
npx skillsauth add Leo-stone-dot/my_life_agent portfolio-cashflow-modelingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
核心原则:先定口径与假设,再算;能解析就别假装模拟;声称“跑了蒙特卡洛/查了统计均值”必须有可复现证据。
Uniform(0,5000)、自由职业“项目期/空窗期”、回款集中、断档。自然到账现金流:利息/分红/到期兑付(不卖出资产)。提取现金流:为满足支出而赎回/卖出资产(净值会下降)。rm = (1+R)^(1/12)-1。组合年化(期望)永远先写成:
R = Σ(w_i * r_i),并列清 w_i 与 r_i 的来源(历史窗口/期望值/产品年化)。
用月度递推表达清楚模型(默认月末发生支出/收入):
A_{t+1} = A_t * (1 + rm) + income_t - spend_t
耗尽判定:若 A_t <= 0,记为“触底/耗尽”。
推荐先给“可解释、可校准”的模型,而不是凭感觉:
当且仅当需要分位数/耗尽概率、且解析推不出时使用。
最低复现要求:
N(建议≥10,000)seed目标:让 30 年末余额接近某个值(例如 50万)。
f(E) = median(A_T(E)) - target(或用 P10 更保守)E。以下示例用于“固定收益 + 收入随机”场景;真实使用时替换参数:
import numpy as np
def simulate(A0, R, spend, years, N=20000, seed=42,
income_low=0, income_high=5000):
rng = np.random.default_rng(seed)
rm = (1 + R) ** (1/12) - 1
T = years * 12
A = np.full(N, A0, dtype=float)
depleted = np.zeros(N, dtype=bool)
for _ in range(T):
income = rng.uniform(income_low, income_high, size=N)
A = A * (1 + rm) + income - spend
depleted |= (A <= 0)
A = np.maximum(A, 0)
q10, q50, q90 = np.quantile(A, [0.1, 0.5, 0.9])
p_deplete = depleted.mean()
return p_deplete, (q10, q50, q90)
development
Transforms vague or ill-defined questions into clear, structured, and actionable "good problems" by extracting the core objective, identifying comparison dimensions, and applying structured reasoning. Use when a user wants to compare multiple options, evaluate trade-offs, make a decision between alternatives, or asks questions like "which is better", "pros and cons", "help me decide", "how should I choose", or "what are the trade-offs". Produces a rewritten problem statement with explicit comparison dimensions, a structured evaluation framework, and a decision-ready output format.
research
为给定问题挑选“最适合回答的人”的专家角色,并用该角色给出回答(含选择理由与行动清单)
documentation
读者价值审计 + 最小改写:逐段识别“解决读者问题(A)”与“展示作者(B)”,按信息量加权给占比,并将 B 段落改写为服务读者的可替换版本。 适配长文(可分批处理),强调不新增事实、尽量不改含义与语气。
data-ai
去除文本中的 AI 生成痕迹。适用于编辑或审阅文本,使其听起来更自然、更像人类书写。 基于维基百科的"AI 写作特征"综合指南。检测并修复以下模式:夸大的象征意义、 宣传性语言、以 -ing 结尾的肤浅分析、模糊的归因、破折号过度使用、三段式法则、 AI 词汇、否定式排比、过多的连接性短语。