Backtesting for the Optimum HBPP Allocations

General Discussion on the Permanent Portfolio Strategy

Moderator: Global Moderator

Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Fri Dec 28, 2012 3:26 pm

Some of you are aware I have been working on some backtesting code for the HBPP.  I've been able to put together something that allows me to choose arbitrary dates and spit out the CAGR, max draw down, standard deviation, etc for the portfolio over a given time period.

Having built and tested that to my satisfaction, I decided to take it a step further.  I recently posted in another thread that I decided to iterate using that same code and price data over the 176,000-ish ways one could allocate 0-100% of capital over the 4 assets.  In effect, I wanted to answer the following questions: 

1) What have been the optimum performing allocations among the 4 assets of the permanent portfolio since 1972?
2) In what ways has changing the allocation affected performance and volatility of the portfolio?

I'm aware that doesn't answer what will be the future most efficient allocation, but I think the results can be instructive nonetheless.

A few folks expressed interest in seeing the results, so I'm posting them here, along with a CSV file with the full results of every iteration.  I think the columns are self-explanatory, but if anyone has questions, by all means post them here and I'll try to answer.  Here's the results:

http://www.peaktotrough.com/download/hb ... v.zip  [ 3 MB ]

Here are the parameters for each run of this simulation:

- Start date:  01/01/1972
- End date:  12/06/2012
- Reinvest all dividends and interest payments into their respective assets
- Rebalance on 35/15 bands
- Cash in 1 year T-bills
- Treasury bonds are all 30 years when they were historically available, 20 years otherwise
- Stock allocation in the S&P 500

Interesting (albeit, somewhat random) observations:

- Sorting for highest CAGR gives us:  10.3% CAGR and 11.12% annualized standard deviation with an allocation of 0% Tbills, 6% Tbonds, 50% gold, 44% S&P500.

- Sorting for highest max drawdown yields a 100% allocation to gold.  It takes the... ahem... gold medal with a 70.26% max dd over the period.  Yikes.

- Sorting for highest Sharpe ratio gives us 0.6167 with an allocation of:  20% Tbills, 23% Tbonds, 34% Gold, 23% S&P500.  CAGR of 10.21% and standard deviation of 7.3%.

- Second highest Sharpe ratio is 0.6166:  27% Tbills, 25% Tbonds, 21% Gold, 27% S&P500.  CAGR of 9.7% and standard deviation of 6.5%.  Two things noteworthy here... a significant difference in allocation, but similar results in sharpe ratios.  Also, this is substantially similar to the standard 4x25 portfolio.

- Looking at gold specifically, in the top 100 results sorted by Sharpe ratio, the low gold allocation is 18%, CAGR is 9.6%.  The high gold allocation is 35% with a CAGR of 10.3%. 

- The standard 4x25 allocation is remarkably close to the optimal allocation with a CAGR of 9.6%, standard deviation of 6.8% and Sharpe ratio of 0.57.  I personally find this fascinating.

Some of you guys are MUCH better at data crunching with Excel than I am, so have at it... let us know if you find anything interesting. 

Also, it goes without saying that I do not claim these results to be error-free, and I highly recommend everyone verify the results and perform their own due diligence before using anything contained herein for investment purposes.

Thanks,
P2T
User avatar
frugal
Executive Member
Executive Member
Posts: 947
Joined: Sat Nov 10, 2012 12:49 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by frugal » Fri Dec 28, 2012 4:26 pm

Great job!

What I also would like to have is a daily chart of HBPP performance for the same period. Can you publish it?

Regards


I've found it over your FANTASTIC personal web-site. Another GREAT GREAT work!
Last edited by frugal on Sat Dec 29, 2012 2:53 am, edited 1 time in total.
Live healthy, live actively and live life!
User avatar
buddtholomew
Executive Member
Executive Member
Posts: 2464
Joined: Fri May 21, 2010 4:16 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by buddtholomew » Fri Dec 28, 2012 6:13 pm

Thank you for producing this content. I too find it fascinating that the 4x25 configuration is close to the optimal allocation.

Happy Holidays!
Budd
"The first principle is that you must not fool yourself and you are the easiest person to fool" --Feynman.
whatchamacallit
Executive Member
Executive Member
Posts: 750
Joined: Mon Oct 01, 2012 7:32 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by whatchamacallit » Fri Dec 28, 2012 8:32 pm

Thank you for sharing.

I was wondering how the rebalance bands were applied in these different scenarios.

