I set out to do better. A better asset allocation derived directly from your goal. I created a dynamic programming based optimizer that is able to calculate the optimal asset allocation for more or less arbitrary goals. The resulting asset allocation is optimal under the condition that market timing is impossible. With market timing being impossible, I mean that your assumed probability distribution of future market movements does not change over time.
Intuitive explanation of the idea behind my solution
Recall the trinity study:
The optimal asset allocation for a 4% withdraw rate with a 30 year horizon is 50% stocks.
The optimal asset allocation for a 6% withdraw rate with a 20 year horizon is 100% stocks.
Suppose that that you start your 30-year withdrawal with a 4% withdrawal rate and the suggested 50% stock allocation. Ten years down the road, you capital has shrunk and you are now effectively using a 6% withdrawal rate. What do you do? Do you keep your 50% stock allocation, or do you switch to a 100% stock allocation as suggested by the trinity study?
Of course you switch to the 100% asset allocation. If the markets go up, down or sideways, check the trinity study tables each year and switch to the new best asset allocation. This improves your success rate.
If you follow this method, there is a flaw in the trinity study: the trinity study tables give you the best asset allocation allocation under the assumption that the asset allocation is constant over the entire duration. But we have just said that switching improves your success rate. Can we build a better trinity study that gives us the best asset allocation under the assumption that you switch to the new-best asset allocation each year? That is what I have done.
simple scenario: saving a fixed amount by a fixed date
Let's start with a simple example: saving for retirement. Our model retiree saves $10k per year and wants to build $1 million at some fixed point in the future (the target date). We define success as an ending value >= $1m and failure otherwise. The following figure displays the optimal asset allocation for this goal, optimal means that the chance of success is maximized:

There is a lot to unpack here. The Y axis displays your current net worth. The X axis displays the amount of years left until the target date. The color indicates the asset allocation, dark blue means 0% equity (all bonds) and dark red means 100% equity. The contour lines indicate 50%, 80%, 95% and 99% chance of success.
Suppose that our retiree wants to retire in 50 years and currently has 0 capital. We look at the graph above and see that our retiree is on the 95% confidence line, that indicates our retiree has 95% chance of succeeding at this particular goal. The optimal asset allocation at this point is 100% equity.
some years later, our retiree saved 400k and has 30 years left before his/her retirement date. Our retiree is in the white/light red zone, this indicates that an asset allocation of approximately 50% equity 50% bonds maximizes the chance of success. Our retiree should consult this figure each year to determine his asset allocation for the following year.
An important thing to note here is that the strategy is path independent. If person A want to retire in 50 years and B wants to retire in 40 years, then we don't need two separate solutions. The solution for the last 40 years are identical for both A and B.
Saving a fixed amount as soon as possible
The previous scenario had an odd utility function: our retiree wants to save $1m to retire at a fixed date. But what if the retiree reaches his goal 10 years earlier? Shouldn't he retire earlier? The following scenario minimizes the time required to reach $1m rather than maximizing the chance of reaching it.

the asset allocation is relatively straightforward. During the majority of your savings period, you should have an asset allocation that is 100% equity. When you get close to your goal (around 85%), gradually switch over to an asset allocation of 100% bonds (In practice, I would advice gradually switching to the asset allocation used in retirement instead of 100% bonds). The contour lines indicate the average number of years left when the goal is reached.
How about leverage?

