Feb 5, 2026

GPT Prompt06 - Stochastic Present Value

 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]

When we say "Stochastic Present Value," all we mean is:
  • 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.

GPT Prompt05 - Perfect Withdrawal Rates

We are here 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) <-- [this post]
  • GPT Prompt 06 - Stochastic Present Value (SPV)

In 2015, Suarez, Suarez and Waltz, out of Trinity University, wrote a paper "The Perfect Withdrawal Amount: A Methodology for Creating Retirement Account Distribution Strategies" that describes the Perfect Withdrawal, the amount, with perfect foreknowledge of returns, that can be periodically taken from a portfolio over some interval (a life or horizon) and then end at some terminal boundary (say death) with zero dollars (or alternatively with a remainder bequest).  From the paper, the core math is this: 
where n is in their case a fixed horizon, ri... is a known sequence of returns and K(E) is a bequest and K(s) is the starting endowment. We can set K to zero in the no bequest case and we can also animate r via simulation while also making N a life contingent distribution of possibilities using actuarial math. That latter N thing was my innovation added onto Suarez by the way, it was not in the paper. That version can be represented more like this (Suarez writes it in accumulated-value form; I wrote it in discounted-value form):



Feb 4, 2026

GPT Prompt04 - Portfolio Longevity Heat Map

This may, in fact, be the least useful and perhaps the hardest to explain, in terms of its usefulness, of the miscellaneous prompts in my recent 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 <-- [this post]
  • GPT Prompt 05 - Perfect Withdrawal Rate (PWR)
  • GPT Prompt 06 - Stochastic Present Value (SPV)
My original goal in doing this type of exercise was to create a simple XY chart for (infinite horizon, not 30 years or "to 95") portfolio longevity (X axis) at "all" spend rates (Y axis) rather than just one. I thought it looked pretty cool but my quant-friend David: "why would you even do that? How is this used?" To which I might have said: "I have no idea, I just think it is interesting to behold the relationship between spending rates and portfolio-lives in all its glory, no real necessary functional use for a retiree." I mean, that's a little tongue-in-cheek, I will grant, but it is mostly true. The best I can say is that understanding how portfolio longevity (entirely unconstrained by years or terminal life or anything) responds to spending (all of them) and then understanding the sensitivity of portfolio longevity along its spend-path critical points is worth at least one minute or two of thought. Whether it improves retirement decision making is totally up in the air. This just falls into the category of "I wanted to see what it looked like" and here we are.  

GPT Prompt03A - HJB Spending Optimization

Fair warning: this was the most annoying prompt in history. I have almost never gotten this to replicate or work well or right twice in a row and my lesson was that the more specific I got the more it screwed up and the fixes it recommended just made things worse and worse until I was in a death spiral. My guess is that this kind of prompt will bedevil others, too. Backing up and keeping the prompt high level and letting it do it's own thing was better. A little black-boxy but at least one can interrogate.