Wouldn't 15/35 rebalance bands only apply to the 25x4 portfolio?
Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Sat Dec 29, 2012 7:27 am

frugal wrote:What I also would like to have is a daily chart of HBPP performance for the same period. Can you publish it?
I'll do one better... you can generate your own here:

http://www.peaktotrough.com/hbpp.cgi

Have fun.  ;)
Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Sat Dec 29, 2012 7:34 am

whatchamacallit wrote: I was wondering how the rebalance bands were applied in these different scenarios.

Wouldn't 15/35 rebalance bands only apply to the 25x4 portfolio?
That is an excellent question!  And to be honest, one I hadn't given a whole lot of thought before running this simulation...

Here's the way it works currently:  The 35/15 points are simple "triggers" that, when hit, cause a rebalance action to occur.  The rebalance action itself will rebalance the portfolio back to its *original* allocation.  So if you started out with 20/30/16/34 that's what you'll have after the rebalance is completed.

Upon reflection, this means that many allocations are being rebalanced too much, and many are probably not being rebalanced enough, based upon the magnitude of the move required to hit the 35/15 trigger from the original allocation.  But then again, I suspect most of the ones any of us would actually consider are being rebalanced sufficiently often.

Maybe I'll start a new one on Jan 1, 2013 with annual rebalancing instead and see how that changes things...

Good comment, thanks!

P2T
User avatar
MachineGhost
Executive Member
Executive Member
Posts: 10054
Joined: Sat Nov 12, 2011 9:31 am

Re: Backtesting for the Optimum HBPP Allocations

Post by MachineGhost » Sat Dec 29, 2012 7:54 am

I wouldn't say the optimal allocation is close to 25/4, but it depends on how you define risk.  Volatility is not risk.  If you use max drawdown for your risk criteria in Sharpe, then the optimal allocation will be much different as I posted in another thread (probably gone due to the forum software change).  For the average investor though, 25/4 is fine but there will be scary interyear periods of 20% max drawdowns, possibly higher in the next "tight money recession".

Frankly, I think you get more out of worrying about market timing than portfolio allocation.  There's not always a guaranteed inversely correlated asset that will go up in any given market condition.  For instance, a "tight money recession" is the worst for the PP because cash has no ability to move up, so avoiding losses in the other three assets is critical to managing overall portfolio risk.
Last edited by MachineGhost on Sat Dec 29, 2012 7:56 am, edited 1 time in total.
"All generous minds have a horror of what are commonly called 'Facts'. They are the brute beasts of the intellectual domain." -- Thomas Hobbes

Disclaimer: I am not a broker, dealer, investment advisor, physician, theologian or prophet.  I should not be considered as legally permitted to render such advice!
Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Sat Dec 29, 2012 8:17 am

MachineGhost wrote: I wouldn't say the optimal allocation is close to 25/4, but it depends on how you define risk.  Volatility is not risk.  If you use max drawdown for your risk criteria in Sharpe, then the optimal allocation will be much different as I posted in another thread (probably gone due to the forum software change).
Interesting.  Everything I have seen so far has shown standard deviation to be a good proxy for max drawdown.  In fact, what I've seen so far indicates that the relationship is, more or less, linear.  Sorting by max drawdown in my csv file and taking a quick look at the standard deviation column to the left also appears to confirm this.

Perhaps the standard deviations you've seen used for sharpe ratios in the past were calculated differently, used poor data sources, or extrapolated fewer data points.  Mine is a daily standard deviation which is then annualized, which should give as close an approximation to max drawdown as possible.

For that matter, download the file and test it... just multiply the sharpe ratio column by the StdDev column, and then divide the result by the MaxDD column.  That should give you what you're asking for above...
Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Sat Dec 29, 2012 8:42 am

Following up from my reply to MG above...

I took a moment and did what you suggested and created a new column using MaxDD as the risk component.  It turns out that it does materially change the optimum allocations using that ratio, and that the standard deviation and max drawdown do not have a linear relationship as I suggested earlier.

Most interesting is that the gold allocation varies from only 14-18% in the 100 most efficient allocations using this ratio.  The best is:

35% Tbill, 23% Tbond, 14% Gold, 28% S&P500 - CAGR 9.1%, 13.2% Max DD

I'd certainly take that deal.    ;)
possum
Associate Member
Associate Member
Posts: 26
Joined: Tue Apr 27, 2010 4:37 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by possum » Sat Dec 29, 2012 10:04 am

Peak2Trough wrote: Following up from my reply to MG above...

