We are here -- this is the end, btw -- in my GPT Prompt Series
- GPT Prompt 01 - Spending Strategy Comparisons
- GPT Prompt 02 - Lifetime Probability of Ruin (LPR)
- GPT Prompt 03 - Dynamic HJB Spend Optimization
- GPT Prompt 04 - Portfolio Longevity Heat Map
- GPT Prompt 05 - Perfect Withdrawal Rate (PWR)
- GPT Prompt 06 - Stochastic Present Value (SPV) <-- [this post]
- We are just valuing a cash flow over some interval, either fixed or life contingent,
- Rather than the discount rate being deterministic we are making the rate a random variable where the rate choice is a bit subjective [note 1]. That means unlike a single number result, as in an NPV calc, we end up with a distribution of results related to the randomness of the variable. That distribution has its own analytic virtues which I won't dwell too much upon,
- The "use case" for SPV in Retirement Finance is often found in a "feasibility" test or: is our current wealth sufficient to fund the expected cash flow. In this sense it is very much a Pension Risk tool in addition to being part of a retiree's dashboard or the "can I even..." go or no go flag,
- When the interval is life-contingent we are more or less pricing an annuity and the price of market annuities can be used to gauge feasibility just like SPV. In addition the annuity price can be used to monitor boundary conditions as retirement evolves (boundary monitoring is not in this post). I only have access to immediateannuities.com btw, and, importantly:
- We may be over complicating things by just a bit. In the end, just running a simple or actuarial balance sheet (the latter of which also values cash flow liabilities but deterministically. See Ken Steiner's site https://howmuchcaniaffordtospendinretirement.blogspot.com/ for the gold standard) is often good enough. We are not managing a pension fund,
- With SPV feasibility, we are saying something very very close to the fail metrics in a forward looking sustainability diffusion tools like Monte Carlo (MC) simulations,
- The cash flow itself can be stochastic...or a step function, or shaped up or down or a U or a hump, or whatever. Not in this post, tho.
- x is the number of iterations; N is a random lifetime process or a fixed horizon,
- npv(c) is random because the terms (especially D [the discount], N [a random lifetime process in years] and parts of Ct [the spend plan, similar to "c" above and Yarri's c(t); think inflation, random spending var, and maybe spend shocks]) are random,
- EV is the expected value but I think that extracting the Pth percentile is as or more interesting.
SPV answers a different question than PWR or LPR:
- “If I promise myself a given real consumption path, what is the distribution of the present value of that promise, once I admit that returns and lifetime are random?”
- What liability have I implicitly taken on?
For a given consumption plan (often normalized to 1):
Where:
: conditional survival from age to (Gompertz, first-year survival guaranteed)
-
: practical horizon (≈ age 120+)
-
Each Monte Carlo path produces one liability realization
After ~100k paths, you no longer have a PV — you have a distribution of liabilities.
Your Feasibility Equation:
This quietly replaces:
-
“Safe withdrawal rate”
-
“Monte Carlo success rate”
with:
“Do I meet my chosen solvency percentile?”
That’s actuarial thinking smuggled into personal finance
----- AI narrative end -----
The Prompt Itself:
Parameters are in blue
You are an expert in retirement finance and actuarial simulation.
Simulate the stochastic present value (SPV) of a real lifetime consumption stream using survival weighting.
Model setup
• Mortality: Gompertz distribution with modal age m=88, dispersion b=9.
• Condition on survival through the first year (i.e., p_1 = 1).
• Horizon: to age ≈121; survival ≈0 beyond that.
• Annual cashflow C_t = 1 (constant real dollars).
Discounting
• Real stochastic discount factors drawn from a lognormal process calibrated to match the arithmetic mean and standard deviation of:
• Mean real return \mu = 0.04
• Standard deviation \sigma = 0.12
• For each Monte Carlo path, compute cumulative discount factors
\text{DF}t = 1 / \prod{k=1}^{t}(1+r_k).
1. For each path i, compute
\mathrm{SPV}i = \sum{t=1}^{H} C_t\;{}t p{65}\;\text{DF}_{t,i}
where {}t p{65} is the Gompertz survival probability to age 65+t.
2. Run 100,000 Monte Carlo paths.
3. Produce:
• A summary table (mean, std, min, 20th, 50th = median, 80th percentile, max).
• A detailed percentile table (every 5 %).
• A histogram of the SPV distribution (present value per $1/year real).
- [1] the rate to be used for stochastic discounting has been hotly debated well before me. But remember, we are not a pension fund or a tenured professor and debate is a big fat "whatever" imo because I have different and personal incentives. One could use randomized bond or yield curve rates and move towards annuity pricing. Or one could use portfolio expectations for a risk based rate (lower's the liability and makes it look more feasible than it might be). Or go entirely off road...
- [2] in the Robinson and Tahani 2007 paper, Sustainable Retirement Income for the Socialite, the Gardener and the Uninsured, they have a banger of an appendix that shows the Ito inflected math that equates a forward diffusion's
fail rate probability with the stochastic present value (continuous time form here) feasibility condition. ie we are playing the same game going either way...more or less
You'd have to read that paper tho... Great on spending "shapes" too. Enjoy. - Contra the PWR prompt where the left tail was of interest, the right tail of SPV is now of interest. "What is the higher rates of liability I might encounter?" Me? I might look at the 80th or the 95th. Think again now in terms of success rates in some web based MC sim. That rate is never going to be 100%. We might feel comfortable, though, with 80 or 90 or 95%. It's a risk comfort thing and a policy choice when working with something like SPV.
- I noticed that there is some hard coding of params (e.g., age) in my prompt that I don't like.
- Note that the percentile results coming out of the prompt are in "annuity factors" and have to be multiplied by the expected current real lifestyle (eg 13.8(median) x $100000 = spv of 1.38M at the 50th percentile). I am also admitting here that were I to do a custom or shaped spend, the prompt would look very different and I might have overplayed how easy this would be to modify. If you are adept at this stuff it would not be that hard to modify for "spend shapes" I think. But then I have been wrong a few times on this blog so who knows.
- The inline text of the math is probably hard to read but Chat can render it pretty if you ask.
- Adjusting the prompt to a fixed horizon should not be that hard but I have not shown it. It does affect the distribution in ways I do not describe here.
- The prompting process seems unstable for each re-prompt and yields varying results and is also conditional on the platform. I used ChatGPT's $20/month platform "Plus." Fwiw, I also save a physical copy so that I can re-force AI to more or less start from scratch each time rather than trusting it to remember stuff.
- AI's hallucinate and you have to take output carefully and/or with a grain of salt,
- Chat may evolve and obsolete the prompts,
- It helps to know the underlying theory and methods to second guess what it is doing. Otoh, one can have a dialogue with Chat to figure it out,
- There are certain tasks ChatGPT will NOT do. For example, it said once that it could do HJB on 2-asset allocation optimization and then when I said "ok, now run it," it said "sorry, bro, can't; it's too hard and will time out." It later created an acceptable work around but one needs to know what it can and can't do. It probably just want's me to pay more,
- I did this prompt series more or less by the "seat of the pants" method so there might be assumptions Chat used for me during the many iterations that won't be resident in memory for you if you test drive. No idea...
- These are fairly trimmed down prompts and focus more on simple versions of the theory. No fine tuning for fees or taxes or investor idiosyncrasies etc but those are probably easy enough to retrofit,
- Rigorous testing against a previously coded model has NOT been done. I guarantee I have probably mis-prompted somewhere in here and I don't even know it.
No comments:
Post a Comment