Kunstkammer

Kunstcammer - a cabinet of curiosities.  I try to fill mine with my own weird retirement finance objects that I have created or found:


1. My Monte Carlo simulator. I have no credits to anyone but me on this.  This is an Rscript sim I scrabbled together from an earlier version I had pulled together in Excel. It does some cool things like letting terminal age vary with SS tables, gompertz math, fixed ages, etc.  Also I put some time into spending variance with things like random spend shocks, brownian trends in spend, spend step functions by age, random spend variance - skewed or normal, etc. I also have a table based on backward induction optimization that allows a dynamic allocation process. There are other things like return regimes, CRRA utility (sorta), omega ratio for retirement analysis, and cumulative geometric returns and sd per sim life.  The variations on flexibility are essentially infinite.    There are a bunch of links but here are two:

2. Backward induction engine using stochastic dynamic programming for optimizing asset allocation. I took up some hints from Gordon Irlam in a paper he wrote on how to do this.  The challenge was high, the results were ok and were lightly validated by Mr Irlam.  This was a fun project and pushed the boundaries for me and gave me a tool that has some academic-economic throw-weight. I got some insights from this that I find both counter-intuitive and usable. Here is at least a couple links:

3. Script for evaluating both geometric returns over time and geo returns with spending present.  The math was originally picked up at earlyretirementnow.com though it appears elsehwere. The script shows visually the process of how arithmetic returns suffer a bit when put into a multiperiod process in the presence of volatility with more volatility doing more damage over time.  Adding spending makes it even more interesting and more or less like a simulator.  An interesting side effect is that one can see the crossover point or the exact point in time where a high return high vol asset will produce the same or less value than one with slightly lower return but lower volatility. That is not a new concept. R. Michaud had a paper on this same thing, I just can put my finger on it right now.  This would probably be a good teaching tool if I were a teacher.  The same math can be adapted to calculate "perfect withdrawal rates" as well. See the next item.

4. Perfect Withdrawal Rates but now with stochastic longevity.  Adapting the code from #3 and taking up a challenge from a paper I read in the summer of 2017, I do the following: a) solve (or "set up") the equation from above for the withdrawal rate that would have been "perfect" or rather "the maximum withdrawal rate possible over a fixed period of time if one had perfect foresight of investment returns," b) iterate it x,000 times to breath some random volatility into it, and c) each iteration I solve the equation for a different number of periods that are fitted to Gompertz distribution with Mode = M and dispersion = b.  The results compare well to both Monte Carlo simulation and a Kolmogorov partial differential equation.  Note also that the math can be used to visualize sequence of returns risk both when looking at the composition of the equation directly and also looking at the distribution of withdrawal rates that result from simulation.


5. Partial Differential Equation for retirement ruin probability.  Borrowed from someone else's spreadsheet (there is no chance I could have pulled it off myself) after some correspondence with Prof Milevsky, this is a finite differences solution to a Kolmogorov equation for retirement ruin.  I ported the VBA code to R to be able to understand the math and the process, an effort at which I was only partially (no pun intended) successful. On the other hand it is much easier to "see" the equation and what it means now.  The link tells why I find this to be a high utility adjunct to other analysis I might do.

6. Collected Formulas.  As I read and experiment and play I pickup some of these things as I go.  If it is something cool or useful I add it. It is also interesting to see how and where similar things show up which gives a better synoptic sense of what is going on in the ret-fin space

7. Mean Variance Mapper.  I won't call this an optimizer because optimizers seem to be a dime a dozen these days.  That, and there is a massive amount of estimation error implicit in the process. Others have attempted to deal with that estimation problem in a number of ways. The one I am thinking about is the Michaud re-sampled frontier.  I tried a little of that  but didn't get too far, partly because it is hard and partly because it sometimes seems pointless.  For retirees, proper allocation is important, yes, but when you look at it in a multi-period context with consumption present, then spending (as one example) takes on a much bigger part of the picture than allocation where within a broad range of something like 40-70% equity allocation there is relatively muted impact.  What i use the mapper for is for evaluating systematic alt risk strategies against a portfolio of 5 ETFs over some relatively recent timeframe (maybe 36-60 months).  That means I am looking backward not doing forward-optimization.  This is easier.  Except when deciding on the exact parameters (i.e., you can sometimes get away with using compound returns here where Markowitz properly insists on arithmetic when estimating forward.). Standard devs get hairy too. If you are using short frequency data (monthly, say), then there are more problems than you think there are in projecting that to a different horizon (yearly, say).  I gave up trying to decide and coded my mapper so all the choices were available to me as seems fit.  Oh, and I did all this so I wouldn't have to pay someone for the software. That was the best part.