I took a moment and did what you suggested and created a new column using MaxDD as the risk component.  It turns out that it does materially change the optimum allocations using that ratio, and that the standard deviation and max drawdown do not have a linear relationship as I suggested earlier.

Most interesting is that the gold allocation varies from only 14-18% in the 100 most efficient allocations using this ratio.  The best is:

35% Tbill, 23% Tbond, 14% Gold, 28% S&P500 - CAGR 9.1%, 13.2% Max DD

I'd certainly take that deal.    ;)
FWIW, I've played around with different allocations and have also found that 15% gold and 30% equities is in the sweet spot.
User avatar
annieB
Executive Member
Executive Member
Posts: 263
Joined: Thu Apr 12, 2012 5:23 pm
Location: Brentwood,Tennessee

Re: Backtesting for the Optimum HBPP Allocations

Post by annieB » Sat Dec 29, 2012 10:49 am

Peak:

Thanks for the chart calculator.
Neat!
User avatar
frugal
Executive Member
Executive Member
Posts: 947
Joined: Sat Nov 10, 2012 12:49 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by frugal » Sat Dec 29, 2012 1:14 pm

Desert wrote:
Peak2Trough wrote: Following up from my reply to MG above...

I took a moment and did what you suggested and created a new column using MaxDD as the risk component.  It turns out that it does materially change the optimum allocations using that ratio, and that the standard deviation and max drawdown do not have a linear relationship as I suggested earlier.

Most interesting is that the gold allocation varies from only 14-18% in the 100 most efficient allocations using this ratio.  The best is:

35% Tbill, 23% Tbond, 14% Gold, 28% S&P500 - CAGR 9.1%, 13.2% Max DD

I'd certainly take that deal.    ;)
So essentially more cash and less gold.  That intuitively makes sense too.
Why makes sense?

Let me understand...

Thanks!


Peak2Trough wrote:
frugal wrote:What I also would like to have is a daily chart of HBPP performance for the same period. Can you publish it?
I'll do one better... you can generate your own here:

http://www.peaktotrough.com/hbpp.cgi

Have fun.  ;)
PEAK,

can you do one using some data from EU-PP?