So, here we go: this Post is my attempt to create a prompt for a formal Hamilton–Jacobi–Bellman approach to optimize retirement spending by age using backward induction and stochastic dynamic programing (the AI's job this time, not mine. I once did one of these in R-code but it took me a month, ran forever, and I was never sure if what I had was right or even close). This is consumption-only, btw, and I am not solving the joint consumption-allocation problem. I asked Chat once about that joint solution and it implied that it was maybe a little too computationally intensive to even bother. You can try, tho. 

In the context of my prompt-project this is where we are:

  • GPT Prompt 01 - Spending Strategy Comparisons
  • GPT Prompt 02 - Lifetime Probability of Ruin (LPR)
  • GPT Prompt 03 - Dynamic HJB Spend Optimization <-- [this post]
  • GPT Prompt 04 - Portfolio Longevity Heat Map
  • GPT Prompt 05 - Perfect Withdrawal Rate (PWR)
  • GPT Prompt 06 - Stochastic Present Value (SPV)

Feb 2, 2026

GPT Prompt02 - Lifetime Probability of Ruin (LPR)

Wait, isn't Lifetime Probability of Ruin (LPR) just another Monte Carlo retirement fail-rate thing? No, sort of but not really.  LPR is rooted in (or is) the Kolmogorov PDE for Life Probability of Ruin that I first saw in Milevsky's Seven Equations book.  Took me a while to figure it out, though. I once even taped the PDE on my fridge for an entire year to see if anything would sink in. Finally, at about the year mark, I had a dream where the coefficient of the 2nd term was spinning in a circle. I woke up and thought: "damn, I know what that is!" and I walked to my desk, coded it as a loop and holy crap it worked. Here is the 7 Equations version:


The epiphany on waking was that the "1" was a unit of consumption subtracted from a wealth process and that we were dealing with a mortality weighted infinite MC sim. After that it was a piece of cake. Plus I had the finite differences solution for the PDE above that Prof Milevsky had once sent me. Except for the wobble of simulation, the two solutions, mine and his, looked perfectly aligned.

Now, the reason I like LPR and why it is different from a standard MC fail-thingy is that the MC fail-thingy, which delivers a "probability of retirement ruin" number, under-imagines the real problem and disrespects the full scope of the idea. By that I mean, in Prof Milevsky's words, LPR considers the "full constellation of asset exhaustion possibilities" to infinity (not just an arbitrary 30 years) as well as the full term structure of mortality to infinity (not just 30 years or to age 95 tho in practice we might limit it to ~120 years of age total and the whole sim doesn't really need to go past about 100 or 200 years and any portfolios that survive to 100 or 200 are to be considered "forever" portfolios. I think I ended up using 100 back in the day but I see 200 below. Can't remember). MC sims usually elide themselves right past all this full composition stuff. Plus, note that compared to finite differences and PDE solutions we can also play around with non normal return distributions tho it is easier to not do that.

Here, btw, is where we are in this mini-series of Prompts:

  • GPT Prompt 01 - Spending Strategy Comparisons
  • GPT Prompt 02 - Lifetime Probability of Ruin (LPR) <-- [this post]
  • GPT Prompt 03 - Dynamic Programming / HJB
  • GPT Prompt 04 - Portfolio Longevity Heat Map
  • GPT Prompt 05 - Perfect Withdrawal Rate (PWR)
  • GPT Prompt 06 - Stochastic Present Value (SPV)

GPT Prompt01 - Consumption Utility Strategy Evaluation

I slaved for 12 years! in the mines of this blog, toiling night and day, for all three of my readers. My now ex gf during five of those years once accused me of loving retirement finance and my computer more than her ;-) something which I can neither confirm nor deny, then or now. 

Recently, just for fun and to see how it would go, I spent a couple hours recreating and recasting five or six of what I consider my sufficiently important or interesting coding projects into AI prompts <dramatic eye roll on all those wasted years>. I maybe should have waited for the advent of AI and saved myself at least some of those 11.999 years where I maybe didn't have to do anything. Or gone to a bar. Or traveled. Whatever, I thought I would share some of the prompts and projects here. To wit (each will be a separate post):

  • GPT Prompt 01 - Spending Strategy Comparisons [this post]
  • GPT Prompt 02 - Lifetime Probability of Ruin (LPR)
  • GPT Prompt 03 - Dynamic Programming / HJB
  • GPT Prompt 04 - Portfolio Longevity Heat Map
  • GPT Prompt 05 - Perfect Withdrawal Rate (PWR)
  • GPT Prompt 06 - Stochastic Present Value (SPV) 

Oct 17, 2025

A Note on a Portfolio Longevity Heat Maps

A friend of mine asked me once "what is even the point? How would you use this?" with respect to a heat map that I created for portfolio longevity for a whole slew of different spend rates (see below). First of all, when I first created it years back it wasn't really about functional utility at all for (my or others') retirement finance it was more just plain curiosity and, as is often the case for me, I wanted to see what it looked like. The looking was its own utility. Second, I kinda liked the eventual outcomes that became more evident the closer I looked: 

- Spending is almost certainly sustainable for 2% spend rates which effectively creates a perpetuity. This is a point about endowments that Ed Thorpe made in one of his books. 

- Spending somewhere near to or less than what one expects to earn or earns -- where the long run "earn" is going to be the geometric mean at N periods or maybe infinity -- has pretty good odds of lasting a very long time (maybe too long given our horizons but then again this is not a human scaled fail study). This is common sense, right? Higher spend works too but to an increasingly lesser and potentially painful degree as the "portfolio longevity years" come back into the meat of a human life scale. 

Oct 16, 2025

A Note on Lifestyle and Ensembles

 Ithaca, or maybe it was Lavinium, waits for thee.


"There are places where one arrives and feels: here I am meant to be, here I am whole. I had not known this place, yet it knows me, and I it, as if I had been born for its silence and its light." Rilke


Several years ago, before my recent brush with stage 3.99999 prostate cancer, I finally (finally! after six decades) was able to choose for myself a life -- lifestyle, location, focus, purpose -- that made a whole lot of sense to me.  This meant a little less quant and a little more right brain and active movement than I pursued in Florida. In practice all that means right now, in Montana, is stuff like: hike, lift, read, enjoy the landscapes, feed the cat, do some photography, take some western road trips, travel a little to see kids and gf, and so forth. And...less, but not zero, quant as a byproduct.


Oct 11, 2025

What I was up to last week

 You may have noticed that I have not been out here on the blog much for the last three years. This gap is from some combination of:

- I saw what I needed to see, I got a sense for the shapes of misc retirement models and math. Felt like I was more or less "done."

- Counterintuitively I do not use, as part of my regular monthly retirement management, the analytics I was building and putting out here for a decade. Too much work and there's no impending personal finance crisis (yet) and how many times can I run a model before I "get it" and it is all internalized anyway. I am a client of one!

- I was using my move to Montana as a big ol' inflection point: left brain stuff to right, sedentary to active etc etc. Basically now that I am here in the west it is only: read, hike, lift, and feed the cat. Not in the mood to code or do quant posts. I still respect my choice but this post is to describe some new things with which I was playing last week. 

Oct 10, 2025

Prostate Cancer Update

 The blog is not dead! and neither am I. Here are the cancer updates since before July:


1. I had surgery (Robot Assisted Laparoscopic Prostatectomy or RALP) at Mayo Clinic in Rochester MN on July 10 and carried a Foley catheter in Rochester until July 17th (oof). 

Apr 26, 2025

Reframing My Mortality Risk - Actuarial Chat with Grok

Or the proper subtitle: on why I am neither on death's door nor a superman -- where the implication might have been that I once thought myself a superman -- but now I think I am just an average American man...sort of. 

The following post* is a chat with Grok after I had a "prostate cancer genomic classification" test come back recently with a really bad and off-putting score. The purpose here was to contextualize for myself -- using my amateur actuary-sleuth blog past -- the received score (which said I had a 15 year expectation of mortality of 29.1%) and the concurrent two thoughts: 

1)  "holy sh*t, that's really high" and 

2) "hey, wait a second, isn't that new estimate pretty close to the actuarial expectation for, like, every man? ...isn't that more or less all of us, that is if we are not superman?"

This chat is bit long, a little repetitious, and a little esoteric. Some of the AI response-summary stuff below kind of get's to the point a little faster if you want to speed. The TL;DR is that my now "updated" (a bit of an abrupt update I must say) at-age-66 fifteen year mortality expectation from the diagnostic test is now maybe a little farther away from the healthy cohort (eg SOA IAM tables) that I thought I was in and now a lot closer to the US average (e.g., SSA longevity tables). This means that I am not nearly inside the looming dramatic death sentence it looked like at first i.e., the "reframe" path has been from: "I am super-duper healthy and I will live forever" to "near-death-gasp!" and then back to "I guess that this isn't really the end of the world yet, is it?" 

Without further set-up:

* And you thought this blog was dead, lol...


Feb 18, 2025

On Time and Memory, A Chat

I am snowed in today so I had a longish and not entirely unreasonable but not entirely un-critique-able chat with ChatGPT on Time and Memory in which we include topics like snow and touch on writers like Walter Benjamin, Walker Percy, Proust, St Augustine, Borges, Kafka, CS Lewis, Camus, etc. Some of the convo felt like standard pandering, regurgitative AI but it's not terrible and Chat was a good interlocutor on a snowy locked-in contemplative afternoon. Some guys have AI girlfriends, I have an AI book-bro.

My side is in blue, Chat is in black. 

Nov 9, 2023

Some context on my new life...