8. FRET (flexible ruin estimation tool) for Lifetime Risk of Ruin.  In working trying to understand the Kolmogorov equation for lifetime risk of ruin, a task that was barely if at all successful, it dawned on me that if I joined two probability functions -- one for the probability of still being alive in some year and one for the probability of a net-wealth-process fail within that lifetime -- I could get really close to the same result as the Kolmogorov equation.  So I did.  Written in R October 2017.  This was done mostly just to see if I could do it but there is also some incremental analytic utility.  The transparency of the assumptions and the process that is being modeled is high and it provides a good visualization of the real world problem at hand.  It is also quick and the code is extremely short and simple.  A description in more detail is here.  The Rivershedge version of the notation is this where the first term is a pdf for portfolio longevity in years and the second term is a weighting factor based on conditional survival probability:


9. Free Boundary Process Approximator.  This uses the same setup as #8 except here it looks at the dispersion of future portfolio (in wealth units) values over time and maps that against an estimation for the cost of opting out of "self annuitization" with an SPIA (for the 1 unit of spend) or alternatively using SPIA pricing (plus a buffer) as a proxy for the free boundary between a feasible and infeasible balance sheet. This is a prototype and might be developed more later.    A brief description is here. The following is fake notation (fake because I am not a mathematician and this is not quite right except that I get what it is trying to do even if you don't) for the concept



The left side represents either a portfolio value (end of year after returns and spending) or a similar net wealth "process" when it is animated through simulation by randomizing mu and where the 20th percentile of the resulting distribution in some year is the value of interest. The right side is either the value of an annuity with a load factor times a buffer zone percentage or it is the same thing projected out over the same number of years as one would simulate the left side. mu is a return variable that is randomized, w is wealth units in terms of (1/spend). iPx is a cash flow weighted by a conditional survival probability, R is an annuity discounting rate. l is the annuity load and z is buffer zone percent, say 10%. Someday I'll get someone to tell me how to do the notation the right way.

10. Simulator - Stochastic Present Value of a Spend Liability. Rather than using a simulator that calculates retirement ruin probabilities by projecting (constant?) spending and randomized portfolio returns into an ersatz and unknowable future, this tool works within the context of a household balance sheet -- where asset values are (mostly) known with certainty -- to estimate the present value of a spend liability as a distribution rather than as a deterministic object.  This is done by taking the current-time dollar spend amount, along with a custom-designed spend path based on expectations about forthcoming spending in the future, and then simulating that plan out by: a) randomizing the simulated lifetime duration using Gompertz math for mortality probabilities, and b) chaining spending along with randomized inflation, the planned discontinuities, and randomized spend volatility. Then the simulated series is discounted back to the present (discount rates are not yet randomized but might be) and summed. The resulting distribution of NPVs can be used to select a value for the balance sheet liability just like one would have with deterministic PV (except here we have more choices: mean, median, pth percentile, whatever).  In addition, the current assets that are available to fund, if not entirely defease, the liability can be located on the dollar spend distribution in order to estimate a type of probability of success. Since discount rates are a policy choice if they not randomized into the SPV, here it is set up as an input variable designed to test ranges and sensitivities, though this may be changed later.  Some posts on the SPV sim are  hereherehere, and here.  A second version of the SPVsim uses the same methodology but also projects the SPV to future ages by inflating the start-spend to the future age based on budgeted inflation expectations, updating the mortality probability distribution for the projection age and then running the SPVsim again for that age.

11. My Life-cycle Retirement Game in Excel for a 25 year old.  See the page here.

12. The Wealth Depletion Time Game in Excel for a 60 year old.
I've been playing around recently with a financial econ concept called "wealth depletion time" (this is the span of the late planning horizon where wealth is depleted, life still remains, and consumption is forced to the level of any available "pensionized" income. The value function is based on subjectively discounted constant relative risk utility). Since I don't know differential equations I thought I'd create a spreadsheet "toy" and play around with this idea a little bit in a simple form. The model, combined with an understanding of the analytic expressions along with maybe some simulation software that is up to the task, could perhaps be a powerful teaching tool for the risks and (utility) rewards of choices to be made within the life-planning cycle.

Note. This was augmented with some simulation software I subsequently built in R.  For background and links start here: Wealth Depletion Time Simulator - an update or here A Compendium of my "Wealth Depletion Time" Posts.

xx. Other. I have some other curiosities like an options premium finder that uses probability distributions and current market prices for puts and calls to pick ripe opportunities - for futures options. I'll add more here as I remember old curiosities or find or create new ones.













No comments:

Post a Comment