Note the change in color scale. The results indicate that leverage investing early in your career is useful. My model makes several generous assumptions when it comes to leverage (yearly re-leverage, wealth can't go below zero, no margin calls), these results are an approximation.
The following figure shows a cross section of the (slightly modified) utility function at y=60, showing the average number of years left before reaching $1m.

The difference between 100% stocks and optimal variable asset allocation is minor.
Trinity study like retirement
The following figure displays the optimal asset allocation for a classic trinity study style retirement. Success is defined as a positive ending balance. The retirement horizon is between 60 and 0 years. The color indicates the asset allocation to use for each year. The contour lines depict 50%, 80%, 95% and 99% chance of success.

Look up your remaining lifespan in the X axis and your current spending in the Y axis. What we see here is that if the market drops, you should take a more aggressive asset allocation. And if the market does well, you should use a less aggressive asset allocation. Ironically, this is the opposite of what usually happens. Towards the end of this post are various figures with different return assumptions.
The following figure displays a cross section of the success rate with a remaining horizon of 25 years, for this strategy, versus various fixed allocations.

As you can see, the success rate are substantially higher than with a fixed asset allocation.
How about glidepaths? The following figure shows the success chance from the dynamic asset allocation, the maximum success rate of all possible constant allocations (0-100%, 2.5% increments), and the maximum of all possible glidepaths (glidepath from X to Y over the entire duration, 10% increments):

It is a bit difficult to see on this figure, but choosing the right glidepath increases your success chance over a static allocation by a very small amount, the maximum improvement is around ~ 0.6%. The optimal variable asset allocation performs much better. Note that that is impossible to choose a glidepath that performs as well as this figure shows over the entire range of withdraw rates, a withdrawal rate of 4% requires different glidepath than a withdrawal rate of 4.1%. You don't need to choose between different dynamic asset allocations, there is only one.
Trinity study like retirement, with ending capital bonus.
When the goal is already certain, the optimizer chooses the safest possible asset allocation. But if the goal is already certain, why not try to optimize for a higher terminal value? The utility function used is:
Code: Select all
if ruin:
return 0
else:
return 1 + C * ending_capital

We also optimize for the same scenario with leverage (the color scale is different in the following figure):

The 80% confidence threshold is quite a bit higher than without leverage, but the overall strategy does not change.
Trinity study with capital preservation.
The following scenario optimizes for a terminal value of 25 or more, i.e. capital preservation.

There is not much to discuss here. I personally think this scenario is worthless because there is no convincing reason to specifically optimize for capital preservation (rather than, say, maximizing the terminal value according to some utility function). This is similar to optimizing for maximum drawdown, which does not result in sane strategies. Or to be more precise I think there is no sane reason to optimize for drawdown.
Model verification with monte carlo
My solver is very different from the usual monte carlo simulation. Due to implementation details (discussed later), the model slightly underestimates the utility function. How well does the model results match that of a simple monte carlo implementation?

The dotted lines indicate the survival chance as calculated by the dynamic programming solver. The lines indicate the survival chance according to a simple monte carlo backtester. We see that the mode very slightly under-estimates the survival chance, as expected.
My solver only supports path-independent solutions. With the aid of this monte carlo simulator, we can test path independent strategies such as bond first and prime harvesting. I have mentioned that the variable asset allocation is optimal, but does it beat prime harvesting in practice?

We see that the variable asset allocation convincingly beats prime harvesting. With some parameter tuning, we can get prime harvesting to beat any linear allocation, but not all of them at the same time. This highlights the difficulty of choosing the right initial parameters. Apart from the equity risk premium, the variable asset allocation has no parameters.
So far, we have ran monte carlo simulations with random numbers. Real stock returns are not normally distributed (more on that later). To make the test more realistic, we run the simulation with random blocks of 10 consecutive years from the history of US stock and bond returns since 1871. The entire history was normalized to match the return assumptions used by the solver.

How about 30 years?

The lines dance around a bit (there are only 100 samples available, and most of them are dependent), but the variable asset allocation still convincingly beats the competition. Prime harvesting hits 100% success chance at a 3.86% withdrawal rate and the optimal variable asset allocation hits it at 4.41%.
I only tested prime harvesting with one initial parameter, here is a figure showing prime harvesting with various initial parameters:

And also constant allocation with various initial parameters:

Model details.
My model assumes that real stock and bond returns are normally distributed, mean 7% / std 16% for stocks and 2% / 4% for bonds (correlation = 0). Please ask me if you would like to see simulations with different assumptions.
Are stock returns normally distributed? Yes... but with a caveat. Randomly drawn years are strongly normally distributed. Blocks of 2 consecutive years are still strongly normally distributed. 10 years, data is still normally distributed but a standard deviation of 15% gives the best fit. At 30 years the best fit has a standard deviation of just 9%.
This could indicate that the US is an outlier. But it could also indicate that the stock market exhibits mean-reverting behavior and that consecutive years are not independent. This means that market timing is not impossible.
Finally, the model that I use is not continuous, the solutions in this post were generated with an X resolution of 1 year and Y resolution somewhere around 2000 bins. That means (example) that the model can represent the values $1000 and $1004, but a value of $1003 is rounded down towards $1000. This causes the model to under-estimate the probability of success.
The time complexity of the solver is approximately O(X * Y^2) with X being the amount of time steps and Y being the amount of $$$ steps.
Different expected returns
The figures in this post were generated with return assumptions of mean 7% std 16% for stocks and mean 2% std 4% for bonds, for no particular reason. Here are some different assumptions.
7%, 2%
7%, 1%
7%, 0%
6%, 2%
6%, 1%
6%, 0%
5%, 2%
5%, 1%
5%, 0%
Really optimal?
In theory, we can do better by:
- Using factor investing to juice up the returns or get the same returns with lower risk.
- Varying the ERP (equity risk premium) according to some formula. Also known as market timing.
- Taking into account that retirees will increase their spending if the market does well and decrease their spending if the market does poorly. (VPW).
Conclusions
There are two messages that I want to give here. The first message is that, when saving for as early as possible retirement, I strongly recommend an allocation of 100% (or more) in equities.
The second message that I want to give here is that in my opinion, path dependent strategies such as prime harvesting, buckets and to a lesser extent glidepaths are dead and should not be used. A variable asset allocation is able to provide a higher chance of archiving your financial goals with fewer assumptions.
Please ask me if you would like to see simulations for different goals or different assumptions.
Similar work and references
Forsyth and Vetzal, "Robust Asset Allocation for Long-Term Target-Based Investing". Looks at mv-optimal asset allocation for target wealth style retirement.