[ European ETF's ]

With my best regards.
Last edited by frugal on Sat Dec 29, 2012 1:17 pm, edited 1 time in total.
Live healthy, live actively and live life!
Arturo
Senior Member
Senior Member
Posts: 100
Joined: Tue Sep 11, 2012 1:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Arturo » Sun Dec 30, 2012 5:06 pm

Peak2Trough wrote: Following up from my reply to MG above...

I took a moment and did what you suggested and created a new column using MaxDD as the risk component.  It turns out that it does materially change the optimum allocations using that ratio, and that the standard deviation and max drawdown do not have a linear relationship as I suggested earlier.

Most interesting is that the gold allocation varies from only 14-18% in the 100 most efficient allocations using this ratio.  The best is:

35% Tbill, 23% Tbond, 14% Gold, 28% S&P500 - CAGR 9.1%, 13.2% Max DD

I'd certainly take that deal.    ;)
H? Peak2Trough.

thank you very much for your calculations and web app. Its really cool. Just some doubts

1. as far as i understood from some simulations that were shown before here on this forum, it was supposed that rebalancing annually was better than the 35/15 threshold. But from your simulations, it shows the opposite: 35/15 threshold gives better returns. Who is right?

2. when you set the simulation to use 30 year T-bonds, how did you implement at the source code? at the beginning of every year, you start with a new 30 year bond, isn't it?

3. as a personal thought, i am seeing that using 30 or 20 year T-bonds, and rebalancing with 35/15 threshold, gives very similar results (almost the same).

4. My last question. Obviously, Harry Browne couldn't live enough to see in real the result of bands thresholds and assets allocations. From your simulations, you obtained that the best result is not 4x25%, but 35% Tbill, 23% Tbond, 14% Gold, 28% S&P500. The negative years performance is quite interesting. What does the forum think about it?

regards!
Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Fri Jan 04, 2013 8:31 am

@frugal - Unfortunately I don't know a thing about Euro investing, so I wouldn't be much help in replicating any of this for a EU PP, sorry.

@Arturo - Good questions... let me address them as I can:

1.  I'm not aware of prior backtesting which showed annual rebalancing with a higher CAGR.  To me, that doesn't make sense intuitively since it would necessarily reduce the overall risk of the portfolio. 

If you test Annual, 30/20, 35/15, and 40/10 rebalancing on my app, you should note both higher CAGR and higher standard deviation as you progress towards the higher rebalancing bands.  Intuitively, this makes sense because you take higher risk in the portfolio by expanding the bands, and should therefore get a higher return and volatility.

2.  The bond piece is the most complicated, but here's how it's done...

I took public Fed data of nominal daily rates of 30 and 20 year bonds.  At time of purchase, I buy the longest bond available at par, with the assumption that fractional bonds can be purchased.*  Then on Jan 1 of each calendar year, the program disposes of the bonds it holds at their present value and repurchases a new batch of bonds to keep the maturity as far out as possible.

*  Obviously you can't buy fractional bonds, but this assumption greatly reduced the complexity of the calculations in that I didn't have to account for specific bond lots and it also emulates a more "true" permanent portfolio as every dollar allocated to bonds actually goes into bonds.  Note this is also true in the real world portfolios provided that the bond allocation is evenly divisible by $1000.

Additionally, there were some years that the Treasury did not offer 30 year bonds and only 20 years were available.  In those cases, the program buys the 20 year bonds for that year... if the 30 year later came available again (depending on the dates you selected), it will buy them at the next Jan 1 repurchase attempt where it finds they are available.

In the middle of all of that, the present value of the bonds is calculated based on the Fed's published daily closing interest rate for that bond.  As I have said in the past, it is theoretically possible for the market price of a given bond to skew from its present value, but over time these values should converge toward each other or there would exist arbitrage opportunities in the bond market that I must believe don't exist in any meaningful way in today's bond market.


Hope this helps...

P2T
Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Fri Jan 04, 2013 8:34 am

Got a new backtest batch up... this one tests from 01-01-1972 to 01-01-2013.  It also moved to annual rebalancing so as not to skew results of portfolios with more outlandish initial allocations with bands.

http://www.peaktotrough.com/download/hb ... t2.csv.zip [3.6 MB]

Finally, a column was added which is effectively the Sharpe ratio with max drawdown as the denominator instead of standard deviation.  It's called SharpeMDD for lack of a better term :)
akratic
Associate Member
Associate Member
Posts: 43
Joined: Mon Nov 29, 2010 5:24 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by akratic » Fri Jan 04, 2013 3:32 pm

This is awesome!

It can also answer non-PP questions.  For example, consider someone that refuses to own any gold and cares only about CAGR.  A simple filter on the Gold column and a sort on the CAGR column and we have their ideal asset allocation: 63% stocks, 37% bonds!  Eerily familiar...

I'd love to play with this even more, especially with the rebalancing behavior, if you're willing to share any of the code or the data.  My personal email is dan@akratic.com and I'm a professional programmer, so I could figure out the details on my own without bothering you.  No worries if you want to keep it to yourself, but I just had to ask!
miyazaki
Junior Member
Junior Member
Posts: 19
Joined: Wed Sep 26, 2012 6:56 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by miyazaki » Sun Jan 27, 2013 3:19 am

This is a fantastic resource, and will also be helpful moving forward, because it can indicate when a rebalancing event has occurred. Would it be possible to make one request, though? Would it be possible to add a function for adding new money to the portfolio? For example "add $20000 yearly, thus rebalancing at that point".

Thank you for setting up the calculation!
zen
Junior Member
Junior Member
Posts: 8
Joined: Tue Jan 08, 2013 1:39 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by zen » Sun Jan 27, 2013 11:59 am

Very interesting website.  However these kinds of things always worry me a bit.  The various asset classes are in the portfolio to help protect against the various economic conditions (inflation, recession etc) that can occur.  If you optimize the asset allocation based on past performance, aren't you essentially optimizing the portfolio for the economic conditions that occurred in the past?  I don't think that this is necessarily a good indicator of what economic conditions will occur in the future.
User avatar
MediumTex
Administrator
Administrator
Posts: 9096
Joined: Sun Apr 25, 2010 11:47 pm
Contact:

Re: Backtesting for the Optimum HBPP Allocations

Post by MediumTex » Mon Jan 28, 2013 1:47 pm

I just read through this thread for the first time.

Awesome work!

I will a sticky this thread for a while.
Last edited by MediumTex on Mon Jan 28, 2013 1:50 pm, edited 1 time in total.
Q: “Do you have funny shaped balloons?”
A: “Not unless round is funny.”
Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Fri Feb 01, 2013 1:37 pm

akratic:

That's a fantastic find!  Exactly the sort of thing I'm hoping those with better Excel-fu than I will discover.  Unfortunately, I can't share the code for it, but may be willing to work in additional features as time allows.

miyazaki:

Thanks!  Regarding your request, the original dollar amount was somewhat arbitrarily set at $10k, and the last iteration of the code had annual rebalancing that occurred on Jan 1.  I'm not sure adding a fixed dollar amount at that same time tells us anything new, actually.

MT: 

Thanks for the kind words!

P2T
User avatar
BearBones
Executive Member
Executive Member
Posts: 689
Joined: Sat Sep 18, 2010 4:26 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by BearBones » Fri Feb 01, 2013 7:39 pm

Thanks for doing this! Does your latest backtest still show the most efficient as near 35% Tbill, 23% Tbond, 14% Gold, and 28% S&P500?
User avatar
MachineGhost
Executive Member
Executive Member
Posts: 10054
Joined: Sat Nov 12, 2011 9:31 am

Re: Backtesting for the Optimum HBPP Allocations

Post by MachineGhost » Fri Feb 01, 2013 11:31 pm

Desert wrote: MG, that's interesting.  Do you recall what the optimum allocation was, using max drawdown in Sharpe?
It is likely somewhere in this thread: http://gyroscopicinvesting.com/forum/ht ... ic.php?t=5

If not, let me know and I'll try to track it down again.
Last edited by MachineGhost on Fri Feb 01, 2013 11:33 pm, edited 1 time in total.
"All generous minds have a horror of what are commonly called 'Facts'. They are the brute beasts of the intellectual domain." -- Thomas Hobbes

Disclaimer: I am not a broker, dealer, investment advisor, physician, theologian or prophet.  I should not be considered as legally permitted to render such advice!
Peak2Trough
Full Member
Full Member
Posts: 93
Joined: Tue Oct 23, 2012 2:23 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by Peak2Trough » Sat Feb 02, 2013 10:29 am

BearBones wrote: Thanks for doing this! Does your latest backtest still show the most efficient as near 35% Tbill, 23% Tbond, 14% Gold, and 28% S&P500?
I think those numbers were just the highest CAGR of the top 100 portfolios sorted by my SharpeMDD column... I don't want to give the indication that's the most efficient mix, even historically.  Certainly it is among the more efficient mixes, however.

For the last batch I ran (ending 12-31-2012), that 35/23/14/28 mix had a CAGR of 8.7% with 5.7% standard deviation.  Still very good!

The most efficient when sorting on the SharpeMDD column is 82/11/2/5, but the CAGR is a mere 6.5%.  Low volatility, low return.

If you wanted a > 9% return, again using SharpeMDD as the measure of efficiency, the most efficient mix was:  20/46/10/24 with a 9.0% CAGR and 6.6% standard deviation.

I think that's how one has to work this... decide first on your measure of efficiency, then determine the return you require, and find the mixes that provided that return.

Again, I don't believe that tells us anything about the viability of that mix going forward.  What I believe it does show is how we can vary the portfolio and still get results very similar to that of the 25x4 mix.
User avatar
rocketdog
Executive Member
Executive Member
Posts: 688
Joined: Fri Dec 07, 2012 3:35 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by rocketdog » Tue Feb 12, 2013 10:45 am

Peak2Trough wrote: Got a new backtest batch up... this one tests from 01-01-1972 to 01-01-2013.  It also moved to annual rebalancing so as not to skew results of portfolios with more outlandish initial allocations with bands.

http://www.peaktotrough.com/download/hb ... t2.csv.zip [3.6 MB]

Finally, a column was added which is effectively the Sharpe ratio with max drawdown as the denominator instead of standard deviation.  It's called SharpeMDD for lack of a better term :)
This is great stuff, but I'm confused about the SharpeMDD.  How exactly is that being calculated?  I can't seem to back into it using the Sharpe and MaxDD values. 
The whole aim of practical politics is to keep the populace alarmed (and hence clamorous to be led to safety) by menacing it with an endless series of hobgoblins, all of them imaginary.
- H. L. Mencken
BP
Full Member
Full Member
Posts: 77
Joined: Wed Jan 30, 2013 5:39 pm

Re: Backtesting for the Optimum HBPP Allocations

Post by BP » Tue Feb 12, 2013 4:11 pm

Very useful website.  Thanks for sharing Peak2Trough!
I am not a broker, dealer, investment advisor, or physician.  My posts are not advice of any type and should not be construed as such.  My posts are used at the sole risk of the reader.
Post Reply