This is my valley. My house is just about right in the middle of that rain storm maybe 10-15 miles away (haven't looked the distance up).  It is not an unpleasant place to be. There is certainly more to do here than quant retirement finance. On this day I was taking advantage of that fact and hiking up a hill on the west side of the Bridger range. If we are all lucky there will be more posts like this and fewer like the last one ;-)




Nov 8, 2023

Uncertain Longevity Teased Out in a Couple Different Ways

 I thought I'd try this kind of thing again just for "fun."  Fun! ;-)  Heh. 

I've used a number of different evaluative frameworks over the years including fail rates/Monte Carlo, Lifetime Probability of Ruin, Perfect Withdrawal Rates (PWR), consumption utility, formulas, etc. A while back I took PWR (Suarez 2015) and feathered in random life time by way of Gompertz math that I used to take a random draw on terminal age consistent with a distribution tuned to actuarial tables. That was interesting and while I don't have my link handy I recall that I got some counter-intuitive results (misc measures of spend rates went up) due to the inclusion of the possibility of very very short lifetimes vs the typical "30 years" combined with the fact that long lifetimes will still be circumspect with respect to spending. 

This time I wanted to shake up the "PWR + random life" thing a little more. This was spurred by reading Huang et al 2011 which presented a way of randomizing force of mortality via diffusion process. Just out of curiosity I wanted to see what happened in a PWR context when doing that. (recall that PWR is the consumption rate that with perfect foreknowledge of returns would allow one to spend to zero over a given horizon.). After messing around with this a little too much for some very minor new info I had these various ways of shaking things up:

1. No shakeup, just PWR and 30 year horizon

2. PWR with a simple parameterized Gompertz derived distribution.

3. PWR with parameter uncertainty

4. PWR with parameter uncertainty - bias to the dispersion param

5. PWR with parameter uncertainty - bias to the mode param

6. PWR with a faked pseudo-chaotic nudge

7. PWR with stochastic force of mortality - lower sigma

8. PWR with stochastic force of mortality - higher sigma 

May 12, 2023

Into the Spend Zone...Again

The important role of uncertainty around expected lifetime in making plans for retirement consumption has been around for a while and has seemed, based on my n=1 read of the literature, to be something found more often in economics papers than in finance though I think that is changing. The pivotal role of this complicator became most manifest in Yaari (Uncertain Lifetime, Life Insurance and the Theory of the Consumer, 1965) which focused on optimal consumption and annuitization given random life among other things. 

"Wealth / Life Expectancy" as it Relates to Consumption Choice 

Subsequent papers over the years (e.g., Merton 1969, Samuelson 1969, Milevsky & Huang 2010, Irlam & Tomlinson 2014 among others) have made various heuristic conclusions that, due to the role of longevity uncertainty, a proxy for optimal consumption can sometimes devolve to "wealth divided by a measure of remaining life expectancy."

"Their [Merton and Samuelson] work also addressed consumption over the life cycle, and they were able to show that, under one particular set of reasonable assumptions[note 1 ... pay attention to the particularity], optimal spending each year could be approximately determined as current wealth divided by remaining life expectancy. Milevsky and Huang [2010] later demonstrated a similar result." [Irlam and Tomlinson, italics added] 

Mar 29, 2023

A Chat with ChatGPT on Spend Rates

I had a chat with ChatGPT(3?) on spend rates. I just wanted to check out what it said. Basically it was cagey, conservative, and disclaimer heavy. I also had to challenge it a bit. Not sure if I could walk up to the prompt and trust what it said. My guess is that in a few years, everything I learned from this blog will be moot but maybe not. Interesting resource.

Here is the chat. I have a comparative chart at the end. Not sure how much fidelity there was to what I got from Chat but then I was moving pretty fast.

Mar 19, 2023

Another, and Likely Last, Look at Backward Induction SDP for Spend Rates

My fin-bro David chastises me for sandbagging in my blog but in this post you must take everything after this sentence with a big fat grain of salt. I have no idea if what I am doing here is either correct or legit and the fact that it looks like it works in the end is pretty much dispositive of zip. Plus my notation is sketchy.

Two years ago I tried to do this thing where I inferred optimal spend rates by working backwards from the end of a 30 year interval and used the results of a value function in the last period to help figure out what to spend in the period just prior and then on to the beginning. This is called backward induction and stochastic dynamic programming and is often described as Bellman equations if I have it right. 

Sorta worked then. I went back a week ago to look at my code and I noticed two things: 1) I had no idea what the code was doing, and 2) there were some coding errors. Those two things, combined with incipient dementia (kidding), caused me to decide to exercise my brain and try this again. Silly me. There is no real purpose other than do it and what I noticed in the re-try is that it's a lot of work for results one can get from easier and simpler methods: the juice is probably not worth the squeeze. 

Feb 7, 2023

Some Random Notes on my Nth Read of Yaari '65

I've been through this paper --  Uncertain Lifetime, Life Insurance, and the Theory of the Consumer, Menahem E. Yaari 1965 -- maybe 10 times now. I've done this because it was a seminal paper and and it frames the lifecycle dynamics of the retirement problem well in quantitative terms and it is a good read with some sly comments here and there.  Most decent finance papers that go beyond simple finance and into econ and actuarial topics either do or should reference it. Here are some stray thoughts on my 10th (or so) read.

< with some corrections 2/8 >

Dec 19, 2022

Supplement to past couple posts on asset allocation, risk aversion, and horizon

This is an add on to the past cpl posts. Assumptions are the same except where called out. The past two posts are here: 

 Again, 

  • No spending 
  • Still centered on a CRRA style evaluation at fixed horizons
  • Human Longevity not in this post at all
  • Assumptions mostly as in first bullet pt. link above

Dec 15, 2022

Asset Allocation, Certainty Equivalents and Time Horizon

This is a follow on to the last post 

   - Asset Allocation and Risk Aversion in a No Consumption Model


and the only change here is the following 
  •  The risk aversion coefficient is pegged at "2," for reasons
  •  The horizon is now varied: 10y, 20y and 50 years
With the goal: see what happens to "optimal" certainty equivalent wealth by way of asset allocation at each horizon, keeping in mind my version of "optimal" is not mathematical but a visual shoot-from-the-hip guess. This guess will be poisoned by scaling of the Y axis but so be it. Just winging it here.